org.spaceroots.mantissa.random
Class UncorrelatedRandomVectorGenerator

java.lang.Object
  extended byorg.spaceroots.mantissa.random.UncorrelatedRandomVectorGenerator
All Implemented Interfaces:
RandomVectorGenerator, Serializable

public class UncorrelatedRandomVectorGenerator
extends Object
implements Serializable, RandomVectorGenerator

This class allows to generate random vectors with uncorrelated components.

Version:
$Id: UncorrelatedRandomVectorGenerator.java 1709 2006-12-03 21:16:50Z luc $
Author:
L. Maisonobe
See Also:
Serialized Form

Constructor Summary
UncorrelatedRandomVectorGenerator(double[] mean, double[] standardDeviation, NormalizedRandomGenerator generator)
          Simple constructor.
UncorrelatedRandomVectorGenerator(int dimension, NormalizedRandomGenerator generator)
          Simple constructor.
 
Method Summary
 NormalizedRandomGenerator getGenerator()
          Get the underlying normalized components generator.
 double[] nextVector()
          Generate a correlated random vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 components
standardDeviation - standard deviation for all components
generator - underlying generator for uncorrelated normalized components
Throws:
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 generate
generator - 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:
nextVector in interface RandomVectorGenerator
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.


Copyright © 2001-2007 Luc Maisonobe. All Rights Reserved.