tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
connection.hpp
Go to the documentation of this file.
1
7#if !defined(TETENGO_LATTICE_CONNECTION_HPP)
8#define TETENGO_LATTICE_CONNECTION_HPP
9
10
11namespace tetengo::lattice
12{
17 {
18 public:
19 // constructors
20
26 explicit constexpr connection(int cost) : m_cost{ cost } {}
27
28
29 // functions
30
36 [[nodiscard]] constexpr int cost() const
37 {
38 return m_cost;
39 }
40
41
42 private:
43 // variables
44
45 int m_cost;
46 };
47
48
49}
50
51
52#endif
A connection.
Definition connection.hpp:17
constexpr connection(int cost)
Creates a connection.
Definition connection.hpp:26
constexpr int cost() const
Returns the cost.
Definition connection.hpp:36
A lattice library.