|
|
constexpr | interval (interval const &rhs) noexcept=default |
| |
|
constexpr | interval (interval &&rhs) noexcept=default |
| |
|
constexpr interval & | operator= (interval const &rhs) noexcept=default |
| |
|
constexpr interval & | operator= (interval &&rhs) noexcept=default |
| |
| constexpr | interval () noexcept |
| | Default construct an interval.
|
| |
| constexpr | interval (value_type lower, value_type upper) noexcept |
| | Construct an interval from a lower and upper bounds.
|
| |
|
constexpr bool | holds_invariant () const noexcept |
| |
| constexpr value_type | lower () const noexcept |
| | Get the lower bound of the interval.
|
| |
| constexpr value_type | upper () const noexcept |
| | Get the upper bound of the interval.
|
| |
| constexpr value_type | delta () const noexcept |
| | The distance between lower and upper bound.
|
| |
| constexpr bool | is_value () const noexcept |
| | Check if the interval is one value.
|
| |
| constexpr bool | is_range () const noexcept |
| | Check if the interval is a range of values.
|
| |
| template<numeric_limited T> |
| constexpr bool | type_contains_range () const noexcept |
| | Check if a given type can hold all values in the interval.
|
| |
| template<numeric_limited T> |
| constexpr bool | range_contains_type () const noexcept |
| | Check if all the values in a type is inside the interval.
|
| |
| | operator bool () const noexcept |
| | Check if the interval is true.
|
| |
|
constexpr interval | operator- () const noexcept |
| |
|
constexpr interval | operator+ (interval const &rhs) const noexcept |
| |
|
constexpr interval | operator- (interval const &rhs) const noexcept |
| |
|
constexpr interval | operator* (interval const &rhs) const noexcept |
| |
| constexpr interval | positive_mul (interval const &rhs) const noexcept |
| | Multiply two positive intervals.
|
| |
|
constexpr interval | operator/ (interval const &rhs) const noexcept |
| |
|
constexpr interval | operator% (interval const &rhs) const noexcept |
| |
|
interval & | operator+= (interval const &rhs) noexcept |
| |
|
interval & | operator-= (interval const &rhs) noexcept |
| |
|
interval & | operator*= (interval const &rhs) noexcept |
| |
| constexpr bool | is_fully_inside (interval const &other) const noexcept |
| | Check if the current interval is fully inside the other interval.
|
| |
template<numeric_limited T>
struct tt::interval< T >
Interval arithmetic.
Based on: "INTERVAL ARITHMETIC USING SSE-2 (DRAFT)" - BRANIMIR LAMBOV
This interval is implemented with a negated upper bound, this allows the rounding direction to negative infinity.
- Template Parameters
-
| T | A type for which std::numeric_limits<T> is implemented. |