7#if !defined(TETENGO_LATTICE_VOCABULARY_H)
8#define TETENGO_LATTICE_VOCABULARY_H
19#if defined(__cplusplus)
23#if !defined(DOCUMENTATION)
24typedef struct tetengo_lattice_vocabulary_tag tetengo_lattice_vocabulary_t;
46 size_t connection_count,
70 const tetengo_lattice_input_t* p_key,
100tetengo_lattice_vocabulary_t*
120 const tetengo_lattice_vocabulary_t* p_vocabulary,
121 const tetengo_lattice_input_t* p_key,
136 const tetengo_lattice_vocabulary_t* p_vocabulary,
142#if defined(__cplusplus)
A connection.
Definition connection.h:22
A custom vocabulary definition.
Definition vocabulary.h:54
size_t(* find_entries_proc)(void *p_context, const tetengo_lattice_input_t *p_key, tetengo_lattice_entryView_t *p_entries)
The procedure for findEntries.
Definition vocabulary.h:68
bool(* find_connection_proc)(void *p_context, const tetengo_lattice_node_t *p_from, const tetengo_lattice_entryView_t *p_to, tetengo_lattice_connection_t *p_connection)
The procedure for findConnection.
Definition vocabulary.h:85
void * p_context
Definition vocabulary.h:56
A pair of entries and a connection cost.
Definition connection.h:33
An entry view.
Definition entry.h:57
A pair of a key and entries.
Definition entry.h:74
A node.
Definition node.h:25
tetengo_lattice_vocabulary_t * tetengo_lattice_vocabulary_createUnorderedMapVocabulary(const tetengo_lattice_keyEntriesPair_t *p_entries, size_t entry_count, const tetengo_lattice_entriesConnectionCostPair_t *p_connections, size_t connection_count, size_t(*p_entry_hash)(const tetengo_lattice_entryView_t *), int(*p_entry_equal_to)(const tetengo_lattice_entryView_t *, const tetengo_lattice_entryView_t *))
Creates an unordered map vocabulary.
tetengo_lattice_vocabulary_t * tetengo_lattice_vocabulary_createCustomVocabulary(const tetengo_lattice_customVocabularyDefinition_t *p_definition)
Creates a custom vocabulary.
bool tetengo_lattice_vocabulary_findConnection(const tetengo_lattice_vocabulary_t *p_vocabulary, const tetengo_lattice_node_t *p_from, const tetengo_lattice_entryView_t *p_to, tetengo_lattice_connection_t *p_connection)
Finds a connection between entries.
struct tetengo_lattice_customVocabularyDefinition_tag tetengo_lattice_customVocabularyDefinition_t
A custom vocabulary definition.
size_t tetengo_lattice_vocabulary_findEntries(const tetengo_lattice_vocabulary_t *p_vocabulary, const tetengo_lattice_input_t *p_key, tetengo_lattice_entryView_t *p_entries)
Finds entries.
void tetengo_lattice_vocabulary_destroy(const tetengo_lattice_vocabulary_t *p_vocabulary)
Destroys a vocabulary.