concordia-library/concordia/matched_pattern_fragment.hpp
rjawor 7549703414 best overlay computation
Former-commit-id: 986f3d6b611fd276a7b26073daa0094caf078d1e
2015-04-21 15:14:48 +02:00

53 lines
1.3 KiB
C++

#ifndef MATCHED_PATTERN_FRAGMENT_HDR
#define MATCHED_PATTERN_FRAGMENT_HDR
#include "concordia/common/config.hpp"
#include "concordia/interval.hpp"
/*!
Class representing matched pattern fragment in concordia search.
This fragment can be seen as an interval of the pattern.
*/
class MatchedPatternFragment : public Interval {
public:
MatchedPatternFragment(const SUFFIX_MARKER_TYPE & exampleId,
const SUFFIX_MARKER_TYPE & exampleOffset,
const SUFFIX_MARKER_TYPE & patternOffset,
const SUFFIX_MARKER_TYPE & matchedLength);
/*! Destructor.
*/
virtual ~MatchedPatternFragment();
SUFFIX_MARKER_TYPE getExampleId() const {
return _exampleId;
}
SUFFIX_MARKER_TYPE getExampleOffset() const {
return _exampleOffset;
}
SUFFIX_MARKER_TYPE getPatternOffset() const {
return _patternOffset;
}
SUFFIX_MARKER_TYPE getMatchedLength() const {
return _matchedLength;
}
bool operator > (const MatchedPatternFragment & other) const {
return (_matchedLength > other.getMatchedLength());
}
private:
SUFFIX_MARKER_TYPE _exampleId;
SUFFIX_MARKER_TYPE _exampleOffset;
SUFFIX_MARKER_TYPE _patternOffset;
SUFFIX_MARKER_TYPE _matchedLength;
};
#endif