|
casacore
|
#include <QVector.h>
Public Member Functions | |
| QVector () | |
| zero elements | |
| QVector (const Vector< T > &v, const Unit &u) | |
| QVector (const Vector< Quantum< T > > &q) | |
| convert a Vector of Quanta to a QVector. | |
| Quantum< T > | operator[] (uInt index) const |
| access single element | |
| size_t | size () const |
| size_t | nelements () const |
| void | scale (T d) |
| QVector< T > | operator+ (const QVector< T > &d) const |
| add operators as needed | |
| 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'. | |
| Quantum (const Quantum< Vector< T > > &other) | |
| Copy constructor (deep copy) | |
| Quantum (const Vector< T > &factor) | |
| Construct undimensioned quantum (i.e. | |
| Quantum (const Vector< T > &factor, const Unit &s) | |
| Construct dimensioned quantum (e.g. | |
| Quantum (const Vector< T > &factor, const QBase &other) | |
| Construct quantum with unit copied from existing quantum. | |
| Quantum< Vector< T > > & | operator= (const Quantum< Vector< T > > &other) |
| Assignment (deep copy) | |
| const Quantum< Vector< T > > & | operator+ () const |
| Unary operations. | |
| Quantum< Vector< T > > | operator+ (const Quantum< Vector< T > > &other) const |
| Arithmetic operators: return Quantum<T> | |
| 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. | |
| 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. | |
| Vector< T > & | getValue () |
| Vector< T > | getValue (const Unit &other, Bool requireConform=False) const |
| Get value in specified units. | |
| Vector< T > | getBaseValue () const |
| Get value in canonical base units. | |
| virtual const Unit & | getFullUnit () const |
| Get the unit (as Unit) that is attached to the Quantum. | |
| void | scale (const Vector< T > &factor) |
| Re-specify parts of a quantum | |
| void | setValue (const Vector< T > &val) |
| Set the value without changing units. | |
| Bool | check (const UnitVal &uv) const |
| Check if of specified type. | |
| void | assure (const UnitVal &uv) const |
| Assert correct kind. | |
| Quantum< Vector< T > > | get () const |
| Return a Quantum converted to specified units | |
| Quantum< Vector< T > > | get (const Unit &s) const |
| Convert to specified units; any remainder will be expressed in canonical units. | |
| Quantum< Vector< T > > | get (const Quantum< Vector< T > > &other) const |
| Convert a Quantum to units from specified quantum (ibid example) | |
| void | convert () |
| Convert a Quantum to specified units. | |
| void | convert (const Unit &s) |
| Convert to specified units; any remainder will be expressed in canonical units. | |
| void | convert (const Quantum< Vector< T > > &other) |
| Convert a Quantum to units from specified quantum (ibid example) | |
| virtual QBase * | clone () const |
| Get a copy of Quantum. | |
| virtual void | print (ostream &os) const |
| Print a Quantum. | |
| virtual uInt | type () const |
| Get the type (using QuantumType) of derived Quantum (faster than Strings) | |
Public Member Functions inherited from casacore::QBase | |
| QBase () | |
| Default constructor, generates "". | |
| QBase (const Unit &s) | |
| Construct dimensioned QBase (e.g. | |
| virtual | ~QBase () |
| Destructor. | |
| const String & | getUnit () const |
| Get units of QBase | |
| void | setUnit (const Unit &s) |
| Re-specify parts of a QBase | |
| void | setUnit (const QBase &other) |
| Set new unit, copied from specified QBase, without changing value. | |
| Bool | isConform (const Unit &s) const |
| Check for conformal matching units (e.g. | |
| Bool | isConform (const QBase &other) const |
| Using units specified in QBase. | |
Additional Inherited Members | |
Static Public Member Functions inherited from casacore::Quantum< Vector< T > > | |
| 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 | |
| static Bool | read (Quantity &res, MUString &in) |
| static uInt | myType () |
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 |