Loading...
Searching...
No Matches
casacore::QVector< T > Class Template Reference
casa package (libcasa_casa) » Quanta_module

More...

`#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< 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 > > & | operator+= (const Quantum< Vector< T > > &other)
| In place arithmetic functions: left hand side changed in place.
Quantum< Vector< T > > & | operator-= (const Quantum< Vector< T > > &other)
Quantum< Vector< T > > & | operator*= (const Quantum< Vector< T > > &other)
Quantum< Vector< T > > & | operator/= (const Quantum< 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 > | 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 .
void | convert ()
| Convert a Quantum to specified units.
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 uInt | myType ()
Protected Attributes inherited from casacore::QBase
Unit | qUnit

## Detailed Description

template<class T>
class casacore::QVector< T >

Specialization for Quantum<Vector<T> >

### Intended use:

Public interface

### Prerequisite

- Quantum

### Etymology

Vector of quantities.

### Synopsis

Objects of type Quantum<Vector<Double> > are used often in our code. We need a way to access individual elements easily

Definition at line 58 of file QVector.h.

## Constructor & Destructor Documentation

## QVector() [1/3]

template<class T>

casacore::QVector< T >::QVector | ( |  | ) |

zero elements

## QVector() [2/3]

template<class T>

casacore::QVector< T >::QVector | ( | const Vector< T > & | v,
|  | const Unit & | u )

## QVector() [3/3]

template<class T>

casacore::QVector< T >::QVector | ( | const Vector< Quantum< T > > & | q | ) |

convert a Vector of Quanta to a QVector.

Useful when reading a table column of Quanta. All elements in q will be converted to units of the first element in q. An exception will be thrown if not all elements in q conform to the same unit.

## Member Function Documentation

## max()

template<class T>

Quantum< T > casacore::QVector< T >::max | ( |  | ) | const

## min()

template<class T>

Quantum< T > casacore::QVector< T >::min | ( |  | ) | const

## nelements()

template<class T>

size_t casacore::QVector< T >::nelements | ( |  | ) | const

## operator+()

template<class T>

QVector< T > casacore::QVector< T >::operator+ | ( | const QVector< T > & | d | ) | const

add operators as needed

## operator-()

template<class T>

QVector< T > casacore::QVector< T >::operator- | ( | const QVector< T > & | d | ) | const

## operator/()

template<class T>

QVector< T > casacore::QVector< T >::operator/ | ( | T | d | ) | const

## operator[]()

template<class T>

Quantum< T > casacore::QVector< T >::operator[] | ( | uInt | index | ) | const

access single element

## scale()

template<class T>

void casacore::QVector< T >::scale | ( | T | d | ) |

## size()

template<class T>

size_t casacore::QVector< T >::size | ( |  | ) | const

The documentation for this class was generated from the following file:

- casa/Quanta/QVector.h