concordia-library/concordia/interval.cpp
rjawor 0d4bdf12de removed using namespace std
Former-commit-id: dbb5129e1f94d83eca887ada0f89d6bb45250f1e
2015-04-15 14:14:10 +02:00

22 lines
484 B
C++

#include "concordia/interval.hpp"
Interval::Interval(const SUFFIX_MARKER_TYPE start,
const SUFFIX_MARKER_TYPE end):
_start(start),
_end(end) {
}
Interval::~Interval() {
}
bool Interval::intersects(Interval & interval) {
return !(_end - 1 < interval.getStart() ||
interval.getEnd() - 1 < _start);
}
SUFFIX_MARKER_TYPE Interval::getLength() {
return _end - _start;
}