Package org.apache.commons.math3.random
Class UncorrelatedRandomVectorGenerator
java.lang.Object
org.apache.commons.math3.random.UncorrelatedRandomVectorGenerator
- All Implemented Interfaces:
RandomVectorGenerator
A
RandomVectorGenerator
that generates vectors with uncorrelated
components. Components of generated vectors follow (independent) Gaussian
distributions, with parameters supplied in the constructor.- Since:
- 1.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NormalizedRandomGenerator
Underlying scalar generator.private final double[]
Mean vector.private final double[]
Standard deviation vector. -
Constructor Summary
ConstructorsConstructorDescriptionUncorrelatedRandomVectorGenerator
(double[] mean, double[] standardDeviation, NormalizedRandomGenerator generator) Simple constructor.UncorrelatedRandomVectorGenerator
(int dimension, NormalizedRandomGenerator generator) Simple constructor. -
Method Summary
-
Field Details
-
generator
Underlying scalar generator. -
mean
private final double[] meanMean vector. -
standardDeviation
private final double[] standardDeviationStandard deviation vector.
-
-
Constructor Details
-
UncorrelatedRandomVectorGenerator
public UncorrelatedRandomVectorGenerator(double[] mean, double[] standardDeviation, NormalizedRandomGenerator generator) Simple constructor.Build an uncorrelated random vector generator from its mean and standard deviation vectors.
- Parameters:
mean
- expected mean values for each componentstandardDeviation
- standard deviation for each componentgenerator
- underlying generator for uncorrelated normalized components
-
UncorrelatedRandomVectorGenerator
Simple constructor.Build a null mean random and unit standard deviation uncorrelated vector generator
- Parameters:
dimension
- dimension of the vectors to generategenerator
- underlying generator for uncorrelated normalized components
-
-
Method Details
-
nextVector
public double[] nextVector()Generate an uncorrelated random vector.- Specified by:
nextVector
in interfaceRandomVectorGenerator
- Returns:
- a random vector as a newly built array of double
-