14#ifndef SPARSESINGLYINDEXEDBLOCK_HPP_
15#define SPARSESINGLYINDEXEDBLOCK_HPP_
29 template<
class ValueClass >
31 InterpreterClass::SparseSinglyIndexed< ValueClass > >
37 int const indexDigits = 5 );
48 hasEntry(
int const soughtIndex )
const;
54 virtual std::map< int, double >
const*
68 template<
class ValueClass >
71 std::string
const& blockName,
72 ValueClass
const& defaultUnsetValue,
74 int const indexDigits ) :
76 InterpreterClass::SparseSinglyIndexed< ValueClass > >(
80 std::vector< int >( 1,
82 isMassBlockFlag( false )
90 template<
class ValueClass >
98 template<
class ValueClass >
103 return this->dataBlocks[ this->lowestScaleIndex ]( soughtIndex );
106 template<
class ValueClass >
107 inline ValueClass
const&
109 int const soughtIndex )
const
112 return this->dataBlocks[ this->lowestScaleIndex ]( soughtIndex );
115 template<
class ValueClass >
118 int const soughtIndex )
const
122 this->dataBlocks[ this->lowestScaleIndex ].hasEntry( soughtIndex );
125 template<
class ValueClass >
131 return isMassBlockFlag;
134 template<
class ValueClass >
135 inline std::map< int, double >
const*
144 inline std::map< int, double >
const*
148 if( isMassBlockFlag )
150 return &(this->dataBlocks[ this->lowestScaleIndex ].getValueMap());
bool nameMatches(std::string const &nameToCompare) const
ValueClass const defaultUnsetValue
virtual ~SparseSinglyIndexedBlock()
virtual bool isMassBlock() const
SparseSinglyIndexedBlock(std::string const &blockName, ValueClass const &defaultUnsetValue, bool const isVerbose=false, int const indexDigits=5)
virtual std::map< int, double > const * getMassMap() const
bool hasEntry(int const soughtIndex) const
ValueClass & operator()(int const soughtIndex)