casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
casa::MVEpoch Class Reference

A class for high precision time. More...

#include <MVEpoch.h>

Inheritance diagram for casa::MVEpoch:
casa::MeasValue

List of all members.

Public Member Functions

 MVEpoch ()
 Default constructor, generates default 0 epoch.
 MVEpoch (const MVEpoch &other)
 Copy constructor.
 MVEpoch (Double inday, Double infrac=0)
 Constructor with time in days.
 MVEpoch (const Vector< Double > &inday)
 MVEpoch (const Quantity &in)
 Constructor with Quantities.
 MVEpoch (const Quantity &in1, const Quantity &in2)
 MVEpoch (const Quantum< Vector< Double > > &in)
 MVEpoch (const Vector< Quantity > &in)
 ~MVEpoch ()
 
    

MVEpochoperator= (const MVEpoch &other)
 Copy assignment.
MVEpochoperator+= (const MVEpoch &other)
 Add times.
MVEpoch operator+ (const MVEpoch &other) const
MVEpochoperator-= (const MVEpoch &other)
 Difference times.
MVEpoch operator- (const MVEpoch &other) const
Bool operator== (const MVEpoch &other) const
 Comparisons.
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
 Tell me your type.
virtual void adjust ()
 Adjust the time to its constituent parts.
virtual void adjust (Double &res)
 Adjust value and return a normalisation value.
Double get () const
 Get value in days.
Quantity getTime () const
 Get value with units.
Quantity getTime (const Unit &unit) const
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 MeasValueclone () const
 Clone a value.
virtual Vector< DoublegetVector () 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>.
virtual Bool putValue (const Vector< Quantum< Double > > &in)
 Set the internal value if correct values and dimensions.

Static Public Member Functions

static void assure (const MeasValue &in)

Static Public Attributes

static const Double secInDay
 Constants.

Private Member Functions

Double makeDay (const Quantity &in) const
 Make days from quantity.
void addTime (Double in)
 Add time from days.

Private Attributes

Double wday
 Whole days Note that if higher precision is needed, the splitting could be in 0.001 days and fractions thereof.
Double frday
 Fraction of days.

Detailed Description

A class for high precision time.

Intended use:

Public interface

 <h3>Review Status</h3><dl><dt>Reviewed By:<dd>tcornwel<dt>Date Reviewed:<dd>1996/02/22<dt>Test programs:<dd>tMeasMath</dl> 

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

Definition at line 90 of file MVEpoch.h.


Constructor & Destructor Documentation

Default constructor, generates default 0 epoch.

casa::MVEpoch::MVEpoch ( const MVEpoch other)

Copy constructor.

casa::MVEpoch::MVEpoch ( Double  inday,
Double  infrac = 0 
)

Constructor with time in days.

casa::MVEpoch::MVEpoch ( const Vector< Double > &  inday)

Constructor with Quantities.

casa::MVEpoch::MVEpoch ( const Quantity in1,
const Quantity in2 
)

    


Member Function Documentation

void casa::MVEpoch::addTime ( Double  in) [private]

Add time from days.

virtual void casa::MVEpoch::adjust ( ) [virtual]

Adjust the time to its constituent parts.

The returned result is always 1.0

Reimplemented from casa::MeasValue.

virtual void casa::MVEpoch::adjust ( Double val) [virtual]

Adjust value and return a normalisation value.

Reimplemented from casa::MeasValue.

static void casa::MVEpoch::assure ( const MeasValue in) [static]
virtual MeasValue* casa::MVEpoch::clone ( ) const [virtual]

Clone a value.

Implements casa::MeasValue.

Get value in days.

Get value of integer days.

Get fraction of days.

virtual Vector<Quantum<Double> > casa::MVEpoch::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 casa::MeasValue.

Get value with units.

Quantity casa::MVEpoch::getTime ( const Unit unit) const
virtual Vector<Double> casa::MVEpoch::getVector ( ) const [virtual]

Get the value in internal units.

Implements casa::MeasValue.

Double casa::MVEpoch::makeDay ( const Quantity in) const [private]

Make days from quantity.

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

Add times.

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

Difference times.

MVEpoch& casa::MVEpoch::operator= ( const MVEpoch other)

Copy assignment.

Bool casa::MVEpoch::operator== ( const MVEpoch other) const

Comparisons.

virtual void casa::MVEpoch::print ( ostream &  os) const [virtual]

Print a value.

Implements casa::MeasValue.

virtual Bool casa::MVEpoch::putValue ( const Vector< Quantum< Double > > &  in) [virtual]

Set the internal value if correct values and dimensions.

Implements casa::MeasValue.

virtual void casa::MVEpoch::putVector ( const Vector< Double > &  in) [virtual]

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

Implements casa::MeasValue.

virtual uInt casa::MVEpoch::type ( ) const [virtual]

Tell me your type.

Implements casa::MeasValue.


Member Data Documentation

Fraction of days.

Definition at line 198 of file MVEpoch.h.

Constants.

Definition at line 143 of file MVEpoch.h.

Whole days Note that if higher precision is needed, the splitting could be in 0.001 days and fractions thereof.

Definition at line 196 of file MVEpoch.h.


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