2 #ifndef SYDEVS_TIME_POINT_H_
3 #define SYDEVS_TIME_POINT_H_
189 std::vector<int16> digits_;
218 return digits_.size();
time_point()
Constructs a zero time_point object.
Definition: time_point.cpp:11
time_point & operator=(const time_point &)=default
Copy assignment.
arraynd< bool, ndims > operator==(const arraynd< T, ndims > &lhs, const arraynd< T, ndims > &rhs)
Definition: arraynd.h:931
bool operator>(const time_point &rhs) const
Returns true if the time_point object is greater than rhs.
Definition: time_point.cpp:293
int64 scale_digit(scale precision) const
Returns the digit associated with the precision scale.
Definition: time_point.cpp:28
std::ostream & operator<<(std::ostream &os, const arraynd< T, ndims > &rhs)
Definition: arraynd.h:1156
int64 nscales() const
Returns the length of the vector of digits.
Definition: time_point.h:216
scale precision() const
Returns the precision of the shortest non-zero digit.
Definition: time_point.h:210
~time_point()=default
Destructor.
bool operator<(const time_point &rhs) const
Returns true if the time_point object is less than rhs.
Definition: time_point.cpp:286
int64 sign() const
Returns the sign (+1 or -1) of the time_point object.
Definition: time_point.h:204
arraynd< bool, ndims > operator>(const arraynd< T, ndims > &lhs, const arraynd< T, ndims > &rhs)
Definition: arraynd.h:901
arraynd< bool, ndims > operator<(const arraynd< T, ndims > &lhs, const arraynd< T, ndims > &rhs)
Definition: arraynd.h:891
A data type which represents the general concept of scale as a dimensionless power of 1000...
Definition: scale.h:70
bool operator>=(const time_point &rhs) const
Returns true if the time_point object is at least rhs.
Definition: time_point.cpp:307
A data structure which represents a point in time as an arbitrary-precision multiple of its shortest ...
Definition: time_point.h:84
int64 epoch_phase(scale precision) const
Returns the 5-scale (epoch) offset from the left.
Definition: time_point.cpp:54
arraynd< bool, ndims > operator<=(const arraynd< T, ndims > &lhs, const arraynd< T, ndims > &rhs)
Definition: arraynd.h:911
int64 scale_phase(scale precision) const
Returns the single-scale offset from the left.
Definition: time_point.cpp:36
bool operator!=(const time_point &rhs) const
Returns true if the time_point object does not equal rhs.
Definition: time_point.cpp:279
arraynd< bool, ndims > operator>=(const arraynd< T, ndims > &lhs, const arraynd< T, ndims > &rhs)
Definition: arraynd.h:921
bool operator<=(const time_point &rhs) const
Returns true if the time_point object is at most rhs.
Definition: time_point.cpp:300
time_point & operator+=(duration rhs)
Modifies the time_point object by adding the duration rhs.
Definition: time_point.cpp:100
time_point & advance(duration rhs)
Advances the time_point object by the specified duration.
Definition: time_point.cpp:75
const time_point operator+(duration rhs) const
Returns a new time_point with duration rhs added.
Definition: time_point.cpp:191
arraynd< bool, ndims > operator!=(const arraynd< T, ndims > &lhs, const arraynd< T, ndims > &rhs)
Definition: arraynd.h:941
const time_point operator-(duration rhs) const
Returns a new time_point with duration rhs subtracted.
Definition: time_point.cpp:199
duration gap(const time_point &rhs) const
Approximates the difference between the time_point object and time_point rhs.
Definition: time_point.cpp:226
time_point & operator-=(duration rhs)
Modifies the time_point object by subtracting the duration rhs.
Definition: time_point.cpp:184
int8_t int8
Definition: number_types.h:11
bool operator==(const time_point &rhs) const
Returns true if the time_point object equals rhs.
Definition: time_point.cpp:272