FST  openfst-1.7.0
OpenFst Library
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
fst::script::WeightClass Class Reference

#include <weight-class.h>

Public Member Functions

 WeightClass ()=default
 
template<class W >
 WeightClass (const W &weight)
 
template<class W >
 WeightClass (const WeightClassImpl< W > &impl)
 
 WeightClass (const string &weight_type, const string &weight_str)
 
 WeightClass (const WeightClass &other)
 
WeightClassoperator= (const WeightClass &other)
 
template<class W >
const W * GetWeight () const
 
string ToString () const
 
const string & Type () const
 
bool WeightTypesMatch (const WeightClass &other, const string &op_name) const
 

Static Public Member Functions

static WeightClass Zero (const string &weight_type)
 
static WeightClass One (const string &weight_type)
 
static WeightClass NoWeight (const string &weight_type)
 

Static Public Attributes

static constexpr const char * __ZERO__ = "__ZERO__"
 
static constexpr const char * __ONE__ = "__ONE__"
 
static constexpr const char * __NOWEIGHT__ = "__NOWEIGHT__"
 

Friends

bool operator== (const WeightClass &lhs, const WeightClass &rhs)
 
WeightClass Plus (const WeightClass &lhs, const WeightClass &rhs)
 
WeightClass Times (const WeightClass &lhs, const WeightClass &rhs)
 
WeightClass Divide (const WeightClass &lhs, const WeightClass &rhs)
 
WeightClass Power (const WeightClass &w, size_t n)
 
std::ostream & operator<< (std::ostream &o, const WeightClass &c)
 

Detailed Description

Definition at line 95 of file weight-class.h.

Constructor & Destructor Documentation

fst::script::WeightClass::WeightClass ( )
default
template<class W >
fst::script::WeightClass::WeightClass ( const W &  weight)
inlineexplicit

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

template<class W >
fst::script::WeightClass::WeightClass ( const WeightClassImpl< W > &  impl)
inlineexplicit

Definition at line 104 of file weight-class.h.

fst::script::WeightClass::WeightClass ( const string &  weight_type,
const string &  weight_str 
)

Definition at line 13 of file weight-class.cc.

fst::script::WeightClass::WeightClass ( const WeightClass other)
inline

Definition at line 109 of file weight-class.h.

Member Function Documentation

template<class W >
const W* fst::script::WeightClass::GetWeight ( ) const
inline

Definition at line 130 of file weight-class.h.

WeightClass fst::script::WeightClass::NoWeight ( const string &  weight_type)
static

Definition at line 32 of file weight-class.cc.

WeightClass fst::script::WeightClass::One ( const string &  weight_type)
static

Definition at line 28 of file weight-class.cc.

WeightClass& fst::script::WeightClass::operator= ( const WeightClass other)
inline

Definition at line 112 of file weight-class.h.

string fst::script::WeightClass::ToString ( ) const
inline

Definition at line 139 of file weight-class.h.

const string& fst::script::WeightClass::Type ( ) const
inline

Definition at line 141 of file weight-class.h.

bool fst::script::WeightClass::WeightTypesMatch ( const WeightClass other,
const string &  op_name 
) const

Definition at line 36 of file weight-class.cc.

WeightClass fst::script::WeightClass::Zero ( const string &  weight_type)
static

Definition at line 24 of file weight-class.cc.

Friends And Related Function Documentation

WeightClass Divide ( const WeightClass lhs,
const WeightClass rhs 
)
friend

Definition at line 79 of file weight-class.cc.

std::ostream& operator<< ( std::ostream &  o,
const WeightClass c 
)
friend

Definition at line 96 of file weight-class.cc.

bool operator== ( const WeightClass lhs,
const WeightClass rhs 
)
friend

Definition at line 46 of file weight-class.cc.

WeightClass Plus ( const WeightClass lhs,
const WeightClass rhs 
)
friend

Definition at line 59 of file weight-class.cc.

WeightClass Power ( const WeightClass w,
size_t  n 
)
friend

Definition at line 89 of file weight-class.cc.

WeightClass Times ( const WeightClass lhs,
const WeightClass rhs 
)
friend

Definition at line 69 of file weight-class.cc.

Member Data Documentation

constexpr const char* fst::script::WeightClass::__NOWEIGHT__ = "__NOWEIGHT__"
static

Definition at line 125 of file weight-class.h.

constexpr const char* fst::script::WeightClass::__ONE__ = "__ONE__"
static

Definition at line 121 of file weight-class.h.

constexpr const char* fst::script::WeightClass::__ZERO__ = "__ZERO__"
static

Definition at line 117 of file weight-class.h.


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