Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/classcasa_1_1SpectralList.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 22:05:12 2011 Кодировка: Поисковые слова: 47 п п п п п п |
A set of SpectralElements. More...
#include <SpectralList.h>
Public Member Functions | |
SpectralList () | |
Default constructor creates an empty list. | |
SpectralList (uInt nmax) | |
Construct a list with a maximum length of n (0: unlimited length). | |
SpectralList (const SpectralElement &in) | |
Construct with an initial element. | |
SpectralList (const SpectralList &other) | |
Copy constructor (deep copy). | |
~SpectralList () | |
Destructor. | |
SpectralList & | operator= (const SpectralList &other) |
Assignment (copy semantics). | |
Double | operator() (const Double x) const |
Evaluate the value of the sum of the elements at x. | |
const SpectralElement & | operator[] (const uInt n) const |
Get element n. | |
SpectralElement & | operator[] (const uInt n) |
uInt | nelements () const |
Get the number of elements in list. | |
template<class MT > | |
void | evaluate (Vector< MT > &y) const |
Get the profile values for all elements in list. | |
template<class MT > | |
void | evaluate (Vector< MT > &y, const Vector< MT > &x) const |
template<class MT > | |
void | residual (Vector< MT > &y) const |
Calculate the residuals at the points x; by subtracting the model from y. | |
template<class MT > | |
void | residual (Vector< MT > &y, const Vector< MT > &x) const |
Bool | add (const SpectralElement &in) |
Add elements to list (False if list has max length and full). | |
Bool | add (const SpectralList &in) |
void | insert (const SpectralElement &in) |
Insert in sort order in the list. | |
void | insert (const SpectralList &in) |
Bool | set (const SpectralElement &in, const uInt which) |
Set an element in the list. | |
void | clear () |
Clear the list. | |
void | set (const uInt nmax) |
Set a maximum size of the list. | |
void | sort () |
Sort the list on the first parameter (i.e. | |
Bool | fromRecord (String &errMsg, const RecordInterface &container) |
Convert to and from a Record (see details in SpectralElement). | |
Bool | toRecord (RecordInterface &container) const |
Private Member Functions | |
Int | compar (const SpectralElement &p1, const SpectralElement &p2) |
Compare two elements. | |
Private Attributes | |
uInt | nmax_p |
Max length allowed of list. | |
PtrBlock< SpectralElement * > | list_p |
List of elements. |
A set of SpectralElements.
Public interface
From spectral line and element list
The SpectralList class is a container for a set of spectral elements.
The list can be used in the SpectralFit class and in the SpectralEstimate class.
To have a container for fitting of spectral profiles to an observed spectrum
Definition at line 81 of file SpectralList.h.
casa::SpectralList::SpectralList | ( | ) |
Default constructor creates an empty list.
casa::SpectralList::SpectralList | ( | uInt | nmax | ) | [explicit] |
Construct a list with a maximum length of n (0: unlimited length).
casa::SpectralList::SpectralList | ( | const SpectralElement & | in | ) | [explicit] |
Construct with an initial element.
casa::SpectralList::SpectralList | ( | const SpectralList & | other | ) |
Copy constructor (deep copy).
casa::SpectralList::~SpectralList | ( | ) |
Destructor.
Bool casa::SpectralList::add | ( | const SpectralElement & | in | ) |
Add elements to list (False if list has max length and full).
Bool casa::SpectralList::add | ( | const SpectralList & | in | ) |
void casa::SpectralList::clear | ( | ) |
Clear the list.
Int casa::SpectralList::compar | ( | const SpectralElement & | p1, | |
const SpectralElement & | p2 | |||
) | [private] |
Compare two elements.
void casa::SpectralList::evaluate | ( | Vector< MT > & | y | ) | const |
Get the profile values for all elements in list.
The evaluation is for the length of the given prof
, assuming x values of 0,1,... if no x given.
void casa::SpectralList::evaluate | ( | Vector< MT > & | y, | |
const Vector< MT > & | x | |||
) | const |
Bool casa::SpectralList::fromRecord | ( | String & | errMsg, | |
const RecordInterface & | container | |||
) |
Convert to and from a Record (see details in SpectralElement).
void casa::SpectralList::insert | ( | const SpectralElement & | in | ) |
Insert in sort order in the list.
void casa::SpectralList::insert | ( | const SpectralList & | in | ) |
uInt casa::SpectralList::nelements | ( | ) | const [inline] |
Get the number of elements in list.
Definition at line 114 of file SpectralList.h.
References list_p, and casa::PtrBlock< T >::nelements().
Evaluate the value of the sum of the elements at x.
SpectralList& casa::SpectralList::operator= | ( | const SpectralList & | other | ) |
Assignment (copy semantics).
SpectralElement& casa::SpectralList::operator[] | ( | const uInt | n | ) |
const SpectralElement& casa::SpectralList::operator[] | ( | const uInt | n | ) | const |
void casa::SpectralList::residual | ( | Vector< MT > & | y | ) | const |
Calculate the residuals at the points x; by subtracting the model from y.
x=0,1,2,.. if not given.
void casa::SpectralList::residual | ( | Vector< MT > & | y, | |
const Vector< MT > & | x | |||
) | const |
void casa::SpectralList::set | ( | const uInt | nmax | ) |
Set a maximum size of the list.
Bool casa::SpectralList::set | ( | const SpectralElement & | in, | |
const uInt | which | |||
) |
Set an element in the list.
Return False if more than one place beyond end of list; or if beyond max size.
void casa::SpectralList::sort | ( | ) |
Sort the list on the first parameter (i.e.
peak value for Gaussian)
Bool casa::SpectralList::toRecord | ( | RecordInterface & | container | ) | const |
PtrBlock<SpectralElement *> casa::SpectralList::list_p [private] |
uInt casa::SpectralList::nmax_p [private] |
Max length allowed of list.
Definition at line 170 of file SpectralList.h.