JSci.maths.statistics.DiscreteDistribution Maven / Gradle / Ivy
package JSci.maths.statistics;
/**
*
* @author Mark
*/
public class DiscreteDistribution {
private final double[] weights;
private final double mass;
public DiscreteDistribution(double[] weights)
{
this.weights = weights;
double sum = 0.0;
for(int i=0; i w)
{
return i;
}
}
return weights.length;
}
}