com.bnd.math.business.evo.EvoListTestSampleGeneratorBO Maven / Gradle / Ivy
The newest version!
package com.bnd.math.business.evo;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.bnd.math.business.rand.RandomDistributionProvider;
public class EvoListTestSampleGeneratorBO implements EvoTestSampleGeneratorBO> {
private final RandomDistributionProvider randomDistributionProvider;
private final int sampleNum;
private final int listSize;
public EvoListTestSampleGeneratorBO(
RandomDistributionProvider randomDistributionProvider,
int sampleNum,
int listSize
) {
this.randomDistributionProvider = randomDistributionProvider;
this.sampleNum = sampleNum;
this.listSize = listSize;
}
@Override
public Collection> createTestSamples() {
Collection> testSamples = new ArrayList>();
for (int i = 0; i < sampleNum; i++) {
testSamples.add(randomDistributionProvider.nextList(listSize));
}
return testSamples;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy