UnaryParam.h

Classes

UnaryParam -- Parameter handling for one dimensional unary function (full description)

template<class T> class UnaryParam : public Function<T>

Types

enum

HEIGHT = 0
CENTER
WIDTH

Interface

Public Members
UnaryParam()
explicit UnaryParam(const T &height)
UnaryParam(const T &height, const T &center)
UnaryParam(const T &height, const T &center, const T &width)
UnaryParam(const UnaryParam<T> &other)
template <class W> UnaryParam(const UnaryParam<W> &other) : Function<T>(other)
UnaryParam<T> &operator=(const UnaryParam<T> &other)
virtual ~UnaryParam()
virtual uInt ndim() const
virtual const String &name() const

Description

Prerequisite

Etymology

A 1-dimensional unary hat.

Synopsis

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

Example

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

Template Type Argument Requirements (T)

Thrown Exceptions

Member Description

enum

Parameter numbers

UnaryParam()
explicit UnaryParam(const T &height)
UnaryParam(const T &height, const T &center)
UnaryParam(const T &height, const T &center, const T &width)

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

UnaryParam(const UnaryParam<T> &other)
template <class W> UnaryParam(const UnaryParam<W> &other) : Function<T>(other)

Copy constructor (deep copy)

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

Copy assignment (deep copy)

virtual ~UnaryParam()

Destructor

virtual uInt ndim() const

virtual const String &name() const

Give name of function