FST  openfst-1.8.3
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 Base = SparseTupleWeight< W, K >
 
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 ()=default
 
 SparsePowerWeight (const Base &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 ()
 
 ~SparseTupleWeight () noexcept=default
 
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) noexcept
 
std::istream & Read (std::istream &strm)
 
std::ostream & Write (std::ostream &strm) const
 
SparseTupleWeightoperator= (const SparseTupleWeight &weight)
 
SparseTupleWeightoperator= (SparseTupleWeight &&weight) noexcept
 
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 std::string & Type ()
 
static constexpr uint64_t 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 49 of file sparse-power-weight.h.

Member Typedef Documentation

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

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

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

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

Constructor & Destructor Documentation

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

Definition at line 56 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 59 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 63 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 77 of file sparse-power-weight.h.

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

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

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

Definition at line 95 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 100 of file sparse-power-weight.h.

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

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

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

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

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

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


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