A constraint.
More...
#include <constraint.hpp>
|
| constraint () |
| Creates an empty constraint.
|
|
| constraint (std::vector< std::unique_ptr< constraint_element > > &&pattern) |
| Creates a constraint.
|
|
| ~constraint () |
| Destroys the constraint.
|
|
bool | matches (const std::vector< node > &reverse_path) const |
| Returns true when the path matches the pattern.
|
|
bool | matches_tail (const std::vector< node > &reverse_tail_path) const |
| Returns true when the tail path matches the tail of the pattern.
|
|
◆ constraint() [1/2]
tetengo::lattice::constraint::constraint |
( |
| ) |
|
Creates an empty constraint.
It matches any path.
◆ constraint() [2/2]
tetengo::lattice::constraint::constraint |
( |
std::vector< std::unique_ptr< constraint_element > > && |
pattern | ) |
|
|
explicit |
Creates a constraint.
- Parameters
-
◆ matches()
bool tetengo::lattice::constraint::matches |
( |
const std::vector< node > & |
reverse_path | ) |
const |
Returns true when the path matches the pattern.
- Parameters
-
reverse_path | A path in reverse order. |
- Return values
-
true | When the path matches the pattern. |
false | Otherwise. |
◆ matches_tail()
bool tetengo::lattice::constraint::matches_tail |
( |
const std::vector< node > & |
reverse_tail_path | ) |
const |
Returns true when the tail path matches the tail of the pattern.
- Parameters
-
reverse_tail_path | A tail path in reverse order. |
- Return values
-
true | When the tail path matches the tail of the pattern. |
false | Otherwise. |
The documentation for this class was generated from the following file: