tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
path.hpp
Go to the documentation of this file.
1
7#if !defined(TETENGO_LATTICE_PATH_HPP)
8#define TETENGO_LATTICE_PATH_HPP
9
10#include <vector>
11
13
14
15namespace tetengo::lattice
16{
20 class path
21 {
22 public:
23 // constructors and destructor
24
29
36 path(std::vector<node> nodes, int cost);
37
38
39 // functions
40
47 [[nodiscard]] bool empty() const;
48
54 [[nodiscard]] const std::vector<node>& nodes() const;
55
61 [[nodiscard]] int cost() const;
62
63
64 private:
65 // variables
66
67 std::vector<node> m_nodes;
68
69 int m_cost;
70 };
71
72
73}
74
75
76#endif
A path.
Definition path.hpp:21
bool empty() const
Returns true when this path is empty.
int cost() const
Returns the cost.
path()
Creates an empty path.
const std::vector< node > & nodes() const
Returns the nodes.
path(std::vector< node > nodes, int cost)
Creates a path.
A lattice library.
A node.