casacore
|
Specialization for Quantum<Vector<T> > More...
#include <QVector.h>
Public Member Functions | |
QVector () | |
zero elements More... | |
QVector (const Vector< T > &v, const Unit &u) | |
QVector (const Vector< Quantum< T > > &q) | |
convert a Vector of Quanta to a QVector. More... | |
Quantum< T > | operator[] (uInt index) const |
access single element More... | |
size_t | size () const |
size_t | nelements () const |
void | scale (T d) |
QVector< T > | operator+ (const QVector< T > &d) const |
add operators as needed More... | |
QVector< T > | operator- (const QVector< T > &d) const |
QVector< T > | operator/ (T d) const |
Quantum< T > | min () const |
Quantum< T > | max () const |
Public Member Functions inherited from casacore::Quantum< Vector< T > > | |
Quantum () | |
Default constructor, generates '0'. More... | |
Quantum (const Quantum< Vector< T > > &other) | |
Copy constructor (deep copy) More... | |
Quantum (const Vector< T > &factor) | |
Construct undimensioned quantum (i.e. More... | |
Quantum (const Vector< T > &factor, const Unit &s) | |
Construct dimensioned quantum (e.g. More... | |
Quantum (const Vector< T > &factor, const QBase &other) | |
Construct quantum with unit copied from existing quantum. More... | |
Quantum< Vector< T > > & | operator= (const Quantum< Vector< T > > &other) |
Assignment (deep copy) More... | |
const Quantum< Vector< T > > & | operator+ () const |
Unary operations. More... | |
Quantum< Vector< T > > | operator+ (const Quantum< Vector< T > > &other) const |
Arithmetic operators: return Quantum<T> More... | |
Quantum< Vector< T > > | operator- () const |
Quantum< Vector< T > > | operator- (const Quantum< Vector< T > > &other) const |
Quantum< Vector< T > > & | operator+= (const Quantum< Vector< T > > &other) |
In place arithmetic functions: left hand side changed in place. More... | |
Quantum< Vector< T > > & | operator+= (const Vector< T > &other) |
Quantum< Vector< T > > & | operator-= (const Quantum< Vector< T > > &other) |
Quantum< Vector< T > > & | operator-= (const Vector< T > &other) |
Quantum< Vector< T > > & | operator*= (const Quantum< Vector< T > > &other) |
Quantum< Vector< T > > & | operator*= (const Vector< T > &other) |
Quantum< Vector< T > > & | operator/= (const Quantum< Vector< T > > &other) |
Quantum< Vector< T > > & | operator/= (const Vector< T > &other) |
Quantum< Vector< T > > | operator* (const Quantum< Vector< T > > &other) const |
Quantum< Vector< T > > | operator/ (const Quantum< Vector< T > > &other) const |
const Vector< T > & | getValue () const |
Get value of quantum in current units (i.e. More... | |
Vector< T > & | getValue () |
Vector< T > | getValue (const Unit &other, Bool requireConform=False) const |
Get value in specified units. More... | |
Vector< T > | getBaseValue () const |
Get value in canonical base units. More... | |
virtual const Unit & | getFullUnit () const |
Get the unit (as Unit) that is attached to the Quantum. More... | |
void | convert () |
Convert a Quantum to specified units. More... | |
void | convert (const Unit &s) |
Convert to specified units; any remainder will be expressed in canonical units. More... | |
void | convert (const Quantum< Vector< T > > &other) |
Convert a Quantum to units from specified quantum (ibid example) More... | |
virtual QBase * | clone () const |
Get a copy of Quantum. More... | |
virtual void | print (ostream &os) const |
Print a Quantum. More... | |
virtual uInt | type () const |
Get the type (using QuantumType) of derived Quantum (faster than Strings) More... | |
void | scale (const Vector< T > &factor) |
Re-specify parts of a quantum. More... | |
void | setValue (const Vector< T > &val) |
Set the value without changing units. More... | |
Bool | check (const UnitVal &uv) const |
Check if of specified type. More... | |
void | assure (const UnitVal &uv) const |
Assert correct kind. More... | |
Quantum< Vector< T > > | get () const |
Return a Quantum converted to specified units. More... | |
Quantum< Vector< T > > | get (const Unit &s) const |
Convert to specified units; any remainder will be expressed in canonical units. More... | |
Quantum< Vector< T > > | get (const Quantum< Vector< T > > &other) const |
Convert a Quantum to units from specified quantum (ibid example) More... | |
Public Member Functions inherited from casacore::QBase | |
QBase () | |
Default constructor, generates "". More... | |
QBase (const Unit &s) | |
Construct dimensioned QBase (e.g. More... | |
virtual | ~QBase () |
Destructor. More... | |
const String & | getUnit () const |
Get units of QBase. More... | |
void | setUnit (const Unit &s) |
Re-specify parts of a QBase. More... | |
void | setUnit (const QBase &other) |
Set new unit, copied from specified QBase, without changing value. More... | |
Bool | isConform (const Unit &s) const |
Check for conformal matching units (e.g. More... | |
Bool | isConform (const QBase &other) const |
Using units specified in QBase. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from casacore::Quantum< Vector< T > > | |
static uInt | myType () |
static Bool | read (Quantity &res, const String &in) |
Set the value and unit deduced from input string Caution: At the moment the implementation can only convert scalars to the appropiate Quantum; If format for Array input defined, it could easily be changed; In addition recognition of date/time/angle still has to be added More... | |
static Bool | read (Quantity &res, MUString &in) |
Protected Attributes inherited from casacore::QBase | |
Unit | qUnit |
Specialization for Quantum<Vector<T> >
Public interface
Vector of quantities.
Objects of type Quantum<Vector<Double> > are used often in our code. We need a way to access individual elements easily
casacore::QVector< T >::QVector | ( | ) |
zero elements
casacore::QVector< T >::QVector | ( | const Vector< T > & | v, |
const Unit & | u | ||
) |
casacore::QVector< T >::QVector | ( | const Vector< Quantum< T > > & | q | ) |
Quantum<T> casacore::QVector< T >::max | ( | ) | const |
Quantum<T> casacore::QVector< T >::min | ( | ) | const |
size_t casacore::QVector< T >::nelements | ( | ) | const |
QVector<T> casacore::QVector< T >::operator+ | ( | const QVector< T > & | d | ) | const |
add operators as needed
QVector<T> casacore::QVector< T >::operator- | ( | const QVector< T > & | d | ) | const |
QVector<T> casacore::QVector< T >::operator/ | ( | T | d | ) | const |
Quantum<T> casacore::QVector< T >::operator[] | ( | uInt | index | ) | const |
access single element
void casacore::QVector< T >::scale | ( | T | d | ) |
size_t casacore::QVector< T >::size | ( | ) | const |