Discrete space in which variables can have differently many labels.
More...
#include <discretespace.hxx>
template<class I = std::size_t, class L = std::size_t>
class opengm::DiscreteSpace< I, L >
Discrete space in which variables can have differently many labels.
- Examples:
- io_graphical_model.cxx, opengmBuild.cxx, quick_start.cxx, and space_types.cxx.
Definition at line 17 of file discretespace.hxx.
§ IndexType
template<class I = std::size_t, class L = std::size_t>
§ LabelType
template<class I = std::size_t, class L = std::size_t>
§ DiscreteSpace() [1/2]
template<class I , class L >
construct an empty label space (with zero variables)
Definition at line 39 of file discretespace.hxx.
§ DiscreteSpace() [2/2]
template<class I , class L >
template<class Iterator >
construct a label space in which each variable can attain a different number of labels
- Parameters
-
| 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};
Definition at line 57 of file discretespace.hxx.
§ addVariable()
template<class I , class L >
§ assign()
template<class I , class L >
template<class Iterator >
assign a new sequence of numbers of labels to an existing space
- Parameters
-
| 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.
§ assignDense()
template<class I , class L >
template<class Iterator >
§ numberOfLabels()
template<class I , class L >
§ numberOfVariables()
template<class I , class L >
§ reserve()
template<class I , class L >
allocate memory for a fixed number of variables
Definition at line 85 of file discretespace.hxx.