liblevenshtein 4.0.0
A library for generating Finite State Transducers based on Levenshtein Automata.
Loading...
Searching...
No Matches
unsubsume.h
Go to the documentation of this file.
1#ifndef LIBLEVENSHTEIN_TRANSDUCER_UNSUBSUME_H
2#define LIBLEVENSHTEIN_TRANSDUCER_UNSUBSUME_H
3
4#include <cstddef>
5#include <functional>
6
9
10namespace liblevenshtein {
11
14using SubsumesFn = std::function<bool(Position *, Position *, std::size_t)>;
15
21public:
22
31
40 void operator()(State *state, std::size_t query_length);
41
42private:
43
47};
48
49} // namespace liblevenshtein
50
51
52#endif // LIBLEVENSHTEIN_TRANSDUCER_UNSUBSUME_H
Represents a location within the Levenshtein automaton.
Definition position.h:11
Consists of a closure of Position nodes within the Levenshtein automaton.
Definition state.h:23
Removes (unsubsumes) all Positions from a State that are subsumed by another Position within the same...
Definition unsubsume.h:20
SubsumesFn subsumes
Determines whether one Position subsumes another given the maximum edit distance to consider.
Definition unsubsume.h:46
void operator()(State *state, std::size_t query_length)
Removes (unsubsumes) all Positions from a State that are subsumed by another Position within the same...
Definition unsubsume.cpp:10
UnsubsumeFn(SubsumesFn subsumes)
Constructs a new UnsubsumeFn that uses a SubsumesFn to filter-out subsumed Positions from a State.
Definition unsubsume.cpp:8
void query(ll::Dawg *dawg, const std::string &query_term, std::size_t max_distance)
Definition main.cpp:25
Various utilities regarding Levenshtein transducers.
Definition namespaces.dox:9
std::function< bool(Position *, Position *, std::size_t)> SubsumesFn
Determines whether one Position subsumes another given the maximum edit distance to consider.
Definition unsubsume.h:14