Discrete space in which variables can have differently many labels. More...
#include <discretespace.hxx>
Public Types | |
typedef I | IndexType |
typedef L | LabelType |
Public Member Functions | |
DiscreteSpace () | |
construct an empty label space (with zero variables) | |
template<class Iterator > | |
DiscreteSpace (Iterator, Iterator) | |
construct a label space in which each variable can attain a different number of labels | |
template<class Iterator > | |
void | assign (Iterator, Iterator) |
assign a new sequence of numbers of labels to an existing space | |
template<class Iterator > | |
void | assignDense (Iterator, Iterator) |
IndexType | addVariable (const LabelType) |
add one more variable | |
IndexType | numberOfVariables () const |
LabelType | numberOfLabels (const IndexType) const |
void | reserve (const IndexType) |
allocate memory for a fixed number of variables |
Discrete space in which variables can have differently many labels.
io_graphical_model.cxx, opengmBuildGrid.cxx, quick_start.cxx, and space_types.cxx.
Definition at line 17 of file discretespace.hxx.
typedef I opengm::DiscreteSpace< I, L >::IndexType |
Reimplemented from opengm::SpaceBase< DiscreteSpace< I, L >, I, L >.
Definition at line 20 of file discretespace.hxx.
typedef L opengm::DiscreteSpace< I, L >::LabelType |
Reimplemented from opengm::SpaceBase< DiscreteSpace< I, L >, I, L >.
Definition at line 21 of file discretespace.hxx.
opengm::DiscreteSpace< I, L >::DiscreteSpace | ( | ) | [inline] |
construct an empty label space (with zero variables)
Definition at line 39 of file discretespace.hxx.
opengm::DiscreteSpace< I, L >::DiscreteSpace | ( | Iterator | begin, | |
Iterator | end | |||
) | [inline] |
construct a label space in which each variable can attain a different number of labels
begin | iterator to the beginning of a sequence of numbers of labels | |
end | iterator to the end of a sequence of numbers of labels |
Example:
size_t numbersOfLabels[] = {4, 2, 3}; opengm::DiscreteSpace<> space(numbersOfLabels, numbersOfLabels + 3);
Definition at line 57 of file discretespace.hxx.
DiscreteSpace< I, L >::IndexType opengm::DiscreteSpace< I, L >::addVariable | ( | const LabelType | numberOfLabels | ) | [inline] |
add one more variable
Reimplemented from opengm::SpaceBase< DiscreteSpace< I, L >, I, L >.
Definition at line 106 of file discretespace.hxx.
void opengm::DiscreteSpace< I, L >::assign | ( | Iterator | begin, | |
Iterator | end | |||
) | [inline] |
assign a new sequence of numbers of labels to an existing space
begin | iterator to the beginning of a sequence of numbers of labels | |
end | iterator to the end of a sequence of numbers of labels |
Definition at line 73 of file discretespace.hxx.
void opengm::DiscreteSpace< I, L >::assignDense | ( | Iterator | begin, | |
Iterator | end | |||
) | [inline] |
Reimplemented from opengm::SpaceBase< DiscreteSpace< I, L >, I, L >.
Definition at line 95 of file discretespace.hxx.
DiscreteSpace< I, L >::LabelType opengm::DiscreteSpace< I, L >::numberOfLabels | ( | const IndexType | dimension | ) | const [inline] |
Reimplemented from opengm::SpaceBase< DiscreteSpace< I, L >, I, L >.
Definition at line 124 of file discretespace.hxx.
DiscreteSpace< I, L >::IndexType opengm::DiscreteSpace< I, L >::numberOfVariables | ( | ) | const [inline] |
Reimplemented from opengm::SpaceBase< DiscreteSpace< I, L >, I, L >.
Definition at line 116 of file discretespace.hxx.
void opengm::DiscreteSpace< I, L >::reserve | ( | const | IndexType | ) | [inline] |
allocate memory for a fixed number of variables
Definition at line 85 of file discretespace.hxx.