|
tempoch-cpp 0.5.3
Header-only C++ wrapper for tempoch
|
#include <tempoch/period.hpp>
Public Member Functions | |
| Period (const T &start, const T &end) | |
| T | start () const |
| T | end () const |
| template<typename TargetType = qtty::DayTag> | |
| qtty::Quantity< typename qtty::ExtractTag< TargetType >::type > | duration () const |
| template<typename TargetType = qtty::DayTag> | |
| qtty::Quantity< typename qtty::ExtractTag< TargetType >::type > | length () const |
Returns the length of the period (primary name; duration() is a backward-compat alias). | |
| Period | intersection (const Period &other) const |
| bool | contains (const T &point) const noexcept |
| std::vector< Period< T > > | union_with (const Period< T > &other) const |
| std::vector< Period< T > > | complement_of (const std::vector< Period< T > > &others) const |
| const tempoch_period_mjd_t & | c_inner () const noexcept |
Static Public Member Functions | |
| static Period | from_c (const tempoch_period_mjd_t &c) |
Definition at line 53 of file period.hpp.
|
inline |
Construct a half-open interval [start, end).
The period is half-open: start is included, end is excluded.
| InvalidPeriodError | if start > end. |
Definition at line 63 of file period.hpp.
References tempoch::check_status(), tempoch::Period< T >::end(), tempoch::scale_tag_v, and tempoch::Period< T >::start().
|
inlinenoexcept |
Definition at line 126 of file period.hpp.
|
inline |
Definition at line 109 of file period.hpp.
References tempoch::check_status(), tempoch::Period< T >::from_c(), and tempoch::scale_tag_v.
|
inlinenoexcept |
Definition at line 93 of file period.hpp.
References tempoch::scale_tag_v.
|
inline |
Definition at line 75 of file period.hpp.
References tempoch::scale_tag_v.
|
inline |
Definition at line 72 of file period.hpp.
Referenced by tempoch::Period< T >::Period().
|
inlinestatic |
Definition at line 69 of file period.hpp.
References tempoch::scale_tag_v.
Referenced by tempoch::Period< T >::complement_of(), tempoch::Period< T >::intersection(), and tempoch::Period< T >::union_with().
|
inline |
Definition at line 86 of file period.hpp.
References tempoch::check_status(), tempoch::Period< T >::from_c(), and tempoch::scale_tag_v.
|
inline |
Returns the length of the period (primary name; duration() is a backward-compat alias).
Definition at line 82 of file period.hpp.
References tempoch::scale_tag_v.
|
inline |
Definition at line 71 of file period.hpp.
Referenced by tempoch::Period< T >::Period().
|
inline |
Definition at line 97 of file period.hpp.
References tempoch::check_status(), tempoch::Period< T >::from_c(), and tempoch::scale_tag_v.