Template Struct range_t¶
Defined in File range.hpp
Struct Documentation¶
-
template<Scalar T = f_t, range_inclusiveness_e inclusiveness = range_inclusiveness_e::inclusive>
struct range_t¶ Describes the one-dimensional range between
min
andmax
.- Template Parameters:
inclusiveness – dictates inclusiveness of endpoints.
Public Functions
-
template<std::size_t W>
inline constexpr b_w_t<W> contains(f_w_t<W> pt) const noexcept¶ Returns TRUE if the range contains the point. Wide test.
-
template<std::size_t W>
inline constexpr b_w_t<W> contains(q_w_t<W, T> pt) const noexcept¶ Returns TRUE if the range contains the point. Wide test.
-
inline constexpr bool contains(range_t range) const noexcept¶
Returns TRUE if this range contains the input range
range
.
-
template<auto inc>
inline bool overlaps(const range_t<T, inc> &r) const noexcept¶ Checks for overlaps between ranges.
-
template<auto inc>
inline constexpr range_t operator|(const range_t<T, inc> &o) const noexcept¶ Union of two ranges.
-
template<auto inc>
inline constexpr range_t &operator|=(const range_t<T, inc> &o) noexcept¶ Union of two ranges.
-
template<auto inc>
inline constexpr range_t operator&(const range_t<T, inc> &o) const noexcept¶ Intersection of two ranges.
-
template<auto inc>
inline constexpr range_t &operator&=(const range_t<T, inc> &o) noexcept¶ Intersection of two ranges.
-
inline constexpr bool empty() const noexcept¶
-
inline constexpr auto length() const noexcept¶
Returns the length of the range.
-
inline constexpr auto centre() const noexcept¶
-
inline auto &operator[](std::size_t idx)¶
-
inline const auto &operator[](std::size_t idx) const¶
-
inline constexpr auto size() const noexcept¶
-
inline auto begin() noexcept¶
-
inline auto end() noexcept¶
-
inline auto begin() const noexcept¶
-
inline auto end() const noexcept¶
-
inline auto &front() noexcept¶
-
inline auto &back() noexcept¶
-
inline const auto &front() const noexcept¶
-
inline const auto &back() const noexcept¶
-
inline auto cbegin() const noexcept¶
-
inline auto cend() const noexcept¶
Public Static Functions
-
static inline constexpr bool includes_start_point() noexcept¶
-
static inline constexpr bool includes_end_point() noexcept¶
-
static inline constexpr auto range(const T pt) noexcept¶
Constructs a single point range (this range maybe empty, depending on
inclusiveness
).
-
static inline constexpr auto positive() noexcept¶
Constructs the range \( [0,+\infty) \).
-
static inline constexpr auto all() noexcept¶
Constructs the range \( (-\infty,+\infty) \).
-
static inline constexpr auto null() noexcept¶
Constructs an empty range.