use of de.lmu.ifi.dbs.elki.data.uncertain.UnweightedDiscreteUncertainObject in project elki by elki-project.
the class UnweightedDiscreteUncertainifier method newFeatureVector.
@Override
public <A> UnweightedDiscreteUncertainObject newFeatureVector(Random rand, A array, NumberArrayAdapter<?, A> adapter) {
UncertainObject uo = inner.newFeatureVector(rand, array, adapter);
final int distributionSize = rand.nextInt((maxQuant - minQuant) + 1) + minQuant;
DoubleVector[] samples = new DoubleVector[distributionSize];
for (int i = 0; i < distributionSize; i++) {
samples[i] = uo.drawSample(rand);
}
return new UnweightedDiscreteUncertainObject(samples);
}
Aggregations