Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1CombiParam.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 21:33:31 2011
Кодировка:

Поисковые слова: южная атлантическая аномалия
casacore: casa::CombiParam< T > Class Template Reference
Public Member Functions | Protected Attributes

casa::CombiParam< T > Class Template Reference
[Functionals_module_internal_classes]

Parameters for a linear combination of function objects. More...

#include <CombiParam.h>

Inheritance diagram for casa::CombiParam< T >:
casa::Function< T > casa::Functional< FunctionTraits< T >::ArgType, T > casa::Functional< Vector< FunctionTraits< T >::ArgType >, T > casa::CombiFunction< T >

List of all members.

Public Member Functions

 CombiParam ()
 The default constructor -- no functions, no parameters, nothing, the function operator returns a 0.
 CombiParam (const CombiParam< T > &other)
 Make this object a (deep) copy of other.
 CombiParam (const CombiParam< T > &other, Bool)
template<class W >
 CombiParam (const CombiParam< W > &other)
template<class W >
 CombiParam (const CombiParam< W > &other, Bool)
CombiParam< T > & operator= (const CombiParam< T > &other)
 Make this object a (deep) copy of other.
virtual ~CombiParam ()
 Destructor.
virtual const Stringname () const
 Give name of function.
uInt addFunction (const Function< T > &newFunction)
 Add a function.
uInt nFunctions () const
 Return the total number of functions.
const Function< T > & function (uInt which) const
 Return a reference to a specific Function in the combination.
const Function< T > & function (uInt which)
virtual uInt ndim () const
 Returns the dimension of functions in the linear combination.

Protected Attributes

uInt ndim_p
 Number of dimensions of underlying functions.
PtrBlock< Function< T > * > functionPtr_p
 Pointer to each added function.

Detailed Description

template<class T>
class casa::CombiParam< T >

Parameters for a linear combination of function objects.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tCombiFunction

Prerequisite

Synopsis

Given N function objects, the class describes a linear combination of the form:

    f(x) = a(0)*f(0)(x) + a(1)*f(1)(x) + ... + a(N-1)*f(N-1)(x)

where a = {a(n)} are parameters. If the combi function is used in a functional fitting process (see LinearFit ) these parameters canm be solved for. In all aspects they behave as FunctionParam values.

Member functions are added with the addFunction() method.

Example

In the following example a second order polynomial is built from 3 separate polynomials.

    Polynomial<Double> constant(0); 
    Polynomial<Double> linear(1); 
    Polynomial<Double> square(2);
    
    constant.setCoefficient(0, 1.0);   // 1
    linear.setCoefficient(1, 1.0);     // x
    square[2] = 1.0;     // x^2
    
    CombiParam<Double> combination;
    
    // form function, e0 + e1*x + e2*x^2
    combination.addFunction(constant);
    combination.addFunction(linear);
    combination.addFunction(square);

Template Type Argument Requirements (T)

Thrown Exceptions

Motivation

This class was created to allow specialization of the evaluation in a simple way.

To Do

Definition at line 111 of file CombiParam.h.


Constructor & Destructor Documentation

template<class T>
casa::CombiParam< T >::CombiParam (  ) 

The default constructor -- no functions, no parameters, nothing, the function operator returns a 0.

template<class T>
casa::CombiParam< T >::CombiParam ( const CombiParam< T > &  other  ) 

Make this object a (deep) copy of other.

template<class T>
casa::CombiParam< T >::CombiParam ( const CombiParam< T > &  other,
Bool   
) [inline]

Definition at line 121 of file CombiParam.h.

template<class T>
template<class W >
casa::CombiParam< T >::CombiParam ( const CombiParam< W > &  other  )  [inline]

Definition at line 129 of file CombiParam.h.

template<class T>
template<class W >
casa::CombiParam< T >::CombiParam ( const CombiParam< W > &  other,
Bool   
) [inline]

Definition at line 137 of file CombiParam.h.

template<class T>
virtual casa::CombiParam< T >::~CombiParam (  )  [virtual]

Destructor.


Member Function Documentation

template<class T>
uInt casa::CombiParam< T >::addFunction ( const Function< T > &  newFunction  ) 

Add a function.

All functions must have the same ndim() as the first one. Returns the (zero relative) number (i) of the function just added. The default initial parameter value (a(i)) is initialized to 1. The parameter mask is set True.

template<class T>
const Function<T>& casa::CombiParam< T >::function ( uInt  which  )  const [inline]

Return a reference to a specific Function in the combination.

Definition at line 170 of file CombiParam.h.

Referenced by casa::CombiParam< AutoDiff< T > >::CombiParam().

template<class T>
const Function<T>& casa::CombiParam< T >::function ( uInt  which  )  [inline]

Definition at line 173 of file CombiParam.h.

template<class T>
virtual const String& casa::CombiParam< T >::name (  )  const [inline, virtual]

Give name of function.

Reimplemented from casa::Function< T >.

Definition at line 154 of file CombiParam.h.

template<class T>
virtual uInt casa::CombiParam< T >::ndim (  )  const [inline, virtual]

Returns the dimension of functions in the linear combination.

Implements casa::Function< T >.

Definition at line 179 of file CombiParam.h.

template<class T>
uInt casa::CombiParam< T >::nFunctions (  )  const [inline]

Return the total number of functions.

The number is equal to the number of functions that have been added.

Definition at line 166 of file CombiParam.h.

Referenced by casa::CombiParam< AutoDiff< T > >::CombiParam(), and casa::CombiParam< AutoDiff< T > >::function().

template<class T>
CombiParam<T>& casa::CombiParam< T >::operator= ( const CombiParam< T > &  other  ) 

Make this object a (deep) copy of other.


Member Data Documentation

template<class T>
PtrBlock<Function<T> *> casa::CombiParam< T >::functionPtr_p [protected]

Pointer to each added function.

Definition at line 187 of file CombiParam.h.

Referenced by casa::CombiParam< AutoDiff< T > >::CombiParam(), and casa::CombiParam< AutoDiff< T > >::function().

template<class T>
uInt casa::CombiParam< T >::ndim_p [protected]

Number of dimensions of underlying functions.

Definition at line 179 of file CombiParam.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines