casacore
|
Class to distinguish external and Measure internal Double. More...
#include <MVDouble.h>
Public Member Functions | |
MVDouble () | |
Default constructor: generate a zero value. More... | |
MVDouble (const MVDouble &other) | |
Copy constructor. More... | |
MVDouble & | operator= (const MVDouble &other) |
Copy assignment. More... | |
MVDouble (Double d) | |
Constructor from Double. More... | |
MVDouble (const Quantity &other) | |
Constructor from Quantum : value taken will be the canonical value. More... | |
MVDouble (const Quantum< Vector< Double > > &other) | |
MVDouble (const Vector< Double > &other) | |
Constructor from Vector. More... | |
MVDouble (const Vector< Quantity > &other) | |
~MVDouble () | |
Destructor. More... | |
operator Double () const | |
Conversion operator. More... | |
MVDouble & | operator+= (const MVDouble &other) |
Addition. More... | |
MVDouble & | operator-= (const MVDouble &other) |
Bool | operator== (const MVDouble &other) const |
Comparisons. More... | |
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. More... | |
virtual MeasValue * | clone () const |
Clone. More... | |
virtual Vector< Double > | getVector () const |
Adjust value: taken from base class, a NOP. More... | |
virtual void | putVector (const Vector< Double > &in) |
Set the value from internal units (set 0 for empty vector) More... | |
virtual Vector< Quantum< Double > > | getRecordValue () const |
Get the internal value as a Vector<Quantity> . More... | |
virtual Bool | putValue (const Vector< Quantum< Double > > &in) |
Set the internal value if correct values and dimensions. More... | |
Public Member Functions inherited from casacore::MeasValue | |
void | dummy_constr () const |
Each derived class should have at least the following constructors: More... | |
virtual | ~MeasValue () |
Destructor. More... | |
void | dummy_operator () const |
The following operators should be present at least. More... | |
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. More... | |
virtual void | adjust (Double &val) |
Adjust value and return a normalisation value. More... | |
virtual void | readjust (Double val) |
Re-adjust, i.e. More... | |
Static Public Member Functions | |
static void | assure (const MeasValue &in) |
Tell me your type. More... | |
Private Attributes | |
Double | val |
Value. More... | |
Class to distinguish external and Measure internal Double.
Public interface
From Measure, Value and Double
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.
See e.g. MFrequency
To aid coordinate transformations possibilities
Definition at line 83 of file MVDouble.h.
casacore::MVDouble::MVDouble | ( | ) |
Default constructor: generate a zero value.
casacore::MVDouble::MVDouble | ( | const MVDouble & | other | ) |
Copy constructor.
casacore::MVDouble::MVDouble | ( | Double | d | ) |
Constructor from Double.
casacore::MVDouble::MVDouble | ( | const Quantity & | other | ) |
Constructor from Quantum : value taken will be the canonical value.
casacore::MVDouble::~MVDouble | ( | ) |
Destructor.
|
static |
Tell me your type.
|
virtual |
Clone.
Implements casacore::MeasValue.
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.
Adjust value: taken from base class, a NOP.
Get the value in internal units
Implements casacore::MeasValue.
casacore::MVDouble::operator Double | ( | ) | const |
Conversion operator.
|
virtual |
Print data.
Implements casacore::MeasValue.
Set the internal value if correct values and dimensions.
Implements casacore::MeasValue.
Set the value from internal units (set 0 for empty vector)
Implements casacore::MeasValue.
|
private |
Value.
Definition at line 157 of file MVDouble.h.