Loading...
Searching...
No Matches
casacore::MVDouble Class Reference
casa package (libcasa_casa) » Quanta_module

More...

`#include <MVDouble.h>`

## Public Member Functions

| MVDouble ()
| Default constructor: generate a zero value.
| MVDouble (const MVDouble &other)
| Copy constructor.
MVDouble & | operator= (const MVDouble &other)
| Copy assignment.
| MVDouble (Double d)
| Constructor from Double.
| MVDouble (const Quantity &other)
| Constructor from Quantum : value taken will be the canonical value.
| MVDouble (const Quantum< Vector< Double > > &other)
| MVDouble (const Vector< Double > &other)
| Constructor from Vector.
| MVDouble (const Vector< Quantity > &other)
| ~MVDouble ()
| Destructor.
| operator Double () const
| Conversion operator.
MVDouble & | operator+= (const MVDouble &other)
| Addition.
MVDouble & | operator-= (const MVDouble &other)
Bool | operator== (const MVDouble &other) const
| Comparisons.
Bool | operator!= (const MVDouble &other) const
Bool | near (const MVDouble &other, Double tol=1e-13) const
Bool | nearAbs (const MVDouble &other, Double tol=1e-13) const
virtual void | print (ostream &os) const
| Print data.
virtual MeasValue * | clone () const
| Clone.
virtual Vector< Double > | getVector () const
| Adjust value: taken from base class, a NOP.
virtual void | putVector (const Vector< Double > &in)
| Set the value from internal units (set 0 for empty vector).
virtual Vector< Quantum< Double > > | getRecordValue () const
| Get the internal value as a Vector<Quantity>.
virtual Bool | putValue (const Vector< Quantum< Double > > &in)
| Set the internal value if correct values and dimensions.
Public Member Functions inherited from casacore::MeasValue
void | dummy_constr () const
| Each derived class should have at least the following constructors:
virtual | ~MeasValue ()
| Destructor.
void | dummy_operator () const
| The following operators should be present at least.
virtual Vector< Quantum< Double > > | getXRecordValue () const
virtual Vector< Quantum< Double > > | getTMRecordValue () const
virtual void | adjust ()
| Some of the Measure values used need the occasional adjustments to proper values.
virtual void | adjust (Double &val)
| Adjust value and return a normalisation value.
virtual void | readjust (Double val)
| Re-adjust, i.e.

## Static Public Member Functions

static void | assure (const MeasValue &in)
| Tell me your type.

## Private Attributes

Double | val
| Value.

## Detailed Description

Class to distinguish external and Measure internal Double

### Intended use:

Public interface

### Review Status

Reviewed By:
  tcornwel
Date Reviewed:
  1996/02/23
Test programs:
  tMeasMath

### Prerequisite

- MeasValue

### Etymology

From Measure, Value and Double

### Synopsis

An MVDouble is a simple Double, to be used in simple, single value Measures. Requirements can be found in the MeasValue base class.
The only reasonable constructor is (but all MeasValue constructors are present) MVDouble(Double); and an operator Double takes care of all other possibilities. Its external use is for MeasConvert, to distinguish between input in internal Measure units, and values which have to have units applied.

### Example

See e.g. MFrequency

### Motivation

To aid coordinate transformations possibilities

Definition at line 81 of file MVDouble.h.

## Constructor & Destructor Documentation

## MVDouble() [1/7]

casacore::MVDouble::MVDouble | ( |  | ) |

Default constructor: generate a zero value.

Referenced by MVDouble(), near(), nearAbs(), operator!=(), operator+=(), operator-=(), operator=(), and operator==().

## MVDouble() [2/7]

casacore::MVDouble::MVDouble | ( | const MVDouble & | other | ) |

Copy constructor.

References MVDouble().

## MVDouble() [3/7]

casacore::MVDouble::MVDouble | ( | Double | d | ) |

Constructor from Double.

## MVDouble() [4/7]

casacore::MVDouble::MVDouble | ( | const Quantity & | other | ) |

Constructor from Quantum : value taken will be the canonical value.

## MVDouble() [5/7]

casacore::MVDouble::MVDouble | ( | const Quantum< Vector< Double > > & | other | ) |

## MVDouble() [6/7]

casacore::MVDouble::MVDouble | ( | const Vector< Double > & | other | ) |

Constructor from Vector.

A zero value will be taken for an empty vector, the canonical value for a quantum vector.

### Thrown Exceptions

- AipsError if vector length > 1

## MVDouble() [7/7]

casacore::MVDouble::MVDouble | ( | const Vector< Quantity > & | other | ) |

## ~MVDouble()

casacore::MVDouble::~MVDouble | ( |  | ) |

Destructor.

## Member Function Documentation

## assure()

void casacore::MVDouble::assure | ( | const MeasValue & | in | ) |

static

Tell me your type.

## clone()

virtual MeasValue * casacore::MVDouble::clone | ( |  | ) | const

virtual

Clone.

Implements casacore::MeasValue.

## getRecordValue()

virtual Vector< Quantum< Double > > casacore::MVDouble::getRecordValue | ( |  | ) | const

virtual

Get the internal value as a Vector<Quantity>.

Usable in records. The getXRecordValue() gets additional information for records. Note that the Vectors could be empty.

Implements casacore::MeasValue.

## getVector()

virtual Vector< Double > casacore::MVDouble::getVector | ( |  | ) | const

virtual

Adjust value: taken from base class, a NOP.

Get the value in internal units

Implements casacore::MeasValue.

## near()

Bool casacore::MVDouble::near | ( | const MVDouble & | other,
|  | Double | tol = 1e-13 ) const

References MVDouble().

## nearAbs()

Bool casacore::MVDouble::nearAbs | ( | const MVDouble & | other,
|  | Double | tol = 1e-13 ) const

References MVDouble().

## operator Double()

casacore::MVDouble::operator Double | ( |  | ) | const

Conversion operator.

## operator!=()

Bool casacore::MVDouble::operator!= | ( | const MVDouble & | other | ) | const

References MVDouble().

## operator+=()

MVDouble & casacore::MVDouble::operator+= | ( | const MVDouble & | other | ) |

Addition.

References MVDouble().

## operator-=()

MVDouble & casacore::MVDouble::operator-= | ( | const MVDouble & | other | ) |

References MVDouble().

## operator=()

MVDouble & casacore::MVDouble::operator= | ( | const MVDouble & | other | ) |

Copy assignment.

References MVDouble().

## operator==()

Bool casacore::MVDouble::operator== | ( | const MVDouble & | other | ) | const

Comparisons.

References MVDouble().

## print()

virtual void casacore::MVDouble::print | ( | ostream & | os | ) | const

virtual

Print data.

Implements casacore::MeasValue.

## putValue()

virtual Bool casacore::MVDouble::putValue | ( | const Vector< Quantum< Double > > & | in | ) |

virtual

Set the internal value if correct values and dimensions.

Implements casacore::MeasValue.

## putVector()

virtual void casacore::MVDouble::putVector | ( | const Vector< Double > & | in | ) |

virtual

Set the value from internal units (set 0 for empty vector).

Implements casacore::MeasValue.

## Member Data Documentation

## val

Double casacore::MVDouble::val

private

Value.

Definition at line 155 of file MVDouble.h.

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

- casa/Quanta/MVDouble.h