FST  openfst-1.8.3
OpenFst Library
Classes | Namespaces | Typedefs | Functions
float-weight.h File Reference
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ios>
#include <istream>
#include <limits>
#include <ostream>
#include <random>
#include <sstream>
#include <string>
#include <type_traits>
#include <fst/log.h>
#include <fst/util.h>
#include <fst/weight.h>
#include <fst/compat.h>
#include <string_view>
Include dependency graph for float-weight.h:

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::RealWeightTpl< T >
 
class  fst::Adder< RealWeightTpl< T > >
 
class  fst::MinMaxWeightTpl< T >
 
struct  fst::WeightConvert< LogWeight, TropicalWeight >
 
struct  fst::WeightConvert< Log64Weight, TropicalWeight >
 
struct  fst::WeightConvert< TropicalWeight, LogWeight >
 
struct  fst::WeightConvert< RealWeight, LogWeight >
 
struct  fst::WeightConvert< Real64Weight, LogWeight >
 
struct  fst::WeightConvert< Log64Weight, LogWeight >
 
struct  fst::WeightConvert< TropicalWeight, Log64Weight >
 
struct  fst::WeightConvert< RealWeight, Log64Weight >
 
struct  fst::WeightConvert< Real64Weight, Log64Weight >
 
struct  fst::WeightConvert< LogWeight, Log64Weight >
 
struct  fst::WeightConvert< LogWeight, RealWeight >
 
struct  fst::WeightConvert< Log64Weight, RealWeight >
 
struct  fst::WeightConvert< Real64Weight, RealWeight >
 
struct  fst::WeightConvert< LogWeight, Real64Weight >
 
struct  fst::WeightConvert< Log64Weight, Real64Weight >
 
struct  fst::WeightConvert< RealWeight, Real64Weight >
 
class  fst::FloatWeightGenerate< Weight >
 
class  fst::WeightGenerate< TropicalWeightTpl< T > >
 
class  fst::WeightGenerate< LogWeightTpl< T > >
 
class  fst::WeightGenerate< RealWeightTpl< 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::RealWeight = RealWeightTpl< float >
 
using fst::Real64Weight = RealWeightTpl< double >
 
using fst::MinMaxWeight = MinMaxWeightTpl< float >
 

Functions

template<class T >
constexpr bool fst::internal::IsNan (T value)
 
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<V, size_t>, typename std::enable_if_t< Enable > * = 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 >
LogWeightTpl< T > fst::Minus (const LogWeightTpl< T > &w1, const LogWeightTpl< T > &w2)
 
LogWeightTpl< float > fst::Minus (const LogWeightTpl< float > &w1, const LogWeightTpl< float > &w2)
 
LogWeightTpl< double > fst::Minus (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<V, size_t>, typename std::enable_if_t< Enable > * = 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)
 
double fst::internal::KahanRealSum (double a, double b, double *c)
 
template<class T >
RealWeightTpl< T > fst::Plus (const RealWeightTpl< T > &w1, const RealWeightTpl< T > &w2)
 
RealWeightTpl< float > fst::Plus (const RealWeightTpl< float > &w1, const RealWeightTpl< float > &w2)
 
RealWeightTpl< double > fst::Plus (const RealWeightTpl< double > &w1, const RealWeightTpl< double > &w2)
 
template<class T >
RealWeightTpl< T > fst::Minus (const RealWeightTpl< T > &w1, const RealWeightTpl< T > &w2)
 
RealWeightTpl< float > fst::Minus (const RealWeightTpl< float > &w1, const RealWeightTpl< float > &w2)
 
RealWeightTpl< double > fst::Minus (const RealWeightTpl< double > &w1, const RealWeightTpl< double > &w2)
 
template<class T >
constexpr RealWeightTpl< T > fst::Times (const RealWeightTpl< T > &w1, const RealWeightTpl< T > &w2)
 
constexpr RealWeightTpl< float > fst::Times (const RealWeightTpl< float > &w1, const RealWeightTpl< float > &w2)
 
constexpr RealWeightTpl< double > fst::Times (const RealWeightTpl< double > &w1, const RealWeightTpl< double > &w2)
 
template<class T >
constexpr RealWeightTpl< T > fst::Divide (const RealWeightTpl< T > &w1, const RealWeightTpl< T > &w2, DivideType typ=DIVIDE_ANY)
 
constexpr RealWeightTpl< float > fst::Divide (const RealWeightTpl< float > &w1, const RealWeightTpl< float > &w2, DivideType typ=DIVIDE_ANY)
 
constexpr RealWeightTpl< double > fst::Divide (const RealWeightTpl< double > &w1, const RealWeightTpl< double > &w2, DivideType typ=DIVIDE_ANY)
 
template<class T , class V , bool Enable = !std::is_same_v<V, size_t>, typename std::enable_if_t< Enable > * = nullptr>
constexpr RealWeightTpl< T > fst::Power (const RealWeightTpl< T > &w, V n)
 
template<>
constexpr RealWeightTpl< float > fst::Power< RealWeightTpl< float > > (const RealWeightTpl< float > &weight, size_t n)
 
template<>
constexpr RealWeightTpl< double > fst::Power< RealWeightTpl< double > > (const RealWeightTpl< 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)