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) const |
| 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 SpectralList & | in | ) |
| Bool casa::SpectralList::add | ( | const SpectralElement & | in | ) |
Add elements to list (False if list has max length and full).
| void casa::SpectralList::clear | ( | ) |
Clear the list.
| Int casa::SpectralList::compar | ( | const SpectralElement & | p1, | |
| const SpectralElement & | p2 | |||
| ) | const [private] |
Compare two elements.
| void casa::SpectralList::evaluate | ( | Vector< MT > & | y, | |
| const Vector< MT > & | x | |||
| ) | const [inline] |
| void casa::SpectralList::evaluate | ( | Vector< MT > & | y | ) | const [inline] |
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.
| Bool casa::SpectralList::fromRecord | ( | String & | errMsg, | |
| const RecordInterface & | container | |||
| ) |
Convert to and from a Record (see details in SpectralElement).
| void casa::SpectralList::insert | ( | const SpectralList & | in | ) |
| void casa::SpectralList::insert | ( | const SpectralElement & | in | ) |
Insert in sort order in the list.
| uInt casa::SpectralList::nelements | ( | ) | const [inline] |
Get the number of elements in list.
Definition at line 114 of file SpectralList.h.
References list_p.
| Double casa::SpectralList::operator() | ( | const Double | x | ) | const |
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 |
Get element n.
| void casa::SpectralList::residual | ( | Vector< MT > & | y, | |
| const Vector< MT > & | x | |||
| ) | const [inline] |
| void casa::SpectralList::residual | ( | Vector< MT > & | y | ) | const [inline] |
Calculate the residuals at the points x; by subtracting the model from y.
x=0,1,2,.. if not given.
| 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.
1.6.1