liblevenshtein 4.0.0
A library for generating Finite State Transducers based on Levenshtein Automata.
|
Represents an Intersection between a dictionary automaton and Levenshtein automaton, guided by the query term. More...
#include <intersection.h>
Public Member Functions | |
Intersection (char label, DawgNode *node, State *state, Intersection *parent=nullptr) | |
Constructs a new Intersection between a dictionary automaton and Levenshtein automaton, guided by the query term. | |
~Intersection () | |
Frees all owned members. | |
auto | node () const -> DawgNode * |
Returns the dictionary DawgNode from the Intersection. | |
auto | state () const -> State * |
Returns the Levenshtein State from the Intersection. | |
auto | str () const -> std::string |
Concatenates all subsequent character labels from the Intersection nodes beginning at the root of the dictionary up to here. | |
Private Attributes | |
char | _label |
Transition annotation from the outgoing edge to the given DawgNode. | |
DawgNode * | _node |
Placeholder in the dictionary automaton. | |
State * | _state |
Levenshtein transducer State. | |
Intersection * | _parent |
The preceding Intersection node along the current path. | |
Friends | |
auto | operator<< (std::ostream &out, const Intersection &intersection) -> std::ostream & |
Specifies the ostream operator may access all the members. | |
Represents an Intersection between a dictionary automaton and Levenshtein automaton, guided by the query term.
Definition at line 16 of file intersection.h.
liblevenshtein::Intersection::Intersection | ( | char | label, |
DawgNode * | node, | ||
State * | state, | ||
Intersection * | parent = nullptr ) |
Constructs a new Intersection between a dictionary automaton and Levenshtein automaton, guided by the query term.
label | Transition annotation from the outgoing edge to the given DawgNode. |
node | Placeholder in the dictionary automaton. |
state | Levenshtein transducer State. |
parent | The preceding Intersection node along the current path. |
Definition at line 7 of file intersection.cpp.
liblevenshtein::Intersection::~Intersection | ( | ) |
Returns the dictionary DawgNode from the Intersection.
Definition at line 17 of file intersection.cpp.
References _node.
Returns the Levenshtein State from the Intersection.
Definition at line 21 of file intersection.cpp.
References _state.
auto liblevenshtein::Intersection::str | ( | ) | const -> std::string |
Concatenates all subsequent character labels from the Intersection nodes beginning at the root of the dictionary up to here.
Definition at line 25 of file intersection.cpp.
References query().
|
friend |
Specifies the ostream operator may access all the members.
Definition at line 31 of file intersection.cpp.
|
private |
Transition annotation from the outgoing edge to the given DawgNode.
Definition at line 65 of file intersection.h.
|
private |
Placeholder in the dictionary automaton.
Definition at line 68 of file intersection.h.
Referenced by node().
|
private |
The preceding Intersection node along the current path.
Definition at line 74 of file intersection.h.
|
private |
Levenshtein transducer State.
Definition at line 71 of file intersection.h.
Referenced by state(), and ~Intersection().