Concordia
|
#include <interval.hpp>
Public Member Functions | |
Interval (const SUFFIX_MARKER_TYPE start, const SUFFIX_MARKER_TYPE end) | |
virtual | ~Interval () |
bool | intersects (Interval &interval) |
bool | contains (Interval &interval) |
SUFFIX_MARKER_TYPE | getLength () |
SUFFIX_MARKER_TYPE | getStart () const |
SUFFIX_MARKER_TYPE | getEnd () const |
Class representing interval of a sentence, i.e. a sequence of words or chars coming from that sentence. An interval only has its start and end indexes, where the start index is inclusive and end index is exclusive. For example, an interval [2,5] of words of the sentence "This is just for testing purposes" is: "just for testing".
|
explicit |
Constructor.
start | start index of the interval (0-based) |
end | end index of the interval (0-based) |
|
virtual |
Destructor.
bool Interval::contains | ( | Interval & | interval | ) |
Checks if this interval contains another.
interval | another interval |
|
inline |
Getter for interval end.
SUFFIX_MARKER_TYPE Interval::getLength | ( | ) |
Getter for interval length.
|
inline |
Getter for interval start.
bool Interval::intersects | ( | Interval & | interval | ) |
Checks if this interval intersects another.
interval | another interval |