Class Pattern
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

Interface Metafunction Overview

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

Thread safety unknown!

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

Thread safety unknown!

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

Thread safety unknown!

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

Thread safety unknown!

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

Thread safety unknown!

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

Thread safety unknown!

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

Thread safety unknown!

Interface Metafunctions Detail

Container<TPattern>::Type;

Returns the needle type of the pattern.

Template Parameters

TPattern The pattern to query for its needle type.

Returns

Type The needle type.

Difference<TPattern>::Type;

Returns the difference type of the underlying pattern.

Template Parameters

TPattern The Pattern to query.

Returns

Type The difference type.

Host<TPattern>::Type;

Returns the host type of the pattern.

Template Parameters

TPattern The pattern to query for its host type.

Returns

Type The host type.

Needle<TPattern>::Type;

Returns the needle type of a Pattern type.

Template Parameters

TPattern The pattern type to query.

Returns

Type The needle type of TPattern</tt., i.e. TNeedle for Pattern<TNeedle, TSpec>.

PexMultiFinder<Pattern<TNeedle,Pex<TVerification, TMultiFinder> > >::Type;

Determines the multiple exact string matching algorithm used by the Pex algorithm.

Template Parameters

TMultiFinder The specification for the multiple exact string matching algorithm that should be used with the Pex algorithm.

Returns

Type Pattern type of the multiple exact string matching algorithm for the specified Pattern.

For a description of Pattern usage, see Pattern.

Overload this metafunction if you want to use something else for verification then Pattern<String<Segment&l;tNeedle> >, TMultiFinder>.

Position<TPattern>::Type;

Returns the position type of the underlying pattern.

Template Parameters

TPattern The Pattern to query.

Returns

Type The position type.

ScoringScheme<TPattern>::Type;

Returns the scoring scheme type of an approximate search algorithm.

Template Parameters

TPattern The Pattern to query for its scoring scheme type. Default: EditDistanceScore.

Size<TPattern>::Type;

Returns the size type of the underlying pattern.

Template Parameters

TPattern The Pattern to query.

Returns

Type The size type.

Value<TPattern>::Type;

Returns the value type of the underlying pattern.

Template Parameters

TPattern The Pattern to query.

Returns

Type The value type.