tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
constraintElement.h File Reference

A constraint element. More...

#include <stddef.h>
#include <tetengo/lattice/node.h>
+ Include dependency graph for constraintElement.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

tetengo_lattice_constraintElement_t * tetengo_lattice_constraintElement_createNodeConstraintElement (const tetengo_lattice_node_t *p_node)
 Creates a node constraint element.
 
tetengo_lattice_constraintElement_t * tetengo_lattice_constraintElement_createWildcardConstraintElement (size_t preceding_step)
 Creates a node constraint element.
 
void tetengo_lattice_constraintElement_destroy (const tetengo_lattice_constraintElement_t *p_constraint_element)
 Destroys a constraint element.
 
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.
 

Detailed Description

A constraint element.

Copyright (C) 2019-2024 kaoru https://www.tetengo.org/

Function Documentation

◆ 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_nodeA 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_stepAn 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_elementA 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_elementA pointer to a constraint element.
p_nodeA pointer to a node.
Return values
positiveThis constraint element matches the specified node, and also may match its preceding nodes.
0This constraint element matches the specified node, and do not match its precedings nodes.
negativeThis constraint element does not match the specified node. Or p_constraint_element and/or p_node are NULL.