HyperPlaneParam.h

Classes

HyperPlaneParam -- Parameter handling for a hyper plane function. (full description)

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

Interface

Public Members
explicit HyperPlaneParam(uInt m=0)
HyperPlaneParam(const HyperPlaneParam &other)
template <class W> HyperPlaneParam(const HyperPlaneParam<W> &other) : Function<T>(other)
HyperPlaneParam<T> &operator=(const HyperPlaneParam<T> &other)
virtual ~HyperPlaneParam()
Bool operator==(const HyperPlaneParam<T> &other) const
Bool operator!=(const HyperPlaneParam<T> &other) const
virtual const String &name() const
virtual uInt ndim() const

Description

Review Status

Reviewed By:
wbrouw
Date Reviewed:
2004/05/25
Programs:
Tests:

Prerequisite

Synopsis

This class forms a function of the form f(x0,x1,..,xm-1) = p0*x0 + p1*x1 + ... + pm-1*xm-1, where pi are coefficients (parameters) and xi are independent arguments.

f(x0,x1,..,xm-1) represents a hyper plane of dimension m.

Since the HyperPlane is a Function, the derivatives can be obtained as well.

The parameter interface (see FunctionParam class), is used to provide an interface to the Fitting classes.

This class is in general used implicitly by the HyperPlane class only.

Example

    // form the hyper plane function of this form: 
    // 6*x0 + 2*x3 
     HyperPlane<Double> hyper(4); // 4-dim hyperplane
     hyper.parameters()[0] = 6;   
     hyper.parameters()[3] = 2;
     // Evaluate at x0=5, x3=7
     Vector<Double> x(4);
     x=0; x[0]=5; x[3]=7;
     cout << "Hypervalue: " << hyper(x) << endl;
     Hypervalue: 44
    

Template Type Argument Requirements (T)

Thrown Exceptions

Motivation

This class was created to facilitate linear constraint functions for the use of least-squares fits.

To Do

Member Description

explicit HyperPlaneParam(uInt m=0)

Construct an m-dimensional hyper plane which has m parameters. By default, the coefficients are initialized to zero. The default plane has m=0

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

Copy constructor (deep copy)

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

Copy assignment (deep copy)

virtual ~HyperPlaneParam()

Destructor

Bool operator==(const HyperPlaneParam<T> &other) const
Bool operator!=(const HyperPlaneParam<T> &other) const

Comparisons. HyperPlanes are equal if they are of the same order and have the same parameters

virtual const String &name() const

Give name of function

virtual uInt ndim() const

What is the dimension of the parameter list