org.spaceroots.mantissa.random
Class UncorrelatedRandomVectorGenerator
- java.lang.Object
-
- org.spaceroots.mantissa.random.UncorrelatedRandomVectorGenerator
-
- All Implemented Interfaces:
- java.io.Serializable, RandomVectorGenerator
public class UncorrelatedRandomVectorGenerator extends java.lang.Object implements java.io.Serializable, RandomVectorGenerator
This class allows to generate random vectors with uncorrelated components.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description UncorrelatedRandomVectorGenerator(double[] mean, double[] standardDeviation, NormalizedRandomGenerator generator)Simple constructor.UncorrelatedRandomVectorGenerator(int dimension, NormalizedRandomGenerator generator)Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NormalizedRandomGeneratorgetGenerator()Get the underlying normalized components generator.double[]nextVector()Generate a correlated random vector.
-
-
-
Constructor Detail
-
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 all componentsstandardDeviation- standard deviation for all componentsgenerator- underlying generator for uncorrelated normalized components- Throws:
java.lang.IllegalArgumentException- if there is a dimension mismatch between the mean and standard deviation vectors
-
UncorrelatedRandomVectorGenerator
public UncorrelatedRandomVectorGenerator(int dimension, NormalizedRandomGenerator generator)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 Detail
-
getGenerator
public NormalizedRandomGenerator getGenerator()
Get the underlying normalized components generator.- Returns:
- underlying uncorrelated components generator
-
nextVector
public double[] nextVector()
Generate a correlated random vector.- Specified by:
nextVectorin interfaceRandomVectorGenerator- Returns:
- a random vector as an array of double. The returned array is created at each call, the caller can do what it wants with it.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG