Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Aho_Corasick::Match Struct Reference

One match occurrence in the searched text. More...

#include <Aho_Corasick.H>

Collaboration diagram for Aleph::Aho_Corasick::Match:
[legend]

Public Member Functions

bool operator== (const Match &other) const noexcept
 Equality operator for Match.
 

Public Attributes

size_t position = 0
 0-based start index of the match.
 
size_t pattern_id = 0
 Insertion-order ID of the pattern.
 

Detailed Description

One match occurrence in the searched text.

position is the 0-based start index of the matched pattern. pattern_id is the insertion order id returned by add_pattern().

Definition at line 70 of file Aho_Corasick.H.

Member Function Documentation

◆ operator==()

bool Aleph::Aho_Corasick::Match::operator== ( const Match other) const
inlinenoexcept

Equality operator for Match.

Parameters
otherThe match to compare against.
Returns
true if both position and pattern_id are equal.

Definition at line 79 of file Aho_Corasick.H.

References Aleph::and, Aleph::divide_and_conquer_partition_dp(), pattern_id, and position.

Member Data Documentation

◆ pattern_id

size_t Aleph::Aho_Corasick::Match::pattern_id = 0

Insertion-order ID of the pattern.

Definition at line 73 of file Aho_Corasick.H.

Referenced by operator==().

◆ position

size_t Aleph::Aho_Corasick::Match::position = 0

0-based start index of the match.

Definition at line 72 of file Aho_Corasick.H.

Referenced by operator==().


The documentation for this struct was generated from the following file: