Cambridge SMT System
function-weight.h File Reference
#include <fst/fstlib.h>
#include <list>
#include <vector>
#include <limits>
#include <iterator>
#include <ostream>
Include dependency graph for function-weight.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MertLine
 
class  CompositeList
 
class  CompositeList::cl_iterator
 
class  FunctionWeight
 
struct  FunctionArc
 
class  VectorToFunctionMapper< FromArc, T >
 
class  FunctionToStdMapper
 

Typedefs

typedef long long Wid
 
typedef std::vector< WidSentenceIdx
 
typedef double F
 
typedef std::list< MertLineMertList
 
typedef MertList::iterator MertIter
 
typedef CompositeList::cl_iterator CompIter
 

Functions

const MertLine zeroLine (std::numeric_limits< double >::infinity(), 0, 0)
 
const MertLine oneLine (0, 0, 0)
 
std::ostream & operator<< (std::ostream &, const MertLine &)
 
std::ostream & operator<< (std::ostream &, const MertList &)
 
std::istream & operator>> (std::istream &, MertList &)
 
bool operator== (const MertLine &, const MertLine &)
 
bool ApproxEqual (const FunctionWeight &, const FunctionWeight &, float)
 
FunctionWeight Plus (const FunctionWeight &, const FunctionWeight &)
 
FunctionWeight Times (const FunctionWeight &, const FunctionWeight &)
 
std::ostream & operator<< (std::ostream &strm, const FunctionWeight &w)
 
fst::TropicalWeightTpl< FMap (double)
 
template<class W , unsigned int n>
F DotProduct (const W &, const fst::TupleWeight< fst::TropicalWeightTpl< F >, n > &)
 
template<unsigned int n>
F DotProduct (const fst::TupleWeight< fst::TropicalWeightTpl< F >, n > &features, const std::vector< F > &params)
 

Variables

const MertList zeroList = InitFW (zeroLine)
 
const MertList oneList = InitFW (oneLine)
 

Typedef Documentation

Definition at line 103 of file function-weight.h.

typedef double F

Definition at line 26 of file function-weight.h.

typedef MertList::iterator MertIter

Definition at line 46 of file function-weight.h.

typedef std::list<MertLine> MertList

Definition at line 45 of file function-weight.h.

typedef std::vector<Wid> SentenceIdx

Definition at line 24 of file function-weight.h.

typedef long long Wid

Definition at line 22 of file function-weight.h.

Function Documentation

bool ApproxEqual ( const FunctionWeight ,
const FunctionWeight ,
float   
)

Definition at line 141 of file function-weight.cpp.

Here is the caller graph for this function:

template<class W , unsigned int n>
F DotProduct ( const W &  ,
const fst::TupleWeight< fst::TropicalWeightTpl< F >, n > &   
)

Here is the caller graph for this function:

template<unsigned int n>
F DotProduct ( const fst::TupleWeight< fst::TropicalWeightTpl< F >, n > &  features,
const std::vector< F > &  params 
)

Definition at line 215 of file function-weight.h.

fst::TropicalWeightTpl<F> Map ( double  )

Here is the caller graph for this function:

const MertLine oneLine ( ,
,
 
)
std::ostream& operator<< ( std::ostream &  ,
const MertLine  
)

Definition at line 19 of file function-weight.cpp.

Here is the caller graph for this function:

std::ostream& operator<< ( std::ostream &  ,
const MertList  
)

Definition at line 30 of file function-weight.cpp.

std::ostream& operator<< ( std::ostream &  strm,
const FunctionWeight w 
)

Definition at line 240 of file function-weight.cpp.

Here is the call graph for this function:

bool operator== ( const MertLine ,
const MertLine  
)

Definition at line 38 of file function-weight.cpp.

Here is the caller graph for this function:

std::istream& operator>> ( std::istream &  ,
MertList  
)

Here is the caller graph for this function:

FunctionWeight Plus ( const FunctionWeight ,
const FunctionWeight  
)

Definition at line 197 of file function-weight.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

FunctionWeight Times ( const FunctionWeight ,
const FunctionWeight  
)

Definition at line 163 of file function-weight.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const MertLine zeroLine ( std::numeric_limits< double >  ::infinity(),
,
 
)

Variable Documentation

const MertList oneList = InitFW (oneLine)

Definition at line 58 of file function-weight.h.

const MertList zeroList = InitFW (zeroLine)

Definition at line 57 of file function-weight.h.