Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ValueGenerator_Correlate< T, RandomGen, crop > Class Template Reference

#include <valuegen.h>

Inheritance diagram for ValueGenerator_Correlate< T, RandomGen, crop >:

Inheritance graph
[legend]
Collaboration diagram for ValueGenerator_Correlate< T, RandomGen, crop >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T = double, class RandomGen = Distributions::uniform, bool crop = true>
class ValueGenerator_Correlate< T, RandomGen, crop >

Distribute value around a master value located elsewhere, using a supplied uncorrelation factor plus upper and lower bounds.

If using a uniform distribution, the value may be cropped to the given bounds, as it is by default, but cropping should be avoided for other distributions since the cropping would either change the distribution or would require generating a number (possibly infinite) of different values from the distribution before finding one in the right range.

Definition at line 209 of file valuegen.h.

Public Methods

 ValueGenerator_Correlate (T *master_value_ptr, T *uncorrelation_ptr, T lower_bound, T upper_bound)
 master_value_ptr and uncorrelation_ptr should be const

 ValueGenerator_Correlate (StringArgs &args, T *ref=0)
 Construct from a string.

virtual string stringrep () const
 Returns the value as a scalar.

 ValueGenerator_Correlate (const self &other)
 Copy constructor.

virtual bool next ()
 Advance to the next state (whatever that means for this object).

virtual void reset ()
 Reset to the starting state.

virtual ValueGenerator< T > * clone () const
 Constructs an identical copy of self and returns it.


Constructor & Destructor Documentation

template<class T = double, class RandomGen = Distributions::uniform, bool crop = true>
ValueGenerator_Correlate< T, RandomGen, crop >::ValueGenerator_Correlate StringArgs   args,
T *    ref = 0
[inline]
 

Construct from a string.

If present, the ref argument is used in place of the first argument expected in the string, and the string is parsed from the beginning for the next argument.

Definition at line 229 of file valuegen.h.

References StringArgs::next(), and OwningPointer< T, Cloner, default_own >::valueptrref().


Member Function Documentation

template<class T = double, class RandomGen = Distributions::uniform, bool crop = true>
virtual string ValueGenerator_Correlate< T, RandomGen, crop >::stringrep   const [inline, virtual]
 

Returns the value as a scalar.

Derived classes will usually want to provide a more specific representation, namely what the StringArgs constructor will accept for that class.

At present it cannot be guaranteed that the value returned is actually what was used to create the object; perhaps the StringArgs passed to the constructor should be saved instead. If so, the StringArgs constructor above would have to be changed to include a string specifying the ValueGenerator type.

Reimplemented from ValueGenerator< T >.

Definition at line 240 of file valuegen.h.

References String::stringrep().


The documentation for this class was generated from the following file:
Generated on Mon Jan 20 02:37:27 2003 for RF-LISSOM by doxygen1.3-rc2