2 #ifndef OPENGM_SPACE_BASE_HXX
3 #define OPENGM_SPACE_BASE_HXX
14 template<
class SPACE,
class I = std::
size_t,
class L = std::
size_t>
22 template<
class Iterator>
void assignDense(Iterator, Iterator);
27 template<
class SPACE,
class I,
class L>
30 const IndexType numVar =
static_cast<SPACE const*
>(
this)->numberOfVariables();
31 const IndexType l =
static_cast<SPACE const*
>(
this)->numberOfLabels(0);
32 for(
size_t i=1;i<numVar;++i) {
33 if(l!=static_cast<SPACE const *>(
this)->numberOfLabels(i)) {
40 template<
class SPACE,
class I,
class L>
41 template<
class Iterator>
48 throw RuntimeError(std::string(
"assignDense(begin, end) is not implemented in ")+
typeid(SPACE).name());
51 template<
class SPACE,
class I,
class L>
57 throw RuntimeError(std::string(
"addVariable(numberOfLabels) is not implemented in ")+
typeid(SPACE).name());
63 #endif // #ifndef OPENGM_SPACE_BASE_HXX
LabelType numberOfLabels(const IndexType) const
IndexType addVariable(const LabelType)
IndexType numberOfVariables() const
void assignDense(Iterator, Iterator)
Interface of label spaces.
bool isSimpleSpace() const