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

#include <sparse-power-weight.h>

Inheritance diagram for fst::SparsePowerWeight< W, K >:
Inheritance graph
[legend]
Collaboration diagram for fst::SparsePowerWeight< W, K >:
Collaboration graph
[legend]

Public Types

using ReverseWeight = SparsePowerWeight< typename W::ReverseWeight, K >
 
- Public Types inherited from fst::SparseTupleWeight< W, K >
using ReverseWeight = SparseTupleWeight< typename W::ReverseWeight, K >
 
using Iterator = SparseTupleWeightIterator< W, K >
 
using Pair = std::pair< K, W >
 
using Weight = W
 
using Index = K
 

Public Member Functions

 SparsePowerWeight ()
 
 SparsePowerWeight (const SparseTupleWeight< W, K > &weight)
 
template<class Iterator >
 SparsePowerWeight (Iterator begin, Iterator end)
 
 SparsePowerWeight (const K &key, const W &weight, const W &default_weight=W::Zero())
 
SparsePowerWeight Quantize (float delta=kDelta) const
 
ReverseWeight Reverse () const
 
- Public Member Functions inherited from fst::SparseTupleWeight< W, K >
 SparseTupleWeight ()
 
template<class Iterator >
 SparseTupleWeight (Iterator begin, Iterator end)
 
 SparseTupleWeight (const K &key, const W &weight, const W &default_weight)
 
 SparseTupleWeight (const W &weight)
 
 SparseTupleWeight (const SparseTupleWeight &weight)
 
 SparseTupleWeight (SparseTupleWeight &&weight)
 
std::istream & Read (std::istream &strm)
 
std::ostream & Write (std::ostream &strm) const
 
SparseTupleWeightoperator= (const SparseTupleWeight &weight)
 
SparseTupleWeightoperator= (SparseTupleWeight &&weight)
 
bool Member () const
 
size_t Hash () const
 
SparseTupleWeight Quantize (float delta=kDelta) const
 
ReverseWeight Reverse () const
 
void Init (const W &default_value=W::Zero())
 
size_t Size () const
 
void PushBack (const K &key, const W &weight, bool default_value_check=true)
 
void PushBack (const Pair &pair, bool default_value_check=true)
 
const W & Value (const K &key) const
 
void SetValue (const K &key, const W &w)
 
void SetDefaultValue (const W &value)
 
const W & DefaultValue () const
 

Static Public Member Functions

static const SparsePowerWeightZero ()
 
static const SparsePowerWeightOne ()
 
static const SparsePowerWeightNoWeight ()
 
static const string & Type ()
 
static constexpr uint64 Properties ()
 
- Static Public Member Functions inherited from fst::SparseTupleWeight< W, K >
static const SparseTupleWeightZero ()
 
static const SparseTupleWeightOne ()
 
static const SparseTupleWeightNoWeight ()
 

Additional Inherited Members

- Static Public Attributes inherited from fst::SparseTupleWeight< W, K >
static constexpr K kNoKey = -1
 

Detailed Description

template<class W, class K = int>
class fst::SparsePowerWeight< W, K >

Definition at line 33 of file sparse-power-weight.h.

Member Typedef Documentation

template<class W, class K = int>
using fst::SparsePowerWeight< W, K >::ReverseWeight = SparsePowerWeight<typename W::ReverseWeight, K>

Definition at line 35 of file sparse-power-weight.h.

Constructor & Destructor Documentation

template<class W, class K = int>
fst::SparsePowerWeight< W, K >::SparsePowerWeight ( )
inline

Definition at line 37 of file sparse-power-weight.h.

template<class W, class K = int>
fst::SparsePowerWeight< W, K >::SparsePowerWeight ( const SparseTupleWeight< W, K > &  weight)
inlineexplicit

Definition at line 39 of file sparse-power-weight.h.

template<class W, class K = int>
template<class Iterator >
fst::SparsePowerWeight< W, K >::SparsePowerWeight ( Iterator  begin,
Iterator  end 
)
inline

Definition at line 43 of file sparse-power-weight.h.

template<class W, class K = int>
fst::SparsePowerWeight< W, K >::SparsePowerWeight ( const K &  key,
const W &  weight,
const W &  default_weight = W::Zero() 
)
inline

Definition at line 48 of file sparse-power-weight.h.

Member Function Documentation

template<class W, class K = int>
static const SparsePowerWeight& fst::SparsePowerWeight< W, K >::NoWeight ( )
inlinestatic

Definition at line 62 of file sparse-power-weight.h.

template<class W, class K = int>
static const SparsePowerWeight& fst::SparsePowerWeight< W, K >::One ( )
inlinestatic

Definition at line 57 of file sparse-power-weight.h.

template<class W, class K = int>
static constexpr uint64 fst::SparsePowerWeight< W, K >::Properties ( )
inlinestatic

Definition at line 81 of file sparse-power-weight.h.

template<class W, class K = int>
SparsePowerWeight fst::SparsePowerWeight< W, K >::Quantize ( float  delta = kDelta) const
inline

Definition at line 86 of file sparse-power-weight.h.

template<class W, class K = int>
ReverseWeight fst::SparsePowerWeight< W, K >::Reverse ( ) const
inline

Definition at line 90 of file sparse-power-weight.h.

template<class W, class K = int>
static const string& fst::SparsePowerWeight< W, K >::Type ( )
inlinestatic

Definition at line 70 of file sparse-power-weight.h.

template<class W, class K = int>
static const SparsePowerWeight& fst::SparsePowerWeight< W, K >::Zero ( )
inlinestatic

Definition at line 52 of file sparse-power-weight.h.


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