DiracDFunction.h

Classes

DiracDFunction -- A one dimensional Dirac delta function (full description)

template<class T> class DiracDFunction : public DiracDParam<T>

Interface

Public Members
DiracDFunction() : DiracDParam<T>()
explicit DiracDFunction(const T &height) : DiracDParam<T>(height)
DiracDFunction(const T &height, const T &center) : DiracDParam<T>(height, center)
DiracDFunction(const DiracDFunction<T> &other) : other<T>(other)
DiracDFunction<T> &operator=(const DiracDFunction<T> &other)
virtual ~DiracDFunction()
virtual T eval(typename Function<T>::FunctionArg x) const
virtual Function<T> *clone() const

Description

Prerequisite

Etymology

A 1-dimensional Dirac delta.

Synopsis

A DiracD is described by a height, a center and a width (halfwidth). The value is:
      height          (|x-center| == 0.0)
      0               (|x-center| != 0.0)
The parameters are enumerated by HEIGHT, CENTER and WIDTH. They have default values of (1, 0).

Example

    DiracDFunction<Double> sf(5.0, 25.0);
    sf(25);            // = 5.0

Template Type Argument Requirements (T)

Thrown Exceptions

Member Description

DiracDFunction() : DiracDParam<T>()
explicit DiracDFunction(const T &height) : DiracDParam<T>(height)
DiracDFunction(const T &height, const T &center) : DiracDParam<T>(height, center)

Constructs the DiracDFunction, Defaults: height=1, center=0.
Warning Could not use default arguments that worked both with gcc and IRIX

DiracDFunction(const DiracDFunction<T> &other) : other<T>(other)

Copy constructor (deep copy)

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

Copy assignment (deep copy)

virtual ~DiracDFunction()

Destructor

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

Evaluate the DiracD 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.