![]() |
IDS peak ICV v1.0.0
|
#include <peak_common/types/peak_common_interval.hpp>

Public Types | |
| using | type = T |
Public Member Functions | |
| constexpr | IntervalT (T minimum, T maximum) |
| Constructs an interval with the given lower and upper bounds. | |
| constexpr T | GetMinimum () const |
| Returns the lower boundary of the interval. | |
| constexpr T | GetMaximum () const |
| Returns the upper boundary of the interval. | |
| template<typename H > | |
| constexpr bool | operator== (const IntervalT< H > &rhs) const |
| Compares two intervals for equality (integral types). | |
| template<typename H > | |
| constexpr bool | operator== (const IntervalT< H > &rhs) const |
| Compares two intervals for approximate equality (floating-point types). | |
| constexpr bool | operator!= (const IntervalT &rhs) const |
| Inequality comparison operator. | |
| std::string | ToString () const |
| Returns a string representation of the interval. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, IntervalT interval) |
| Outputs the interval as a human-readable string to a stream. | |
Represents a continuous numeric interval with inclusive lower and upper bounds.
The interval is defined by two values: a minimum and a maximum. These values must satisfy the condition: minimum <= maximum.
| T | Must be an arithmetic type (integer or floating point). |
Definition at line 43 of file peak_common_interval.hpp.
| using type = T |
Definition at line 49 of file peak_common_interval.hpp.
|
inlineconstexpr |
Constructs an interval with the given lower and upper bounds.
| minimum | The lower boundary (inclusive). |
| maximum | The upper boundary (inclusive). |
| InvalidParameterException | If the minimum is greater than the maximum. |
Definition at line 61 of file peak_common_interval.hpp.
|
inlineconstexpr |
Returns the upper boundary of the interval.
Definition at line 88 of file peak_common_interval.hpp.
|
inlineconstexpr |
Returns the lower boundary of the interval.
Definition at line 77 of file peak_common_interval.hpp.
|
inlineconstexpr |
Inequality comparison operator.
| rhs | The interval to compare with. |
Definition at line 149 of file peak_common_interval.hpp.
|
inlineconstexpr |
Compares two intervals for equality (integral types).
Checks whether the minimum and maximum values of both intervals are exactly the same.
| rhs | The interval to compare against. |
true if both intervals have the same minimum and maximum values; otherwise, false.Definition at line 109 of file peak_common_interval.hpp.
|
inlineconstexpr |
Compares two intervals for approximate equality (floating-point types).
Determines whether two intervals are approximately equal by comparing their minimum and maximum values using a tolerance defined in ULPs (Units in the Last Place).
| rhs | The interval to compare against. |
true if both intervals have approximately equal minimum and maximum values; otherwise, false.Definition at line 131 of file peak_common_interval.hpp.
|
inline |
Returns a string representation of the interval.
Definition at line 173 of file peak_common_interval.hpp.
|
friend |
Outputs the interval as a human-readable string to a stream.
| os | The output stream. |
| interval | The interval to print. |
Definition at line 162 of file peak_common_interval.hpp.