tetengo 1.8.2
A multipurpose library set
Loading...
Searching...
No Matches
constraint.h
Go to the documentation of this file.
1
7#if !defined(TETENGO_LATTICE_CONSTRAINT_H)
8#define TETENGO_LATTICE_CONSTRAINT_H
9
10#include <stdbool.h>
11#include <stddef.h>
12
15
16
17#if defined(__cplusplus)
18extern "C" {
19#endif
20
21#if !defined(DOCUMENTATION)
22typedef struct tetengo_lattice_constraint_tag tetengo_lattice_constraint_t;
23#endif
24
25
33tetengo_lattice_constraint_t* tetengo_lattice_constraint_createEmpty();
34
47tetengo_lattice_constraint_t*
48tetengo_lattice_constraint_create(tetengo_lattice_constraintElement_t* const* pp_pattern, size_t pattern_length);
49
55void tetengo_lattice_constraint_destroy(const tetengo_lattice_constraint_t* p_constraint);
56
68 const tetengo_lattice_constraint_t* p_constraint,
69 const tetengo_lattice_node_t* p_reverse_path,
70 size_t path_length);
71
83 const tetengo_lattice_constraint_t* p_constraint,
84 const tetengo_lattice_node_t* p_reverse_tail_path,
85 size_t tail_path_length);
86
87
88#if defined(__cplusplus)
89}
90#endif
91
92
93#endif
A constraint element.
bool tetengo_lattice_constraint_matches(const tetengo_lattice_constraint_t *p_constraint, const tetengo_lattice_node_t *p_reverse_path, size_t path_length)
Returns true when the path matches the pattern.
bool tetengo_lattice_constraint_matchesTail(const tetengo_lattice_constraint_t *p_constraint, const tetengo_lattice_node_t *p_reverse_tail_path, size_t tail_path_length)
Returns true when the tail path matches the tail of the pattern.
void tetengo_lattice_constraint_destroy(const tetengo_lattice_constraint_t *p_constraint)
Destroys a constraint.
tetengo_lattice_constraint_t * tetengo_lattice_constraint_createEmpty()
Creates an empty constraint.
tetengo_lattice_constraint_t * tetengo_lattice_constraint_create(tetengo_lattice_constraintElement_t *const *pp_pattern, size_t pattern_length)
Creates a constraint.
A node.
A node.
Definition node.h:25