*/
@Override
public void generateRandomGenome(int length, int portfolioSize) {
int remainingPortfolioSize = portfolioSize;
boolean[] newGenome = new boolean[length];
UniformDistribution randomPosition =
new UniformDistribution(getRNG(), 0, newGenome.length);
while (remainingPortfolioSize > 0) {
int position = (int) randomPosition.getRandomNumber();
if (!newGenome[position]) {
newGenome[position] = true;
remainingPortfolioSize--;
}
}