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