14#ifndef SPARSEMANYINDEXEDBLOCK_HPP_
15#define SPARSEMANYINDEXEDBLOCK_HPP_
30 template<
class ValueClass >
32 InterpreterClass::SparseManyIndexed< ValueClass > >
36 int const numberOfIndices,
39 int const indexDigits = 9 );
44 operator()( std::vector< int >
const& indexVector );
47 operator()( std::vector< int >
const& indexVector )
const;
50 operator()( std::string
const& indicesAsString );
53 operator()( std::string
const& indicesAsString )
const;
56 hasEntry( std::vector< int >
const& indexVector )
const;
59 hasEntry( std::string
const& indicesAsString )
const;
68 template<
class ValueClass >
71 std::string
const& blockName,
72 int const numberOfIndices,
73 ValueClass
const& defaultUnsetValue,
75 int const indexDigits ) :
77 InterpreterClass::SparseManyIndexed< ValueClass > >(
81 std::vector< int >( numberOfIndices,
87 template<
class ValueClass >
95 template<
class ValueClass >
98 std::vector< int >
const& indexVector )
101 return this->dataBlocks[ this->lowestScaleIndex ]( indexVector );
104 template<
class ValueClass >
105 inline ValueClass
const&
107 std::vector< int >
const& indexVector )
const
110 return this->dataBlocks[ this->lowestScaleIndex ]( indexVector );
113 template<
class ValueClass >
116 std::string
const& indicesAsString )
119 return this->dataBlocks[ this->lowestScaleIndex ]( indicesAsString );
122 template<
class ValueClass >
123 inline ValueClass
const&
125 std::string
const& indicesAsString )
const
128 return this->dataBlocks[ this->lowestScaleIndex ]( indicesAsString );
131 template<
class ValueClass >
134 std::vector< int >
const& indexVector )
const
139 this->dataBlocks[ this->lowestScaleIndex ].hasEntry( indexVector );
142 template<
class ValueClass >
145 std::string
const& indicesAsString )
const
150 this->dataBlocks[ this->lowestScaleIndex ].hasEntry( indicesAsString );
ValueClass const defaultUnsetValue
SparseManyIndexedBlock(std::string const &blockName, int const numberOfIndices, ValueClass const &defaultUnsetValue, bool const isVerbose=false, int const indexDigits=9)
virtual ~SparseManyIndexedBlock()
bool hasEntry(std::vector< int > const &indexVector) const
ValueClass & operator()(std::vector< int > const &indexVector)