tetengo 1.8.1
A multipurpose library set
Loading...
Searching...
No Matches
tetengo::lattice::lattice Class Reference

A lattice. More...

#include <lattice.hpp>

+ Inheritance diagram for tetengo::lattice::lattice:
+ Collaboration diagram for tetengo::lattice::lattice:

Public Member Functions

 lattice (const vocabulary &vocabulary_)
 Creates a lattice.
 
 ~lattice ()
 Destroys the lattice.
 
std::size_t step_count () const
 Returns the step count.
 
const std::vector< node > & nodes_at (std::size_t step) const
 Returns the nodes at the specified step.
 
void push_back (std::unique_ptr< input > &&p_input)
 Pushes back an input.
 
std::pair< node, std::unique_ptr< std::vector< int > > > settle ()
 Settles this lattice.
 

Detailed Description

A lattice.

Constructor & Destructor Documentation

◆ lattice()

tetengo::lattice::lattice::lattice ( const vocabulary vocabulary_)
explicit

Creates a lattice.

Parameters
vocabulary_A vocabulary.

Member Function Documentation

◆ nodes_at()

const std::vector< node > & tetengo::lattice::lattice::nodes_at ( std::size_t  step) const

Returns the nodes at the specified step.

Parameters
stepA step.
Returns
The nodes.
Exceptions
std::out_of_rageWhen step is too large.

◆ push_back()

void tetengo::lattice::lattice::push_back ( std::unique_ptr< input > &&  p_input)

Pushes back an input.

Parameters
p_inputA unique pointer to an input.

◆ settle()

std::pair< node, std::unique_ptr< std::vector< int > > > tetengo::lattice::lattice::settle ( )

Settles this lattice.

You can modify the lattice after settlement. Modification of the lattice after settlement invalidate the EOS node.

Returns
The EOS node and its preceding edge costs.

◆ step_count()

std::size_t tetengo::lattice::lattice::step_count ( ) const

Returns the step count.

Returns
The step count.

The documentation for this class was generated from the following file: