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

An N-best lattice path iterator. More...

#include <n_best_iterator.hpp>

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

Public Member Functions

 n_best_iterator ()
 Creates an iterator.
 
 n_best_iterator (const lattice &lattice_, node eos_node, std::unique_ptr< constraint > &&p_constraint)
 Creates an iterator.
 
const pathoperator* () const
 Dereferences the iterator.
 
pathoperator* ()
 Dereferences the iterator.
 
const pathoperator-> () const
 Returns the pointer to the value.
 
pathoperator-> ()
 Returns the pointer to the value.
 
n_best_iteratoroperator++ ()
 Increments the iterator.
 
n_best_iterator operator++ (int)
 Postincrements the iterator.
 

Friends

bool operator== (const n_best_iterator &one, const n_best_iterator &another)
 Returns true when one iterator is equal to another.
 

Detailed Description

An N-best lattice path iterator.

Constructor & Destructor Documentation

◆ n_best_iterator() [1/2]

tetengo::lattice::n_best_iterator::n_best_iterator ( )

Creates an iterator.

It points to the last of the paths.

◆ n_best_iterator() [2/2]

tetengo::lattice::n_best_iterator::n_best_iterator ( const lattice lattice_,
node  eos_node,
std::unique_ptr< constraint > &&  p_constraint 
)

Creates an iterator.

Parameters
lattice_A lattice.
eos_nodeAn EOS node.
p_constraintA unique pointer to a constraint.
Exceptions
std::invalid_argumentWhen p_constraint is nullptr.

Member Function Documentation

◆ operator*() [1/2]

path & tetengo::lattice::n_best_iterator::operator* ( )

Dereferences the iterator.

Returns
The dereferenced value.

◆ operator*() [2/2]

const path & tetengo::lattice::n_best_iterator::operator* ( ) const

Dereferences the iterator.

Returns
The dereferenced value.

◆ operator++() [1/2]

n_best_iterator & tetengo::lattice::n_best_iterator::operator++ ( )

Increments the iterator.

Returns
This iterator.

◆ operator++() [2/2]

n_best_iterator tetengo::lattice::n_best_iterator::operator++ ( int  )

Postincrements the iterator.

Returns
The iterator before the incrementation.

◆ operator->() [1/2]

path * tetengo::lattice::n_best_iterator::operator-> ( )

Returns the pointer to the value.

Returns
The pointer to the value.

◆ operator->() [2/2]

const path * tetengo::lattice::n_best_iterator::operator-> ( ) const

Returns the pointer to the value.

Returns
The pointer to the value.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const n_best_iterator one,
const n_best_iterator another 
)
friend

Returns true when one iterator is equal to another.

Parameters
oneOne iterator.
anotherAnother iterator.
Return values
trueWhen one is equal to another.
falseOtherwise.

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