OpenGM  2.3.x
Discrete Graphical Model Library
opengmpython.hxx
Go to the documentation of this file.
1 #ifndef OPENGM_PYTHON_EXPORT_TYPEDEFS_HXX
2 #define OPENGM_PYTHON_EXPORT_TYPEDEFS_HXX
3 
4 #include <map>
5 
9 
20 
23 
28 
29 
30 #include <algorithm>
31 #include <vector>
32 #include <cmath>
33 
34 
35 
36 
37 namespace opengm{
38 namespace python{
39 
40 
41  template<class V,class I,class O,class F>
42  struct GmGen{
45  };
46  template<class V,class I>
47  struct ETLGen{
49  };
50 
51  template<class V,class I>
52  struct FTLGen{
53 
54  typedef V ValueType;
55  typedef I IndexType;
56  typedef I LabelType;
66 
67 
68  typedef typename opengm::meta::TypeListGenerator<
69  PyExplicitFunction,
70  PyPottsFunction,
71  PyPottsNFunction,
72  PyPottsGFunction,
73  PyTruncatedAbsoluteDifferenceFunction,
74  PyTruncatedSquaredDifferenceFunction,
75  PySparseFunction,
77  PyLUnaryFunction
79  };
80 
81 
82 
83  typedef double GmValueType;
85  typedef GmIndexType GmLabelType;
86 
87 
89 
90 
91  // different function types
103 
104  typedef std::vector<GmIndexType> IndexVectorType;
105  typedef std::vector<IndexVectorType> IndexVectorVectorType;
106 
107  typedef GmGen<
108  GmValueType,
109  GmIndexType,
110  opengm::Adder ,
113 
115  typedef FactorGmAdder GmAdderFactor;
116 
117  typedef GmGen<
118  GmValueType,
119  GmIndexType,
123 
125 
126  typedef FactorGmMultiplier GmMultiplierFactor;
127 
129 
130  namespace pyenums{
135  };
139  };
143  };
144 
146  VIEW=0, TABLES=1, TL1=2, TL2=3
147  };
148  }
149 
150 }
151 }
152 
153 #endif /* OPENGM_PYTHON_EXPORT_TYPEDEFS_HXX */
154 
opengm::functions::learnable::LUnary< GmValueType, GmIndexType, GmLabelType > PyLUnaryFunction
opengm::PottsNFunction< GmValueType, GmIndexType, GmLabelType > GmPottsNFunction
The OpenGM namespace.
Definition: config.hxx:43
opengm::TruncatedAbsoluteDifferenceFunction< GmValueType, GmIndexType, GmLabelType > GmTruncatedAbsoluteDifferenceFunction
GmGen< GmValueType, GmIndexType, opengm::Multiplier, FTLGen< GmValueType, GmIndexType >::type >::type GmMultiplier
opengm::SparseFunction< ValueType, IndexType, LabelType > PySparseFunction
Multiplication as a binary operation.
Definition: multiplier.hxx:12
FactorGmAdder GmAdderFactor
Addition as a binary operation.
Definition: adder.hxx:10
Discrete space in which variables can have differently many labels.
Factor (with corresponding function and variable indices), independent of a GraphicalModel.
opengm::PottsFunction< ValueType, IndexType, LabelType > PyPottsFunction
opengm::AbsoluteDifferenceFunction< GmValueType, GmIndexType, GmLabelType > GmAbsoluteDifferenceFunction
opengm::IndependentFactor< GmValueType, GmIndexType, GmIndexType > GmIndependentFactor
squared difference of the labels of two variables
Absolute difference between two labels.
opengm::PottsGFunction< GmValueType, GmIndexType, GmLabelType > GmPottsGFunction
GmMultiplier::FactorType FactorGmMultiplier
opengm::ExplicitFunction< ValueType, IndexType, LabelType > PyExplicitFunction
std::vector< GmIndexType > IndexVectorType
opengm::SquaredDifferenceFunction< GmValueType, GmIndexType, GmLabelType > GmSquaredDifferenceFunction
detail_types::UInt64Type UInt64Type
uint64
Definition: config.hxx:300
FactorGmMultiplier GmMultiplierFactor
truncated absolute differents between the labels of 2 variables
Abstraction (wrapper class) of factors, independent of the function used to implement the factor...
opengm::learning::Weights< GmValueType > PyWeights
Function encoded as a dense multi-dimensional array, marray::Marray.
opengm::TruncatedAbsoluteDifferenceFunction< ValueType, IndexType, LabelType > PyTruncatedAbsoluteDifferenceFunction
GmGen< GmValueType, GmIndexType, opengm::Adder, FTLGen< GmValueType, GmIndexType >::type >::type GmAdder
GmAdder::FactorType FactorGmAdder
opengm::functions::learnable::LPotts< GmValueType, GmIndexType, GmLabelType > PyLPottsFunction
opengm::PottsFunction< GmValueType, GmIndexType, GmLabelType > GmPottsFunction
opengm::TruncatedSquaredDifferenceFunction< ValueType, IndexType, LabelType > PyTruncatedSquaredDifferenceFunction
opengm::functions::learnable::LUnary< ValueType, IndexType, LabelType > PyLUnaryFunction
GmIndexType GmLabelType
opengm::GraphicalModel< V, O, F, SpaceType > type
std::vector< IndexVectorType > IndexVectorVectorType
truncated squared difference of the labels of two variables
Learnable feature function for two variables.
Definition: lpotts.hxx:29
Generalized Potts Function.
Definition: pottsg.hxx:36
Potts function for two variables.
Definition: potts.hxx:19
opengm::UInt64Type GmIndexType
opengm::DiscreteSpace< I, I > SpaceType
opengm::TruncatedSquaredDifferenceFunction< GmValueType, GmIndexType, GmLabelType > GmTruncatedSquaredDifferenceFunction
opengm::ExplicitFunction< GmValueType, GmIndexType, GmLabelType > GmExplicitFunction
opengm::ExplicitFunction< V,I, I > type
Potts function in N variables.
Definition: pottsn.hxx:18
opengm::SparseFunction< GmValueType, GmIndexType, GmLabelType > GmSparseFunction
opengm::PottsGFunction< ValueType, IndexType, LabelType > PyPottsGFunction
opengm::functions::learnable::LPotts< ValueType, IndexType, LabelType > PyLPottsFunction
opengm::PottsNFunction< ValueType, IndexType, LabelType > PyPottsNFunction
opengm::meta::TypeListGenerator< PyExplicitFunction, PyPottsFunction, PyPottsNFunction, PyPottsGFunction, PyTruncatedAbsoluteDifferenceFunction, PyTruncatedSquaredDifferenceFunction, PySparseFunction, PyLPottsFunction, PyLUnaryFunction >::type type