Class MHO_Interval.
More...
#include <MHO_Interval.hh>
template<typename XIntegerType = std::size_t>
class hops::MHO_Interval< XIntegerType >
Class MHO_Interval.
Implements the open integer interval [a,b)
- Author
- J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
- Date
- Thu Sep 17 10:45:44 2020 -0400
◆ MHO_Interval() [1/3]
template<typename XIntegerType = std::size_t>
◆ MHO_Interval() [2/3]
template<typename XIntegerType = std::size_t>
◆ MHO_Interval() [3/3]
template<typename XIntegerType = std::size_t>
◆ ~MHO_Interval()
template<typename XIntegerType = std::size_t>
◆ GetInterval()
template<typename XIntegerType = std::size_t>
std::pair< XIntegerType, XIntegerType > hops::MHO_Interval< XIntegerType >::GetInterval |
( |
| ) |
const |
|
inline |
Getter for interval bounds.
- Returns
- A pair of XIntegerType representing the current interval's lower and upper bounds.
◆ GetLength()
template<typename XIntegerType = std::size_t>
Getter for length.
- Returns
- Length calculated as fUpperBound - fLowerBound
◆ GetLowerBound()
template<typename XIntegerType = std::size_t>
Getter for lower bound.
- Returns
- Lower bound value as XIntegerType
◆ GetUpperBound()
template<typename XIntegerType = std::size_t>
Getter for upper bound.
- Returns
- Upper bound value as XIntegerType
◆ Intersection()
template<typename XIntegerType = std::size_t>
Checks if this interval intersects with another and returns true if it does.
- Parameters
-
other | The other interval to check for intersection. |
- Returns
- True if there is an intersection, false otherwise.
◆ Intersects() [1/2]
template<typename XIntegerType = std::size_t>
Checks if this interval intersects with another.
- Parameters
-
other | The other interval to check for intersection |
- Returns
- True if there is an intersection, false otherwise
◆ Intersects() [2/2]
template<typename XIntegerType = std::size_t>
Checks if closed interval intersects with another interval.
- Parameters
-
- Returns
- True if intervals intersect, false otherwise
◆ operator=()
template<typename XIntegerType = std::size_t>
◆ SetBounds() [1/2]
template<typename XIntegerType = std::size_t>
void hops::MHO_Interval< XIntegerType >::SetBounds |
( |
const std::pair< XIntegerType, XIntegerType > & |
lower_upper | ) |
|
|
inline |
Setter for bounds.
- Parameters
-
lower_bound | Lower bound of type XIntegerType |
upper_bound | Upper bound of type XIntegerType |
◆ SetBounds() [2/2]
template<typename XIntegerType = std::size_t>
void hops::MHO_Interval< XIntegerType >::SetBounds |
( |
XIntegerType |
lower_bound, |
|
|
XIntegerType |
upper_bound |
|
) |
| |
|
inline |
Setter for bounds.
- Parameters
-
lower_bound | Lower bound value of type XIntegerType |
upper_bound | Upper bound value of type XIntegerType |
◆ SetIntervalImpl()
template<typename XIntegerType = std::size_t>
void hops::MHO_Interval< XIntegerType >::SetIntervalImpl |
( |
XIntegerType |
low, |
|
|
XIntegerType |
up |
|
) |
| |
|
inlineprotected |
Setter for interval impl.
- Parameters
-
low | Lower bound of new interval (copied) |
up | Upper bound of new interval (copied) |
◆ SetLowerBound()
template<typename XIntegerType = std::size_t>
Setter for lower bound.
- Parameters
-
low | New lower bound value of type XIntegerType. |
◆ SetUpperBound()
template<typename XIntegerType = std::size_t>
Setter for upper bound.
- Parameters
-
up | New upper bound value of type XIntegerType |
◆ Union()
template<typename XIntegerType = std::size_t>
Calculates and returns the union interval of this interval and another.
- Parameters
-
other | The other interval to calculate the union with. |
- Returns
- The union interval as an MHO_Interval object.
◆ fLowerBound
template<typename XIntegerType = std::size_t>
◆ fUpperBound
template<typename XIntegerType = std::size_t>
◆ fValid
template<typename XIntegerType = std::size_t>
The documentation for this class was generated from the following file: