14#ifndef SPARSEQUADRUPLYINDEXEDBLOCK_HPP_
15#define SPARSEQUADRUPLYINDEXEDBLOCK_HPP_
29 template<
class ValueClass >
32 InterpreterClass::SparseQuadruplyIndexed< ValueClass > >
38 int const firstIndexDigits = 9,
39 int const secondIndexDigits = 9,
40 int const thirdIndexDigits = 2,
41 int const fourthIndexDigits = 2 );
47 std::pair< int, int > >
const& indexQuadruple );
51 std::pair< int, int > >
const& indexQuadruple )
const;
55 int const secondIndex,
57 int const fourthIndex )
58 {
return (*
this)( std::make_pair( std::make_pair( firstIndex,
60 std::make_pair( thirdIndex,
64 int const secondIndex,
66 int const fourthIndex )
const
67 {
return (*
this)( std::make_pair( std::make_pair( firstIndex,
69 std::make_pair( thirdIndex,
72 hasEntry( std::pair< std::pair< int, int >,
73 std::pair< int, int > >
const& indexQuadruple )
const;
77 int const secondIndex,
79 int const fourthIndex )
const
80 {
return hasEntry( std::make_pair( std::make_pair( firstIndex,
82 std::make_pair( thirdIndex,
90 template<
class ValueClass >
93 std::string
const& blockName,
94 ValueClass
const& defaultUnsetValue,
96 int const firstIndexDigits,
97 int const secondIndexDigits,
98 int const thirdIndexDigits,
99 int const fourthIndexDigits ) :
101 InterpreterClass::SparseQuadruplyIndexed< ValueClass > >(
105 BOL::
Vi( firstIndexDigits )(
107 thirdIndexDigits ).e(
108 fourthIndexDigits ) )
113 template<
class ValueClass >
121 template<
class ValueClass >
124 std::pair< std::pair< int, int >,
125 std::pair< int, int > >
const& indexQuadruple )
128 return this->dataBlocks[ this->lowestScaleIndex ]( indexQuadruple );
131 template<
class ValueClass >
132 inline ValueClass
const&
134 std::pair< std::pair< int, int >,
135 std::pair< int, int > >
const& indexQuadruple )
const
138 return this->dataBlocks[ this->lowestScaleIndex ]( indexQuadruple );
141 template<
class ValueClass >
144 std::pair< std::pair< int, int >,
145 std::pair< int, int > >
const& indexQuadruple )
const
150 this->dataBlocks[ this->lowestScaleIndex ].hasEntry( indexQuadruple );
ValueClass const defaultUnsetValue
ValueClass const & operator()(int const firstIndex, int const secondIndex, int const thirdIndex, int const fourthIndex) const
ValueClass & operator()(std::pair< std::pair< int, int >, std::pair< int, int > > const &indexQuadruple)
SparseQuadruplyIndexedBlock(std::string const &blockName, ValueClass const &defaultUnsetValue, bool const isVerbose=false, int const firstIndexDigits=9, int const secondIndexDigits=9, int const thirdIndexDigits=2, int const fourthIndexDigits=2)
bool hasEntry(std::pair< std::pair< int, int >, std::pair< int, int > > const &indexQuadruple) const
bool hasEntry(int const firstIndex, int const secondIndex, int const thirdIndex, int const fourthIndex) const
virtual ~SparseQuadruplyIndexedBlock()
ValueClass & operator()(int const firstIndex, int const secondIndex, int const thirdIndex, int const fourthIndex)
StdVectorFiller< int > Vi