tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
lattice.hpp
Go to the documentation of this file.
1
7#if !defined(TETENGO_LATTICE_LATTICE_HPP)
8#define TETENGO_LATTICE_LATTICE_HPP
9
10#include <cstddef>
11#include <memory>
12#include <utility>
13#include <vector>
14
15#include <boost/core/noncopyable.hpp>
16
17
18namespace tetengo::lattice
19{
20 class input;
21 class vocabulary;
22 class node;
23
24
28 class lattice : private boost::noncopyable
29 {
30 public:
31 // constructors and destructor
32
38 explicit lattice(const vocabulary& vocabulary_);
39
44
45
46 // functions
47
53 [[nodiscard]] std::size_t step_count() const;
54
64 [[nodiscard]] const std::vector<node>& nodes_at(std::size_t step) const;
65
71 void push_back(std::unique_ptr<input>&& p_input);
72
81 [[nodiscard]] std::pair<node, std::unique_ptr<std::vector<int>>> settle();
82
83
84 private:
85 // types
86
87 class impl;
88
89
90 // variables
91
92 const std::unique_ptr<impl> m_p_impl;
93 };
94
95
96}
97
98
99#endif
A lattice.
Definition lattice.hpp:29
lattice(const vocabulary &vocabulary_)
Creates a lattice.
std::pair< node, std::unique_ptr< std::vector< int > > > settle()
Settles this lattice.
void push_back(std::unique_ptr< input > &&p_input)
Pushes back an input.
const std::vector< node > & nodes_at(std::size_t step) const
Returns the nodes at the specified step.
~lattice()
Destroys the lattice.
std::size_t step_count() const
Returns the step count.
A vocabulary.
Definition vocabulary.hpp:28
A lattice library.