14#ifndef SPARSEDOUBLYINDEXEDBLOCK_HPP_
15#define SPARSEDOUBLYINDEXEDBLOCK_HPP_
29 template<
class ValueClass >
31 InterpreterClass::SparseDoublyIndexed< ValueClass > >
37 int const firstIndexDigits = 2,
38 int const secondIndexDigits = 2 );
43 operator()( std::pair< int, int >
const& indexPair );
46 operator()( std::pair< int, int >
const& indexPair )
const;
50 int const secondIndex )
51 {
return (*
this)( std::make_pair( firstIndex,
55 int const secondIndex )
const
56 {
return (*
this)( std::make_pair( firstIndex,
59 hasEntry( std::pair< int, int >
const& indexPair )
const;
63 int const secondIndex )
const
64 {
return hasEntry( std::make_pair( firstIndex,
72 template<
class ValueClass >
75 std::string
const& blockName,
76 ValueClass
const& defaultUnsetValue,
78 int const firstIndexDigits,
79 int const secondIndexDigits ) :
81 InterpreterClass::SparseDoublyIndexed< ValueClass > >(
85 BOL::
Vi( firstIndexDigits ).e( secondIndexDigits ) )
90 template<
class ValueClass >
98 template<
class ValueClass >
101 std::pair< int, int >
const& indexPair )
104 return this->dataBlocks[ this->lowestScaleIndex ]( indexPair );
107 template<
class ValueClass >
108 inline ValueClass
const&
110 std::pair< int, int >
const& indexPair )
const
113 return this->dataBlocks[ this->lowestScaleIndex ]( indexPair );
116 template<
class ValueClass >
119 std::pair< int, int >
const& indexPair )
const
123 return this->dataBlocks[ this->lowestScaleIndex ].hasEntry( indexPair );
ValueClass const defaultUnsetValue
bool hasEntry(int const firstIndex, int const secondIndex) const
SparseDoublyIndexedBlock(std::string const &blockName, ValueClass const &defaultUnsetValue, bool const isVerbose=false, int const firstIndexDigits=2, int const secondIndexDigits=2)
ValueClass const & operator()(int const firstIndex, int const secondIndex) const
ValueClass & operator()(std::pair< int, int > const &indexPair)
ValueClass & operator()(int const firstIndex, int const secondIndex)
bool hasEntry(std::pair< int, int > const &indexPair) const
virtual ~SparseDoublyIndexedBlock()
StdVectorFiller< int > Vi