FST  openfst-1.7.1
OpenFst Library
Public Types | Public Member Functions | Static Public Member Functions | List of all members
fst::TupleWeight< W, n > Class Template Reference

#include <tuple-weight.h>

Inheritance diagram for fst::TupleWeight< W, n >:
Inheritance graph
[legend]

Public Types

using ReverseWeight = TupleWeight< typename W::ReverseWeight, n >
 
using Weight = W
 
using Index = size_t
 

Public Member Functions

template<class Iterator >
 TupleWeight (Iterator begin, Iterator end)
 
 TupleWeight (const W &weight=W::Zero())
 
 TupleWeight (Index index, const W &weight, const W &default_weight)
 
std::istream & Read (std::istream &istrm)
 
std::ostream & Write (std::ostream &ostrm) const
 
bool Member () const
 
size_t Hash () const
 
TupleWeight< W, n > Quantize (float delta=kDelta) const
 
ReverseWeight Reverse () const
 
const W & Value (size_t i) const
 
void SetValue (size_t i, const W &w)
 

Static Public Member Functions

static const TupleWeight< W, n > & Zero ()
 
static const TupleWeight< W, n > & One ()
 
static const TupleWeight< W, n > & NoWeight ()
 
static constexpr size_t Length ()
 

Detailed Description

template<class W, size_t n>
class fst::TupleWeight< W, n >

Definition at line 25 of file tuple-weight.h.

Member Typedef Documentation

template<class W, size_t n>
using fst::TupleWeight< W, n >::Index = size_t

Definition at line 30 of file tuple-weight.h.

template<class W, size_t n>
using fst::TupleWeight< W, n >::ReverseWeight = TupleWeight<typename W::ReverseWeight, n>

Definition at line 27 of file tuple-weight.h.

template<class W, size_t n>
using fst::TupleWeight< W, n >::Weight = W

Definition at line 29 of file tuple-weight.h.

Constructor & Destructor Documentation

template<class W, size_t n>
template<class Iterator >
fst::TupleWeight< W, n >::TupleWeight ( Iterator  begin,
Iterator  end 
)
inline

Definition at line 33 of file tuple-weight.h.

template<class W, size_t n>
fst::TupleWeight< W, n >::TupleWeight ( const W &  weight = W::Zero())
inlineexplicit

Definition at line 37 of file tuple-weight.h.

template<class W, size_t n>
fst::TupleWeight< W, n >::TupleWeight ( Index  index,
const W &  weight,
const W &  default_weight 
)
inline

Definition at line 41 of file tuple-weight.h.

Member Function Documentation

template<class W, size_t n>
size_t fst::TupleWeight< W, n >::Hash ( ) const
inline

Definition at line 78 of file tuple-weight.h.

template<class W, size_t n>
static constexpr size_t fst::TupleWeight< W, n >::Length ( )
inlinestatic

Definition at line 61 of file tuple-weight.h.

template<class W, size_t n>
bool fst::TupleWeight< W, n >::Member ( ) const
inline

Definition at line 73 of file tuple-weight.h.

template<class W, size_t n>
static const TupleWeight<W, n>& fst::TupleWeight< W, n >::NoWeight ( )
inlinestatic

Definition at line 56 of file tuple-weight.h.

template<class W, size_t n>
static const TupleWeight<W, n>& fst::TupleWeight< W, n >::One ( )
inlinestatic

Definition at line 51 of file tuple-weight.h.

template<class W, size_t n>
TupleWeight<W, n> fst::TupleWeight< W, n >::Quantize ( float  delta = kDelta) const
inline

Definition at line 84 of file tuple-weight.h.

template<class W, size_t n>
std::istream& fst::TupleWeight< W, n >::Read ( std::istream &  istrm)
inline

Definition at line 63 of file tuple-weight.h.

template<class W, size_t n>
ReverseWeight fst::TupleWeight< W, n >::Reverse ( ) const
inline

Definition at line 92 of file tuple-weight.h.

template<class W, size_t n>
void fst::TupleWeight< W, n >::SetValue ( size_t  i,
const W &  w 
)
inline

Definition at line 100 of file tuple-weight.h.

template<class W, size_t n>
const W& fst::TupleWeight< W, n >::Value ( size_t  i) const
inline

Definition at line 98 of file tuple-weight.h.

template<class W, size_t n>
std::ostream& fst::TupleWeight< W, n >::Write ( std::ostream &  ostrm) const
inline

Definition at line 68 of file tuple-weight.h.

template<class W, size_t n>
static const TupleWeight<W, n>& fst::TupleWeight< W, n >::Zero ( )
inlinestatic

Definition at line 46 of file tuple-weight.h.


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