tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
unordered_map_vocabulary.hpp
Go to the documentation of this file.
1
7#if !defined(TETENGO_LATTICE_UNORDEREDMAPVOCABULARY_HPP)
8#define TETENGO_LATTICE_UNORDEREDMAPVOCABULARY_HPP
9
10#include <cstddef>
11#include <functional>
12#include <memory>
13#include <string>
14#include <utility>
15#include <vector>
16
19
20
21namespace tetengo::lattice
22{
23 class connection;
24 class input;
25 class node;
26
27
32 {
33 public:
34 // constructors and destructor
35
45 std::vector<std::pair<std::string, std::vector<entry>>> entries,
46 std::vector<std::pair<std::pair<entry, entry>, int>> connections,
47 std::function<std::size_t(const entry_view&)> entry_hash,
48 std::function<bool(const entry_view&, const entry_view&)> entry_equal_to);
49
54
55
56 private:
57 // types
58
59 class impl;
60
61
62 // variables
63
64 std::unique_ptr<impl> m_p_impl;
65
66
67 // virtual functions
68
69 virtual std::vector<entry_view> find_entries_impl(const input& key) const override;
70
71 virtual connection find_connection_impl(const node& from, const entry_view& to) const override;
72 };
73
74
75}
76
77
78#endif
A connection.
Definition connection.hpp:17
An entry view.
Definition entry.hpp:110
An input.
Definition input.hpp:24
A node.
Definition node.hpp:27
An unordered map vocabulary.
Definition unordered_map_vocabulary.hpp:32
unordered_map_vocabulary(std::vector< std::pair< std::string, std::vector< entry > > > entries, std::vector< std::pair< std::pair< entry, entry >, int > > connections, std::function< std::size_t(const entry_view &)> entry_hash, std::function< bool(const entry_view &, const entry_view &)> entry_equal_to)
Creates an unordered map vocabulary.
virtual ~unordered_map_vocabulary()
Destroys the unordered map vocabulary.
A vocabulary.
Definition vocabulary.hpp:28
An entry.
A lattice library.
A vocabulary.