tetengo 1.8.1
A multipurpose library set
Loading...
Searching...
No Matches
node.h File Reference

A node. More...

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

Go to the source code of this file.

Classes

struct  tetengo_lattice_node_tag
 A node. More...
 

Typedefs

typedef struct tetengo_lattice_node_tag tetengo_lattice_node_t
 A node.
 

Functions

bool tetengo_lattice_node_bos (const int *p_preceding_edge_costs, size_t preceding_edge_count, tetengo_lattice_node_t *p_bos)
 Returns the pointer to the BOS (Beginning of Sequence).
 
bool tetengo_lattice_node_eos (size_t preceding_step, const int *p_preceding_edge_costs, size_t preceding_edge_count, size_t best_preceding_node, int path_cost, tetengo_lattice_node_t *p_eos)
 Returns an EOS (End of Sequence).
 
bool tetengo_lattice_node_toNode (const tetengo_lattice_entryView_t *p_entry, size_t index_in_step, size_t preceding_step, const int *p_preceding_edge_costs, size_t preceding_edge_count, size_t best_preceding_node, int path_cost, tetengo_lattice_node_t *p_node)
 Makes a node from an entry.
 
bool tetengo_lattice_node_equal (const tetengo_lattice_node_t *p_one, const tetengo_lattice_node_t *p_another)
 Returns true if one node is equal to another.
 
bool tetengo_lattice_node_isBos (const tetengo_lattice_node_t *p_node)
 Returns true is this node is the BOS.
 

Detailed Description

A node.

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

Function Documentation

◆ tetengo_lattice_node_bos()

bool tetengo_lattice_node_bos ( const int *  p_preceding_edge_costs,
size_t  preceding_edge_count,
tetengo_lattice_node_t p_bos 
)

Returns the pointer to the BOS (Beginning of Sequence).

Parameters
p_preceding_edge_costsA pointer to preceding edge costs.
preceding_edge_countA preceding edge count.
p_bosThe storage for an output BOS.
Return values
trueWhen an BOS is stored.
falseOtherwise.

◆ tetengo_lattice_node_eos()

bool tetengo_lattice_node_eos ( size_t  preceding_step,
const int *  p_preceding_edge_costs,
size_t  preceding_edge_count,
size_t  best_preceding_node,
int  path_cost,
tetengo_lattice_node_t p_eos 
)

Returns an EOS (End of Sequence).

Parameters
preceding_stepAn index of a preceding step.
p_preceding_edge_costsA pointer to preceding edge costs.
preceding_edge_countA preceding edge count.
best_preceding_nodeAn index of a best preceding node.
path_costA path cost.
p_eosThe storage for an output EOS.
Return values
trueWhen an EOS is stored.
falseOtherwise.

◆ tetengo_lattice_node_equal()

bool tetengo_lattice_node_equal ( const tetengo_lattice_node_t p_one,
const tetengo_lattice_node_t p_another 
)

Returns true if one node is equal to another.

Parameters
p_oneA pointer to one node.
p_anotherA pointer to another node.
Return values
trueWhen one node is equal to another.
falseOtherwise.

◆ tetengo_lattice_node_isBos()

bool tetengo_lattice_node_isBos ( const tetengo_lattice_node_t p_node)

Returns true is this node is the BOS.

Parameters
p_nodeA pointer to node.
Return values
trueWhen this node is the BOS.
falseOtherwise.

◆ tetengo_lattice_node_toNode()

bool tetengo_lattice_node_toNode ( const tetengo_lattice_entryView_t p_entry,
size_t  index_in_step,
size_t  preceding_step,
const int *  p_preceding_edge_costs,
size_t  preceding_edge_count,
size_t  best_preceding_node,
int  path_cost,
tetengo_lattice_node_t p_node 
)

Makes a node from an entry.

Parameters
p_entryA pointer to an entry.
index_in_stepAn index of the step.
preceding_stepAn index of a preceding step.
p_preceding_edge_costsA pointer to preceding edge costs.
preceding_edge_countA preceding edge count.
best_preceding_nodeAn index of a best preceding node.
path_costA path cost.
p_nodeThe storage for an output node.
Return values
trueWhen a node is stored.
falseOtherwise.