2 #ifndef OPENGM_GRID_DISCRETE_SPACE_HXX
3 #define OPENGM_GRID_DISCRETE_SPACE_HXX
15 template<
class I = std::
size_t ,
class L = std::
size_t >
16 class GridSpace :
public SpaceBase<GridSpace<I,L>,I,L>{
22 GridSpace(
const IndexType,
const IndexType,
const LabelType);
23 void assign(
const IndexType ,
const IndexType,
const LabelType);
24 IndexType numberOfVariables()
const;
25 IndexType dimX()
const;
26 IndexType dimY()
const;
27 LabelType numberOfLabels()
const;
28 LabelType numberOfLabels(
const IndexType)
const;
29 LabelType numberOfLabels(
const IndexType,
const IndexType)
const;
30 bool isSimpleSpace()
const;
34 LabelType numberOfStates_;
37 template<
class I,
class L>
39 GridSpace<I, L>::GridSpace()
45 template<
class I,
class L>
47 GridSpace<I, L>::GridSpace
49 const typename GridSpace<I, L>::IndexType dimX,
50 const typename GridSpace<I, L>::IndexType dimY,
51 const typename GridSpace<I, L>::LabelType numberOfLabels
55 numberOfStates_(numberOfLabels)
58 template<
class I,
class L>
60 GridSpace<I, L>::assign
62 const typename GridSpace<I, L>::IndexType dimX,
63 const typename GridSpace<I, L>::IndexType dimY,
64 const typename GridSpace<I, L>::LabelType numberOfLabels
66 numberOfStates_ = numberOfLabels;
71 template<
class I,
class L>
72 inline typename GridSpace<I, L>::IndexType
73 GridSpace<I, L>::numberOfVariables()
const{
77 template<
class I,
class L>
78 inline typename GridSpace<I, L>::IndexType
79 GridSpace<I, L>::dimX()
const{
83 template<
class I,
class L>
84 inline typename GridSpace<I, L>::IndexType
85 GridSpace<I, L>::dimY()
const{
89 template<
class I,
class L>
90 inline typename GridSpace<I, L>::LabelType
91 GridSpace<I, L>::numberOfLabels()
const{
92 return numberOfStates_;
95 template<
class I,
class L>
96 inline typename GridSpace<I, L>::LabelType
97 GridSpace<I, L>::numberOfLabels
99 const typename GridSpace<I, L>::IndexType dimension
101 return numberOfStates_;
104 template<
class I,
class L>
106 GridSpace<I, L>::isSimpleSpace()
const{
114 #endif // #ifndef OPENGM_GRID_DISCRETE_SPACE_HXX