liblevenshtein
4.0.0
A library for generating Finite State Transducers based on Levenshtein Automata.
Loading...
Searching...
No Matches
transition.h
Go to the documentation of this file.
1
#ifndef LIBLEVENSHTEIN_COLLECTION_TRANSITION_H
2
#define LIBLEVENSHTEIN_COLLECTION_TRANSITION_H
3
4
#include "
liblevenshtein/collection/dawg_node.h
"
5
6
7
namespace
liblevenshtein
{
8
13
class
Transition
{
14
public
:
15
24
Transition
(
char
label
,
DawgNode
*
source
,
DawgNode
*
target
);
25
31
Transition
(
const
Transition
& transition) =
default
;
32
38
Transition
(
Transition
&& transition)
noexcept
;
39
46
[[
nodiscard
]]
auto
label
()
const
->
char
;
47
53
[[
nodiscard
]]
auto
source
()
const
->
DawgNode
*;
54
60
[[
nodiscard
]]
auto
target
()
const
->
DawgNode
*;
61
69
auto
operator
==(
const
Transition
&
other
)
const
->
bool
;
70
71
private
:
72
74
char
_label
;
75
77
DawgNode
*
_source
;
78
80
DawgNode
*
_target
;
81
};
82
83
}
// namespace liblevenshtein
84
85
#endif
// LIBLEVENSHTEIN_COLLECTION_TRANSITION_H
liblevenshtein::DawgNode
Represents a position within one or more terms of a DAWG dictionary.
Definition
dawg_node.h:20
liblevenshtein::Transition
Represents an edge from one DawgNode to another, annotated with a character label from the current po...
Definition
transition.h:13
liblevenshtein::Transition::Transition
Transition(const Transition &transition)=default
Copy constructor for this Transition.
liblevenshtein::Transition::_source
DawgNode * _source
DawgNode at the beginning of this Transition.
Definition
transition.h:77
liblevenshtein::Transition::source
auto source() const -> DawgNode *
Returns the initial DawgNode along the edge of this transition.
Definition
transition.cpp:22
liblevenshtein::Transition::_target
DawgNode * _target
DawgNode at the ending of this Transition.
Definition
transition.h:80
liblevenshtein::Transition::label
auto label() const -> char
Returns the label annotating the edge from the source to the target of this Transition.
Definition
transition.cpp:18
liblevenshtein::Transition::_label
char _label
Annotation along the edge of this Transition.
Definition
transition.h:74
liblevenshtein::Transition::Transition
Transition(char label, DawgNode *source, DawgNode *target)
Constructs a new Transition from a source DawgNode to its target, annotated by the given label.
Definition
transition.cpp:6
liblevenshtein::Transition::target
auto target() const -> DawgNode *
Returns the destination DawgNode along the edge of this transition.
Definition
transition.cpp:26
dawg_node.h
query
void query(ll::Dawg *dawg, const std::string &query_term, std::size_t max_distance)
Definition
main.cpp:25
liblevenshtein
Various utilities regarding Levenshtein transducers.
Definition
namespaces.dox:9
src
liblevenshtein
collection
transition.h
Generated by
1.10.0