concordia-library/concordia/interval.cpp
rjawor e99eb77b28 anonymizing sentences
Former-commit-id: 5d8bd7e16258fda7c02a7cc0e1da589d73418f0d
2014-04-29 14:46:04 +02:00

21 lines
474 B
C++

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