FST  openfst-1.7.1
OpenFst Library
Classes | Namespaces | Typedefs | Functions
float-weight.h File Reference
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <limits>
#include <sstream>
#include <string>
#include <type_traits>
#include <fst/util.h>
#include <fst/weight.h>
Include dependency graph for float-weight.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  fst::FloatLimits< T >
 
class  fst::FloatWeightTpl< T >
 
class  fst::TropicalWeightTpl< T >
 
class  fst::LogWeightTpl< T >
 
class  fst::Adder< LogWeightTpl< T > >
 
class  fst::MinMaxWeightTpl< T >
 
struct  fst::WeightConvert< LogWeight, TropicalWeight >
 
struct  fst::WeightConvert< Log64Weight, TropicalWeight >
 
struct  fst::WeightConvert< TropicalWeight, LogWeight >
 
struct  fst::WeightConvert< Log64Weight, LogWeight >
 
struct  fst::WeightConvert< TropicalWeight, Log64Weight >
 
struct  fst::WeightConvert< LogWeight, Log64Weight >
 
class  fst::FloatWeightGenerate< Weight >
 
class  fst::WeightGenerate< TropicalWeightTpl< T > >
 
class  fst::WeightGenerate< LogWeightTpl< T > >
 
class  fst::WeightGenerate< MinMaxWeightTpl< T > >
 

Namespaces

 fst
 
 fst::internal
 

Typedefs

using fst::FloatWeight = FloatWeightTpl< float >
 
using fst::TropicalWeight = TropicalWeightTpl< float >
 
using fst::LogWeight = LogWeightTpl< float >
 
using fst::Log64Weight = LogWeightTpl< double >
 
using fst::MinMaxWeight = MinMaxWeightTpl< float >
 

Functions

template<class T >
constexpr bool fst::operator== (const FloatWeightTpl< T > &w1, const FloatWeightTpl< T > &w2)
 
constexpr bool fst::operator== (const FloatWeightTpl< float > &w1, const FloatWeightTpl< float > &w2)
 
constexpr bool fst::operator== (const FloatWeightTpl< double > &w1, const FloatWeightTpl< double > &w2)
 
template<class T >
constexpr bool fst::operator!= (const FloatWeightTpl< T > &w1, const FloatWeightTpl< T > &w2)
 
constexpr bool fst::operator!= (const FloatWeightTpl< float > &w1, const FloatWeightTpl< float > &w2)
 
constexpr bool fst::operator!= (const FloatWeightTpl< double > &w1, const FloatWeightTpl< double > &w2)
 
template<class T >
constexpr bool fst::FloatApproxEqual (T w1, T w2, float delta=kDelta)
 
template<class T >
constexpr bool fst::ApproxEqual (const FloatWeightTpl< T > &w1, const FloatWeightTpl< T > &w2, float delta=kDelta)
 
template<class T >
std::ostream & fst::operator<< (std::ostream &strm, const FloatWeightTpl< T > &w)
 
template<class T >
std::istream & fst::operator>> (std::istream &strm, FloatWeightTpl< T > &w)
 
template<class T >
constexpr TropicalWeightTpl< T > fst::Plus (const TropicalWeightTpl< T > &w1, const TropicalWeightTpl< T > &w2)
 
constexpr TropicalWeightTpl< float > fst::Plus (const TropicalWeightTpl< float > &w1, const TropicalWeightTpl< float > &w2)
 
constexpr TropicalWeightTpl< double > fst::Plus (const TropicalWeightTpl< double > &w1, const TropicalWeightTpl< double > &w2)
 
template<class T >
constexpr TropicalWeightTpl< T > fst::Times (const TropicalWeightTpl< T > &w1, const TropicalWeightTpl< T > &w2)
 
constexpr TropicalWeightTpl< float > fst::Times (const TropicalWeightTpl< float > &w1, const TropicalWeightTpl< float > &w2)
 
constexpr TropicalWeightTpl< double > fst::Times (const TropicalWeightTpl< double > &w1, const TropicalWeightTpl< double > &w2)
 
template<class T >
constexpr TropicalWeightTpl< T > fst::Divide (const TropicalWeightTpl< T > &w1, const TropicalWeightTpl< T > &w2, DivideType typ=DIVIDE_ANY)
 
constexpr TropicalWeightTpl< float > fst::Divide (const TropicalWeightTpl< float > &w1, const TropicalWeightTpl< float > &w2, DivideType typ=DIVIDE_ANY)
 
constexpr TropicalWeightTpl< double > fst::Divide (const TropicalWeightTpl< double > &w1, const TropicalWeightTpl< double > &w2, DivideType typ=DIVIDE_ANY)
 
