FST  openfst-1.7.3
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 std::string &weight_type, const std::string &weight_str)
 
 WeightClass (const WeightClass &other)
 
WeightClassoperator= (const WeightClass &other)
 
template<class W >
const W * GetWeight () const
 
std::string ToString () const
 
const std::string & Type () const
 
bool Member () const
 
bool WeightTypesMatch (const WeightClass &other, const std::string &op_name) const
 

Static Public Member Functions

static WeightClass Zero (const std::string &weight_type)
 
static WeightClass One (const std::string &weight_type)
 
static WeightClass NoWeight (const std::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 98 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 103 of file weight-class.h.

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

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

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

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

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

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

Member Function Documentation

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

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

bool fst::script::WeightClass::Member ( ) const
inline

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Friends And Related Function Documentation

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

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

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

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

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

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

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

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

WeightClass Power ( const WeightClass w,
size_t  n 
)
friend

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

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

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

Member Data Documentation

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

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

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

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

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

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


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