20 #ifndef SRECORD_INTERVAL_H
21 #define SRECORD_INTERVAL_H
357 inline std::ostream &
The interval class is used to represent a set of integer values, usually composed of runs of adjacent...
interval(const interval &)
The copy constructor.
void print(std::ostream &) const
The print method is used to print an interval on an output stream.
static bool equal(const interval &, const interval &)
The equal class method is used to test the equality of two intervals.
long_data_t coverage() const
The coverage method is used to obtain the size of the interval in bytes.
static interval difference(const interval &, const interval &)
The difference class method is used to calculate the set difference of two intervals.
void first_interval_only()
The first_interval_only method is used to crop the interval to the first (numerically least) run of c...
interval pad(int x) const
The pad method is used to expand an interval by padding each sub-interval.
uint32_t data_t
The data_t type is used to parameterize the integr type used in the interval.
data_t get_lowest() const
The get_lowest method is used to obtain the lower bound of the interval.
void scan_begin()
The interval_scan_begin method is used to start traversing every integer value in the interval.
~interval()
The destructor.
interval flatten() const
The flatten method is used to convert an interval with holes in it to a simple interval with no holes...
bool empty() const
The empty method is used to test whether the interval is empty.
data_t get_highest() const
The get_highest method is used to obtain the upper bound of the interval.
static interval union_(const interval &, const interval &)
The union_ class method is used to calculate the set union of two intervals.
interval()
The default constructor.
interval(data_t lo, data_t hi)
The constructor.
interval(data_t val)
The constructor.
std::string representation() const
The representation method is used to manufacture a textural representation of this interval.
bool scan_next(data_t &)
The interval_scan_next method is used to traverse every integer value in the interval.
void scan_end()
The interval_scan_end method is used to finish traversing every integer value in the interval.
interval & operator=(const interval &)
The assignment operator.
bool member(data_t val) const
The member method is used to test whether a given value is a member of the interval.
static interval intersection(const interval &, const interval &)
The intersection class method is used to calculate the set intersection of two intervals.
interval & operator*=(interval &lhs, const interval &rhs)
The star-and-replace operator is used to calculate the intersection of two intervals,...
interval operator*(const interval &lhs, const interval &rhs)
The binary star operator is used to calculate the intersection of two intervals.
std::ostream & operator<<(std::ostream &os, const interval &val)
The binary left-shift operator is used to print an interval on an output stream.
interval & operator+=(interval &lhs, const interval &rhs)
The plus-and-replace operator is used to calculate the union of two intervals, and assign the result ...
interval operator+(const interval &lhs, const interval &rhs)
The binary plus operator is used to calculate the union of two intervals.
interval operator-(const interval &lhs, const interval &rhs)
The binary minus operator is used to calculate the difference of two intervals.
bool operator==(const interval &lhs, const interval &rhs)
The equality operator is used to determine if two intervals are the same.
bool operator!=(const interval &lhs, const interval &rhs)
The inequality operator is used to determine if two intervals are different.
interval & operator-=(interval &lhs, const interval &rhs)
The minus-and-replace operator is used to calculate the difference of two intervals,...