A constraint element.
More...
#include <stddef.h>
#include <tetengo/lattice/node.h>
Go to the source code of this file.
A constraint element.
Copyright (C) 2019-2024 kaoru https://www.tetengo.org/
◆ tetengo_lattice_constraintElement_createNodeConstraintElement()
tetengo_lattice_constraintElement_t * tetengo_lattice_constraintElement_createNodeConstraintElement |
( |
const tetengo_lattice_node_t * | p_node | ) |
|
Creates a node constraint element.
- Parameters
-
p_node | A pointer to a node. |
- Returns
- A pointer to a node constraint element. Or NULL when p_node is NULL.
◆ tetengo_lattice_constraintElement_createWildcardConstraintElement()
tetengo_lattice_constraintElement_t * tetengo_lattice_constraintElement_createWildcardConstraintElement |
( |
size_t | preceding_step | ) |
|
Creates a node constraint element.
- Parameters
-
preceding_step | An index of a preceding step. |
- Returns
- A pointer to a node constraint element. Or NULL when p_node is NULL.
◆ tetengo_lattice_constraintElement_destroy()
void tetengo_lattice_constraintElement_destroy |
( |
const tetengo_lattice_constraintElement_t * | p_constraint_element | ) |
|
Destroys a constraint element.
- Parameters
-
p_constraint_element | A pointer to a constraint element. |
◆ tetengo_lattice_constraintElement_matches()
int tetengo_lattice_constraintElement_matches |
( |
const tetengo_lattice_constraintElement_t * | p_constraint_element, |
|
|
const tetengo_lattice_node_t * | p_node ) |
Returns whether this constraint element matches the specified node.
- Parameters
-
p_constraint_element | A pointer to a constraint element. |
p_node | A pointer to a node. |
- Return values
-
positive | This constraint element matches the specified node, and also may match its preceding nodes. |
0 | This constraint element matches the specified node, and do not match its precedings nodes. |
negative | This constraint element does not match the specified node. Or p_constraint_element and/or p_node are NULL. |