MVEpoch.h

Classes

MVEpoch -- A class for high precision time (full description)

class MVEpoch : public MeasValue

Interface

Public Members
MVEpoch()
MVEpoch(const MVEpoch &other)
MVEpoch(Double inday, Double infrac=0)
MVEpoch(const Vector<Double> &inday)
MVEpoch(const Quantity &in)
MVEpoch(const Quantity &in1, const Quantity &in2)
MVEpoch(const Quantum<Vector<Double> > &in)
MVEpoch(const Vector<Quantity> &in)
~MVEpoch()
MVEpoch &operator=(const MVEpoch &other)
MVEpoch &operator+=(const MVEpoch &other)
MVEpoch operator+(const MVEpoch &other) const
MVEpoch &operator-=(const MVEpoch &other)
MVEpoch operator-(const MVEpoch &other) const
Bool operator==(const MVEpoch &other) const
Bool operator!=(const MVEpoch &other) const
Bool near(const MVEpoch &other, Double tol = 1e-13) const
Bool nearAbs(const MVEpoch &other, Double tol = 1e-13) const
virtual uInt type() const
static void assure(const MeasValue &in)
virtual void adjust()
virtual void adjust(Double &res)
Double get() const
Quantity getTime() const
Quantity getTime(const Unit &unit) const
Double getDay() const
Double getDayFraction() const
virtual void print(ostream &os) const
virtual MeasValue *clone() const
virtual Vector<Double> getVector() const
virtual void putVector(const Vector<Double> &in)
virtual Vector<Quantum<Double> > getRecordValue() const
virtual Bool putValue(const Vector<Quantum<Double> > &in)
Private Members
Double makeDay(const Quantity &in) const
void addTime(Double in)

Description

Review Status

Reviewed By:
tcornwel
Date Reviewed:
1996/02/22
Programs:
Tests:

Prerequisite

Etymology

MVEpoch from Measure, Value and Epoch

Synopsis

MVEpoch is a class for high precision (10-16 s) epochs over a period of 6*1010 a.
MVEpochs can be compared, a time interval can be added or subtracted, and the time difference can be found. The following constructors:

Example

See MEpoch

Motivation

To have high precision timing

To Do

Member Description

MVEpoch()

Default constructor, generates default 0 epoch

MVEpoch(const MVEpoch &other)

Copy constructor

MVEpoch(Double inday, Double infrac=0)
MVEpoch(const Vector<Double> &inday)

Constructor with time in days

MVEpoch(const Quantity &in)
MVEpoch(const Quantity &in1, const Quantity &in2)
MVEpoch(const Quantum<Vector<Double> > &in)
MVEpoch(const Vector<Quantity> &in)

Constructor with Quantities

~MVEpoch()

MVEpoch &operator=(const MVEpoch &other)

Copy assignment

MVEpoch &operator+=(const MVEpoch &other)
MVEpoch operator+(const MVEpoch &other) const

Add times

MVEpoch &operator-=(const MVEpoch &other)
MVEpoch operator-(const MVEpoch &other) const

Difference times

Bool operator==(const MVEpoch &other) const
Bool operator!=(const MVEpoch &other) const
Bool near(const MVEpoch &other, Double tol = 1e-13) const
Bool nearAbs(const MVEpoch &other, Double tol = 1e-13) const

Comparisons

virtual uInt type() const
static void assure(const MeasValue &in)

Tell me your type

virtual void adjust()
virtual void adjust(Double &res)

Adjust the time to its constituent parts. The returned result is always 1.0

Double get() const

Get value in days

Quantity getTime() const
Quantity getTime(const Unit &unit) const

Get value with units

Double getDay() const

Get value of integer days

Double getDayFraction() const

Get fraction of days

virtual void print(ostream &os) const

Print a value

virtual MeasValue *clone() const

Clone a value

virtual Vector<Double> getVector() const

Get the value in internal units

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>. Usable in records. The getXRecordValue() gets additional information for records. Note that the Vectors could be empty.

virtual Bool putValue(const Vector<Quantum<Double> > &in)

Set the internal value if correct values and dimensions

Double makeDay(const Quantity &in) const

Make days from quantity

void addTime(Double in)

Add time from days