Cambridge SMT System
fst::MakeWeight< TupleArc32 > Struct Template Reference

Template specialization of functor MakeWeight for TupleArc32. See lexicographic-tropical-tropical-funcs.h. More...

#include <tropical-sparse-tuple-weight.makeweight.h>

Public Member Functions

 MakeWeight (int32_t k=0)
 It is specially important that k defaults to 0 in this case, as MakeWeight is used by applylanguagemodeltask to transparently handle different arcs. More...
 
TupleArc32::Weight operator() (const float weight) const
 Creates a weight given a float. More...
 
TupleArc32::Weight operator() (const TupleArc32::Weight &weight) const
 Copies the weight through. More...
 
void update ()
 Increases index. Provides a way to do sequentially transparent operations, e.g. language model composition with three language models (see fstutils.applylmonthefly.hpp). More...
 
int32_t get_k ()
 

Detailed Description

template<>
struct fst::MakeWeight< TupleArc32 >

Template specialization of functor MakeWeight for TupleArc32. See lexicographic-tropical-tropical-funcs.h.

Definition at line 64 of file tropical-sparse-tuple-weight.makeweight.h.

Constructor & Destructor Documentation

fst::MakeWeight< TupleArc32 >::MakeWeight ( int32_t  k = 0)
inlineexplicit

It is specially important that k defaults to 0 in this case, as MakeWeight is used by applylanguagemodeltask to transparently handle different arcs.

Definition at line 66 of file tropical-sparse-tuple-weight.makeweight.h.

Member Function Documentation

int32_t fst::MakeWeight< TupleArc32 >::get_k ( )
inline

Definition at line 86 of file tropical-sparse-tuple-weight.makeweight.h.

TupleArc32::Weight fst::MakeWeight< TupleArc32 >::operator() ( const float  weight) const
inline

Creates a weight given a float.

Definition at line 71 of file tropical-sparse-tuple-weight.makeweight.h.

TupleArc32::Weight fst::MakeWeight< TupleArc32 >::operator() ( const TupleArc32::Weight &  weight) const
inline

Copies the weight through.

Definition at line 77 of file tropical-sparse-tuple-weight.makeweight.h.

void fst::MakeWeight< TupleArc32 >::update ( )
inline

Increases index. Provides a way to do sequentially transparent operations, e.g. language model composition with three language models (see fstutils.applylmonthefly.hpp).

Definition at line 83 of file tropical-sparse-tuple-weight.makeweight.h.


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