liblevenshtein 4.0.0
A library for generating Finite State Transducers based on Levenshtein Automata.
|
Represents an edge from one DawgNode to another, annotated with a character label from the current position of the dictionary term. More...
#include <transition.h>
Public Member Functions | |
Transition (char label, DawgNode *source, DawgNode *target) | |
Constructs a new Transition from a source DawgNode to its target, annotated by the given label. | |
Transition (const Transition &transition)=default | |
Copy constructor for this Transition. | |
Transition (Transition &&transition) noexcept | |
Move constructor for this Transition. | |
auto | label () const -> char |
Returns the label annotating the edge from the source to the target of this Transition. | |
auto | source () const -> DawgNode * |
Returns the initial DawgNode along the edge of this transition. | |
auto | target () const -> DawgNode * |
Returns the destination DawgNode along the edge of this transition. | |
auto | operator== (const Transition &other) const -> bool |
Returns whether this Transition is equivalent to another. | |
Private Attributes | |
char | _label |
Annotation along the edge of this Transition. | |
DawgNode * | _source |
DawgNode at the beginning of this Transition. | |
DawgNode * | _target |
DawgNode at the ending of this Transition. | |
Represents an edge from one DawgNode to another, annotated with a character label from the current position of the dictionary term.
Definition at line 13 of file transition.h.
Constructs a new Transition from a source DawgNode to its target, annotated by the given label.
label | Annotation for the current Transition. |
source | Initial DawgNode for this Transition. |
target | Destination DawgNode for this Transition. |
Definition at line 6 of file transition.cpp.
|
default |
Copy constructor for this Transition.
transition | Transition to copy. |
|
noexcept |
Move constructor for this Transition.
transition | Transition whose memory is to be moved to this one. |
Definition at line 12 of file transition.cpp.
Returns the label annotating the edge from the source to the target of this Transition.
Definition at line 18 of file transition.cpp.
References _label.
Referenced by liblevenshtein::SortedDawg::minimize().
auto liblevenshtein::Transition::operator== | ( | const Transition & | other | ) | const -> bool |
Returns whether this Transition is equivalent to another.
other | A Transition whose equivalence to this one is to be determined. |
Definition at line 30 of file transition.cpp.
References query().
Returns the initial DawgNode along the edge of this transition.
Definition at line 22 of file transition.cpp.
References _source.
Referenced by liblevenshtein::SortedDawg::minimize().
Returns the destination DawgNode along the edge of this transition.
Definition at line 26 of file transition.cpp.
References _target.
Referenced by liblevenshtein::SortedDawg::minimize().
|
private |
Annotation along the edge of this Transition.
Definition at line 74 of file transition.h.
Referenced by label().
|
private |
DawgNode at the beginning of this Transition.
Definition at line 77 of file transition.h.
Referenced by source().
|
private |
DawgNode at the ending of this Transition.
Definition at line 80 of file transition.h.
Referenced by target().