Concordia
MatchedPatternFragment Class Reference

#include <matched_pattern_fragment.hpp>

Inheritance diagram for MatchedPatternFragment:
Collaboration diagram for MatchedPatternFragment:

Public Member Functions

 MatchedPatternFragment (const SUFFIX_MARKER_TYPE &patternOffset, const SUFFIX_MARKER_TYPE &matchedLength)
 
virtual ~MatchedPatternFragment ()
 
std::vector< SubstringOccurencegetOccurences () const
 
void addOccurence (const SubstringOccurence &occurence)
 
SUFFIX_MARKER_TYPE getPatternOffset () const
 
SUFFIX_MARKER_TYPE getMatchedLength () const
 
bool operator> (const MatchedPatternFragment &other) const
 
- Public Member Functions inherited from Interval
 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
 

Detailed Description

Class representing matched pattern fragment in concordia search. This fragment can be seen as a word interval of the pattern.

This class holds information about:

  • where the pattern fragment was matched (example id and example offset)
  • where the fragment is located within the pattern (patternOffset, matchedLength)

Constructor & Destructor Documentation

MatchedPatternFragment::MatchedPatternFragment ( const SUFFIX_MARKER_TYPE &  patternOffset,
const SUFFIX_MARKER_TYPE &  matchedLength 
)

Constructor.

Parameters
patternOffsetoffset of the matched fragment in the pattern
matchedLengthlength of the matched pattern
MatchedPatternFragment::~MatchedPatternFragment ( )
virtual

Destructor.

Member Function Documentation

void MatchedPatternFragment::addOccurence ( const SubstringOccurence occurence)

Adds an occurence to the list.

Parameters
fragmentoccurence to be added

Here is the caller graph for this function:

SUFFIX_MARKER_TYPE MatchedPatternFragment::getMatchedLength ( ) const
inline

Getter for matched length.

Returns
matched fragment length

Here is the caller graph for this function:

std::vector<SubstringOccurence> MatchedPatternFragment::getOccurences ( ) const
inline

Getter for occurences.

Returns
occurences
SUFFIX_MARKER_TYPE MatchedPatternFragment::getPatternOffset ( ) const
inline

Getter for pattern offset.

Returns
pattern offset
bool MatchedPatternFragment::operator> ( const MatchedPatternFragment other) const
inline

Operator for comparing fragments by their length.

Returns
true if current pattern is longer than the other

Here is the call graph for this function:


The documentation for this class was generated from the following files: