List of usage examples for org.apache.commons.lang ArrayUtils toObject
public static Boolean[] toObject(boolean[] array)
Converts an array of primitive booleans to objects.
From source file:org.uncertml.distribution.continuous.PoissonDistribution.java
/** * Constructor that takes an array of doubles for rate parameters. Each rate * represents a unique Poisson distribution. This is in line with the * UncertML syntax whereby a collection of types can be represented by a single * entity.//from w w w. j av a 2 s. c om * * @param rate an array of doubles representing the rate parameter of n * Poisson distributions. */ public PoissonDistribution(double[] rate) { this(Arrays.asList(ArrayUtils.toObject(rate))); }
From source file:org.uncertml.distribution.continuous.StudentTDistribution.java
/** * Constructor that takes an array of doubles for the mean, variance and * degreed of freedom parameters. Each mean and variance pair represents a * unique Student T distribution. This is in line with the UncertML syntax * whereby a collection of types can be represented by a single entity. The * arrays must be of equal length./*from w ww.jav a 2 s. c o m*/ * * @param mean an array of doubles representing the mean parameter of n * Student T distributions. * @param variance an array of doubles representing the variance parameter of n * Student T distributions. * @param degreesOfFreedom an array of integers representing the degrees of * freedom parameter of n Student T distributions */ public StudentTDistribution(double[] mean, double[] variance, int[] degreesOfFreedom) { this(Arrays.asList(ArrayUtils.toObject(mean)), Arrays.asList(ArrayUtils.toObject(variance)), Arrays.asList(ArrayUtils.toObject(degreesOfFreedom))); }
From source file:org.uncertml.distribution.continuous.UniformDistribution.java
/** * Constructor that takes an array of doubles for the minimum and maximum parameters. * Each minimum and maximum pair represents a unique uniform distribution. * This is in line with the UncertML syntax whereby a collection of types can * be represented by a single entity. The arrays must be of equal length. * /* ww w .ja va 2 s.c o m*/ * @param minimum an array of doubles representing the minimum parameter of n * uniform distributions. * @param maximum an array of doubles representing the maximum parameter of n * uniform distributions. */ public UniformDistribution(double[] minimum, double[] maximum) { this(Arrays.asList(ArrayUtils.toObject(minimum)), Arrays.asList(ArrayUtils.toObject(maximum))); }
From source file:org.uncertml.distribution.continuous.WeibullDistribution.java
/** * Constructor that takes an array of doubles for the scale and shape parameters. * Each scale and shape pair represents a unique Weibull distribution. * This is in line with the UncertML syntax whereby a collection of types can * be represented by a single entity. The arrays must be of equal length. * //w ww.ja v a 2s.c om * @param scale an array of doubles representing the scale parameter of n * Weibull distributions. * @param shape an array of doubles representing the shape parameter of n * Weibull distributions. */ public WeibullDistribution(double[] scale, double[] shape) { this(Arrays.asList(ArrayUtils.toObject(scale)), Arrays.asList(ArrayUtils.toObject(shape))); }
From source file:org.uncertml.distribution.discrete.BernoulliDistribution.java
/** * Constructor that takes an array of doubles for probability parameters. Each probability * represents a unique Bernoulli distribution. This is in line with the * UncertML syntax whereby a collection of types can be represented by a single * entity./*from w w w . j a v a 2s . co m*/ * * @param probability an array of doubles representing the probability parameter of n * Bernoulli distributions. */ public BernoulliDistribution(double[] probabilities) { this(Arrays.asList(ArrayUtils.toObject(probabilities))); }
From source file:org.uncertml.distribution.discrete.BinomialDistribution.java
/** * Constructor that takes an array of integers for the number of trials and * an array of doubles for the probability of success parameters. * Each number of trials and probability of success pair represents a unique binomial distribution. * This is in line with the UncertML syntax whereby a collection of types can * be represented by a single entity. The arrays must be of equal length. * //from w w w . ja v a2s .c o m * @param numberOfTrials an array of integers representing the number of trials parameter of n * binomial distributions. * @param probabilityOfSuccess an array of doubles representing the probability of success parameter of n * binomial distributions. */ public BinomialDistribution(int[] numberOfTrials, double[] probabilityOfSuccess) { this(Arrays.asList(ArrayUtils.toObject(numberOfTrials)), Arrays.asList(ArrayUtils.toObject(probabilityOfSuccess))); }
From source file:org.uncertml.distribution.discrete.DiscreteUniformDistribution.java
/** * Constructor that takes an array of integers for the number of classes parameter. * Each number of classes represents a unique uniform distribution. This is * in line with the UncertML syntax whereby a collection of types can be * represented by a single entity.// w ww . j a va 2 s . c o m * * @param numberOfClasses an array of integers representing the number of * classes parameter of n uniform distributions. */ public DiscreteUniformDistribution(int[] numberOfClasses) { this(Arrays.asList(ArrayUtils.toObject(numberOfClasses))); }
From source file:org.uncertml.distribution.discrete.GeometricDistribution.java
/** * Constructor that takes an array of doubles for probability parameters. Each probability * represents a unique geometric distribution. This is in line with the * UncertML syntax whereby a collection of types can be represented by a single * entity./*from ww w . j av a2 s .c o m*/ * * @param probability an array of doubles representing the probability parameter of n * geometric distributions. */ public GeometricDistribution(double[] probability) { this(Arrays.asList(ArrayUtils.toObject(probability))); }
From source file:org.uncertml.distribution.discrete.HypergeometricDistribution.java
/** * Constructor that takes an array of integers for the number of trials, * number of successes and population size parameters. Each number of trials, * number of successes and population size represents a unique hypergeometric * distribution. This is in line with the UncertML syntax whereby a collection * of types can be represented by a single entity. The arrays must be of equal length. * /* w ww .j a v a 2s . c o m*/ * @param numberOfTrials an array of integers representing the number of trials parameter of n * hypergeometric distributions. * @param numberOfSuccesses an array of integers representing the number of successes parameter of n * hypergeometric distributions. * @param populationSize an array of integers representing the population size * parameter of n hypergeometric distributions. */ public HypergeometricDistribution(int[] numberOfTrials, int[] numberOfSuccesses, int[] populationSize) { this(Arrays.asList(ArrayUtils.toObject(numberOfTrials)), Arrays.asList(ArrayUtils.toObject(numberOfSuccesses)), Arrays.asList(ArrayUtils.toObject(populationSize))); }
From source file:org.uncertml.distribution.discrete.NegativeBinomialDistribution.java
/** * Constructor that takes an array of integers for the number of failures * and an array of doubles for the probability parameters. Each number of failures * and probability pair represents a unique negative binomial distribution. * This is in line with the UncertML syntax whereby a collection of types can * be represented by a single entity. The arrays must be of equal length. * //from w w w . j av a2 s . c o m * @param numberOfFailures an array of integers representing the number of * failures parameter of n negative binomial distributions. * @param probability an array of doubles representing the probability parameter of n * negative binomial distributions. */ public NegativeBinomialDistribution(int[] numberOfFailures, double[] probability) { this(Arrays.asList(ArrayUtils.toObject(numberOfFailures)), Arrays.asList(ArrayUtils.toObject(probability))); }