com.bnd.math.domain.rand.DiscreteDistribution Maven / Gradle / Ivy
The newest version!
package com.bnd.math.domain.rand;
/**
* @author © Peter Banda
* @since 2013
*/
public class DiscreteDistribution extends RandomDistribution {
private double[] probabilities;
private T[] values;
public DiscreteDistribution() {
// no-op
}
public DiscreteDistribution(double[] probabilities, T[] values) {
this.probabilities = probabilities;
this.values = values;
}
public double[] getProbabilities() {
return probabilities;
}
public void setProbabilities(double[] probabilities) {
this.probabilities = probabilities;
}
public T[] getValues() {
return values;
}
public void setValues(T[] values) {
this.values = values;
}
@Override
public Class getValueType() {
return (Class) values[0].getClass();
}
@Override
public RandomDistributionType getType() {
return RandomDistributionType.Discrete;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy