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.statistic.ContinuousStatistic.java
/** * Constructor that takes an array of doubles for the values of a continuous * statistic. Each value represents a single continuous statistic. This is in * line with the UncertML syntax whereby a collection of types can be represented * by a single entity./* w w w . j a v a 2 s. c o m*/ * * @param values an array of doubles representing the values of n continuous * statistics. */ public ContinuousStatistic(double[] values) { this(Arrays.asList(ArrayUtils.toObject(values))); }
From source file:org.uncertml.statistic.Correlation.java
/** * Constructor that takes an array of doubles. Each value represents * a single correlation statistic. This is in line with the UncertML syntax * whereby a collection of types can be represented by a single entity. * //ww w .j av a2 s . c o m * @param values an array of doubles representing the value of n * correlation statistics. */ public Correlation(double[] values) { this(Arrays.asList(ArrayUtils.toObject(values))); }
From source file:org.uncertml.statistic.CovarianceMatrix.java
/** * Constructor that takes a dimension and an array of values. There should be * dimension^2 values in the covariance matrix. * //from ww w . j a v a 2s . c om * @param dimension the dimension of the covariance matrix. * @param values the values of the covariance matrix. */ public CovarianceMatrix(int dimension, double[] values) { this(dimension, Arrays.asList(ArrayUtils.toObject(values))); }
From source file:org.uncertml.statistic.Decile.java
/** * Constructs a decile from a specified level and an array of doubles. * Each double represents a single decile statistic. This is in line with the * UncertML syntax whereby a collection of types can be represented by a single entity. * //w w w . j a v a 2 s. c o m * @param level an integer level of the set of deciles represented by this object. * Must be in the range 1 - 9 inclusive. * @param values an array of doubles representing the value of n * decile statistics - each with the same level. */ public Decile(int level, double[] values) { this(level, Arrays.asList(ArrayUtils.toObject(values))); }
From source file:org.uncertml.statistic.DiscreteProbability.java
/** * Constructor that takes an array of Strings as categories or events and an * array of doubles for the probabilities. Each category and probability pair * represents a unique discrete probability. 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 a2 s.c o m * @param categories an array of Strings representing the category of n discrete * probabilities. * @param probabilities an array of doubles representing the probability of an * event occurring for n discrete probabilities. */ public DiscreteProbability(String[] categories, double[] probabilities) { this(Arrays.asList(categories), Arrays.asList(ArrayUtils.toObject(probabilities))); }
From source file:org.uncertml.statistic.InterquartileRange.java
/** * Constructor that takes an array of doubles for the lower and upper bounds. * Each lower and upper pair represents a single interquartile range statistic. * 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 ww w . j av a 2 s . co m*/ * @param lower an array of doubles representing the lower value of n interquartile * range statistics. * @param upper an array of doubles representing the upper value of n interquartile * range statistics. */ public InterquartileRange(double[] lower, double[] upper) { this(Arrays.asList(ArrayUtils.toObject(lower)), Arrays.asList(ArrayUtils.toObject(upper))); }
From source file:org.uncertml.statistic.Kurtosis.java
/** * Constructor that takes an array of doubles. Each value represents * a single kurtosis statistic. This is in line with the UncertML syntax * whereby a collection of types can be represented by a single entity. * //from www. j a va 2s .c o m * @param values an array of doubles representing the value of n * kurtosis statistics. */ public Kurtosis(double[] values) { this(Arrays.asList(ArrayUtils.toObject(values))); }
From source file:org.uncertml.statistic.Moment.java
/** * Constructor that takes a single integer order and an array of * doubles for the value of a moment statistic. Each value represents a single * moment statistic. This is in line with the UncertML syntax whereby a collection * of types can be represented by a single entity. * /* ww w .ja va 2s . com*/ * @param order the order of the moment, e.g. 1st order. * @param values an array of doubles representing the value of n * moment statistics. */ public Moment(int order, double[] values) { this(order, Arrays.asList(ArrayUtils.toObject(values))); }
From source file:org.uncertml.statistic.Percentile.java
/** * Constructs a percentile from a specified level and an array of doubles. * Each double represents a single percentile statistic. This is in line with the * UncertML syntax whereby a collection of types can be represented by a single entity. * // w w w. j av a 2 s . c o m * @param level a double level of the set of percentiles represented by this object. * Must be in the range 0 - 100. * @param values an array of doubles representing the value of n * percentile statistics - each with the same level. */ public Percentile(double level, double[] values) { this(level, Arrays.asList(ArrayUtils.toObject(values))); }
From source file:org.uncertml.statistic.Probability.java
/** * Constructor that takes an array of probability constraints and doubles as values. * Each double represents a single probability statistic. This is in line with * the UncertML syntax whereby a collection of types can be represented by a * single entity.//from ww w .j ava 2 s .co m * * @param constraints the constraints that each probability statistic represented * by this object must satisfy. * @param values an array of doubles representing the value of n probability * statistics. */ public Probability(ProbabilityConstraint[] constraints, double[] values) { this(Arrays.asList(constraints), Arrays.asList(ArrayUtils.toObject(values))); }