Class
PatternHolds the needle and preprocessing data (depends on algorithm).
Holds the needle and preprocessing data (depends on algorithm).
All Subcl's | AbndmAlgoPattern, AhoCorasickPattern, BfamPattern, BndmAlgoPattern, DPSearchPattern, HammingSimplePattern, HierarchicalPexPattern, HorspoolPattern, MultiBfamPattern, MultipleShiftAndPattern, MyersPattern, NonHierarchicalPexPattern, OracleBfamPattern, OracleMultiBfamPattern, PexPattern, PigeonholePattern, SetHorspoolPattern, ShiftAndPattern, ShiftOrPattern, SimplePattern, SwiftLocalPattern, SwiftPattern, SwiftSemiGlobalPattern, TrieBfamPattern, WildShiftAndPattern, WuManberPattern |
---|---|
Defined in | <seqan/find.h> |
Signature |
template <typename TNeedle[, typename TSpec]>
class Pattern;
|
Template Parameters
TNeedle |
The needle type. Types: TextConcept. |
---|---|
TSpec |
A tag that specifies the online algorithm to use for the search. Defaults to the result of DefaultPattern. |
Interface Function Overview
-
TScoreValue getBeginScore(pattern);
Score of the last match found by findBegin during approximate searching. -
THost host(pattern);
Query a Pattern for its host. -
TNeedle needle(pattern);
Returns the needle of a Pattern object (not implemented for some online-algorithms). -
TPosition position(pattern);
Return the position of the last match in the pattern. -
TScoringScheme scoringScheme(pattern);
The scoring scheme used for finding or aligning. -
void setNeedle(pattern, needle);
Sets the needle of a Pattern object and optionall induces preprocessing. -
void setScoringScheme(pattern, score);
Sets the scoring scheme used for finding or aligning.
Interface Metafunction Overview
-
Container<TPattern>::Type;
Returns the needle type of the pattern. -
Difference<TPattern>::Type;
Returns the difference type of the underlying pattern. -
Host<TPattern>::Type;
Returns the host type of the pattern. -
Needle<TPattern>::Type;
Returns the needle type of a Pattern type. -
PexMultiFinder<Pattern<TNeedle,Pex<TVerification, TMultiFinder> > >::Type;
Determines the multiple exact string matching algorithm used by the Pex algorithm. -
Position<TPattern>::Type;
Returns the position type of the underlying pattern. -
ScoringScheme<TPattern>::Type;
Returns the scoring scheme type of an approximate search algorithm. -
Size<TPattern>::Type;
Returns the size type of the underlying pattern. -
Value<TPattern>::Type;
Returns the value type of the underlying pattern.
Detailed Description
If Needle is a StringSet then position(pattern) returns a Pair with the index of the currently matching needle and the position in the needle.
Interface Functions Detail
TScoreValue getBeginScore(pattern);
Score of the last match found by findBegin during approximate searching.
Parameters
pattern
|
A Pattern that can be used for approximate searching. |
---|
Returns
TScoreValue |
The score of the lst match found using pattern. The value is set after successfully call of findBegin. If no match was found, the value is undefined. |
---|
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
THost host(pattern);
Query a Pattern for its host.
Parameters
pattern
|
The Pattern to query for its host. |
---|
Returns
THost |
Reference to the host. |
---|
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
TNeedle needle(pattern);
Returns the needle of a Pattern object (not implemented for some online-algorithms).
Parameters
pattern
|
The Pattern to query for its needle. |
---|
Returns
TNeedle |
Reference of the needle object. |
---|
TNeedle is the result of the Needle metafunction of TPattern. This is an alias to the function host.
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
TPosition position(pattern);
Return the position of the last match in the pattern.
Parameters
pattern
|
The Pattern to query for its position. |
---|
Returns
TPosition |
The position of the last match in the pattern. |
---|
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
TScoringScheme scoringScheme(pattern);
The scoring scheme used for finding or aligning.
Parameters
pattern
|
The Pattern to query for its scoring scheme. |
---|
Returns
TScoringScheme |
The scoring scheme of the pattern. |
---|
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
void setNeedle(pattern, needle);
Sets the needle of a Pattern object and optionall induces preprocessing.
Parameters
pattern
|
The pattern to set the needle for. |
---|---|
needle
|
The needle to set. |
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
void setScoringScheme(pattern, score);
Sets the scoring scheme used for finding or aligning.
Parameters
pattern
|
The pattern to set the scoring scheme for. |
---|---|
score
|
The scoring scheme to set. |
Data Races
If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.