template<class T , class V , bool Enable = !std::is_same<V, size_t>::value, typename std::enable_if< Enable >::type * = nullptr>
constexpr TropicalWeightTpl< T > fst::Power (const TropicalWeightTpl< T > &w, V n)
 
template<>
constexpr TropicalWeightTpl< float > fst::Power< TropicalWeightTpl< float > > (const TropicalWeightTpl< float > &weight, size_t n)
 
template<>
constexpr TropicalWeightTpl< double > fst::Power< TropicalWeightTpl< double > > (const TropicalWeightTpl< double > &weight, size_t n)
 
double fst::internal::LogPosExp (double x)
 
double fst::internal::LogNegExp (double x)
 
double fst::internal::KahanLogSum (double a, double b, double *c)
 
double fst::internal::KahanLogDiff (double a, double b, double *c)
 
template<class T >
LogWeightTpl< T > fst::Plus (const LogWeightTpl< T > &w1, const LogWeightTpl< T > &w2)
 
LogWeightTpl< float > fst::Plus (const LogWeightTpl< float > &w1, const LogWeightTpl< float > &w2)
 
LogWeightTpl< double > fst::Plus (const LogWeightTpl< double > &w1, const LogWeightTpl< double > &w2)
 
template<class T >
constexpr LogWeightTpl< T > fst::Times (const LogWeightTpl< T > &w1, const LogWeightTpl< T > &w2)
 
constexpr LogWeightTpl< float > fst::Times (const LogWeightTpl< float > &w1, const LogWeightTpl< float > &w2)
 
constexpr LogWeightTpl< double > fst::Times (const LogWeightTpl< double > &w1, const LogWeightTpl< double > &w2)
 
template<class T >
constexpr LogWeightTpl< T > fst::Divide (const LogWeightTpl< T > &w1, const LogWeightTpl< T > &w2, DivideType typ=DIVIDE_ANY)
 
constexpr LogWeightTpl< float > fst::Divide (const LogWeightTpl< float > &w1, const LogWeightTpl< float > &w2, DivideType typ=DIVIDE_ANY)
 
constexpr LogWeightTpl< double > fst::Divide (const LogWeightTpl< double > &w1, const LogWeightTpl< double > &w2, DivideType typ=DIVIDE_ANY)
 
template<class T , class V , bool Enable = !std::is_same<V, size_t>::value, typename std::enable_if< Enable >::type * = nullptr>
constexpr LogWeightTpl< T > fst::Power (const LogWeightTpl< T > &w, V n)
 
template<>
constexpr LogWeightTpl< float > fst::Power< LogWeightTpl< float > > (const LogWeightTpl< float > &weight, size_t n)
 
template<>
constexpr LogWeightTpl< double > fst::Power< LogWeightTpl< double > > (const LogWeightTpl< double > &weight, size_t n)
 
template<class T >
constexpr MinMaxWeightTpl< T > fst::Plus (const MinMaxWeightTpl< T > &w1, const MinMaxWeightTpl< T > &w2)
 
constexpr MinMaxWeightTpl< float > fst::Plus (const MinMaxWeightTpl< float > &w1, const MinMaxWeightTpl< float > &w2)
 
constexpr MinMaxWeightTpl< double > fst::Plus (const MinMaxWeightTpl< double > &w1, const MinMaxWeightTpl< double > &w2)
 
template<class T >
constexpr MinMaxWeightTpl< T > fst::Times (const MinMaxWeightTpl< T > &w1, const MinMaxWeightTpl< T > &w2)
 
constexpr MinMaxWeightTpl< float > fst::Times (const MinMaxWeightTpl< float > &w1, const MinMaxWeightTpl< float > &w2)
 
constexpr MinMaxWeightTpl< double > fst::Times (const MinMaxWeightTpl< double > &w1, const MinMaxWeightTpl< double > &w2)
 
template<class T >
constexpr MinMaxWeightTpl< T > fst::Divide (const MinMaxWeightTpl< T > &w1, const MinMaxWeightTpl< T > &w2, DivideType typ=DIVIDE_ANY)
 
constexpr MinMaxWeightTpl< float > fst::Divide (const MinMaxWeightTpl< float > &w1, const MinMaxWeightTpl< float > &w2, DivideType typ=DIVIDE_ANY)
 
constexpr MinMaxWeightTpl< double > fst::Divide (const MinMaxWeightTpl< double > &w1, const MinMaxWeightTpl< double > &w2, DivideType typ=DIVIDE_ANY)