GNoiseFunction.h

Classes

GNoiseFunction -- A one dimensional normal distribution (full description)

template<class T> class GNoiseFunction : public GNoiseParam<T>

Interface

Public Members
GNoiseFunction() : GNoiseParam<T>()
GNoiseFunction(const Double &mean, const Double &var) : var<T>(mean, var)
GNoiseFunction(const GNoiseFunction<T> &other) : other<T>(other)
template <class W> GNoiseFunction(const GNoiseFunction<W> &other) : GNoiseParam<T>(other)
GNoiseFunction<T> &operator=(const GNoiseFunction<T> &other)
virtual ~GNoiseFunction()
virtual T eval(typename Function<T>::FunctionArg x) const
virtual Function<T> *clone() const

Description

Prerequisite

Etymology

Gaussian Noise generator.

Synopsis

A GNoise is described by a mean and a variance (Note these are not parameters in the Function sense, but more like the order of a polynomial. The defaults are 0 and 1.

Example

    GNoiseFunction<Double> sf;
    sf();            // = 0.12

Template Type Argument Requirements (T)

Thrown Exceptions

Member Description

GNoiseFunction() : GNoiseParam<T>()
GNoiseFunction(const Double &mean, const Double &var) : var<T>(mean, var)

Constructs the GNoise, Defaults: mean=0, var=1.0

GNoiseFunction(const GNoiseFunction<T> &other) : other<T>(other)
template <class W> GNoiseFunction(const GNoiseFunction<W> &other) : GNoiseParam<T>(other)

Copy constructor (deep copy)

GNoiseFunction<T> &operator=(const GNoiseFunction<T> &other)

Copy assignment (deep copy)

virtual ~GNoiseFunction()

Destructor

virtual T eval(typename Function<T>::FunctionArg x) const

Evaluate the GNoise at x. If a vector is used as the argument only its first element is used.

virtual Function<T> *clone() const

Return a copy of this object from the heap. The caller is responsible for deleting this pointer.