61 start =
static_cast<T
>(1);
62 end =
static_cast<T
>(0);
188 return start == other.start &&
end == other.end;
204 template <
class T,
class AX = std::allocator<
interval<T>>>
205 using interval_vector = std::vector<interval<T>, AX>;
Numerical interval.
Definition interval.hpp:18
interval(T x) noexcept
Constructs a zero-size interval.
Definition interval.hpp:32
interval< T > operator-(const T x) const
Moves interval towards the beginning by a number.
Definition interval.hpp:149
bool contains(T x) const
Is value in interval?
Definition interval.hpp:79
interval< T > operator++(int)
Moves interval towards the end by one.
Definition interval.hpp:122
bool empty() const
Is interval empty?
Definition interval.hpp:54
interval(T _start, T _end) noexcept
Constructs an interval.
Definition interval.hpp:40
interval< T > operator+(const T x) const
Moves interval towards the end by a number.
Definition interval.hpp:100
interval< T > operator+(const interval< T > &other) const
Adds two intervals by components.
Definition interval.hpp:88
T size() const
Returns interval size.
Definition interval.hpp:47
T end
interval end
Definition interval.hpp:20
bool operator==(const interval< T > &other) const
Are intervals identical?
Definition interval.hpp:186
interval< T > operator++()
Moves interval towards the end by one.
Definition interval.hpp:110
interval() noexcept
Constructs an invalid interval.
Definition interval.hpp:25
void invalidate()
Invalidates interval.
Definition interval.hpp:59
interval< T > operator--()
Moves interval towards the begginning by one.
Definition interval.hpp:159
bool operator!=(const interval< T > &other) const
Are intervals different?
Definition interval.hpp:198
T start
interval start
Definition interval.hpp:19
interval< T > operator-(const interval< T > &other) const
Subtracts two intervals by components.
Definition interval.hpp:137
interval< T > operator--(int)
Moves interval towards the begginning by one.
Definition interval.hpp:171