Concordia
TmMatches Class Reference

#include <tm_matches.hpp>

Public Member Functions

 TmMatches ()
 
 TmMatches (const SUFFIX_MARKER_TYPE exampleId, const SUFFIX_MARKER_TYPE exampleSize, const SUFFIX_MARKER_TYPE patternSize)
 
virtual ~TmMatches ()
 
double getScore () const
 
std::vector< IntervalgetExampleIntervals () const
 
std::vector< IntervalgetPatternIntervals () const
 
SUFFIX_MARKER_TYPE getExampleId () const
 
void calculateSimpleScore ()
 
void calculateScore ()
 
void addExampleInterval (int start, int end)
 
void addPatternInterval (int start, int end)
 

Detailed Description

Class used within Anubis search algorithm to store partial results. Holds information about mutual overlay of the pattern and found example.

Constructor & Destructor Documentation

TmMatches::TmMatches ( )

Constructor.

TmMatches::TmMatches ( const SUFFIX_MARKER_TYPE  exampleId,
const SUFFIX_MARKER_TYPE  exampleSize,
const SUFFIX_MARKER_TYPE  patternSize 
)

Constructor setting basic information.

Parameters
exampleIdid of found example
exampleSizesize of the found example
patternSizesize of the searched pattern
TmMatches::~TmMatches ( )
virtual

Destructor.

Member Function Documentation

void TmMatches::addExampleInterval ( int  start,
int  end 
)

Adds information about covering of example. If the new fragment intersects with any previous fragment, it is not added.

Parameters
startstart of the example overlay fragment
endend of the example overlay fragment
void TmMatches::addPatternInterval ( int  start,
int  end 
)

Adds information about covering of pattern. If the new fragment intersects with any previous fragment, it is not added.

Parameters
startstart of the pattern overlay fragment
endend of the pattern overlay fragment
void TmMatches::calculateScore ( )

Calculates mutual overlay score in the scale [0,1]. Takes into account the number and the length of the fragments (the fewer fragments, the better). Score 1 - perfect score - is assigned when the whole pattern and the whole example are covered with only one fragment. Result of the computation is stored in the score field, use getScore() to retrieve it.

Here is the call graph for this function:

Here is the caller graph for this function:

void TmMatches::calculateSimpleScore ( )

Calculates mutual overlay score in the scale [0,1]. Uses generalized Jaccard index for the computation. Score 1 - perfect score - is assigned when the whole pattern and the whole example are covered. Result of the computation is stored in the score field, use getScore() to retrieve it.

Here is the call graph for this function:

SUFFIX_MARKER_TYPE TmMatches::getExampleId ( ) const
inline

Getter for example id.

Returns
example id

Here is the caller graph for this function:

std::vector<Interval> TmMatches::getExampleIntervals ( ) const
inline

Getter for the list of overlays of the example.

Returns
example overlays list
std::vector<Interval> TmMatches::getPatternIntervals ( ) const
inline

Getter for the list of overlays of the pattern.

Returns
pattern overlays list
double TmMatches::getScore ( ) const
inline

Getter for score of the mutual overlay.

Returns
score

Here is the caller graph for this function:


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