26 #ifndef AMR_PARTICLE_LEVEL_COUNTER_H
27 #define AMR_PARTICLE_LEVEL_COUNTER_H
37 class Compare = std::less<Key>,
38 class Allocator = std::allocator<std::pair<const Key, T> >
44 typedef typename std::map<Key, T>::size_type
size_type;
91 std::advance(
end, (level > size) ? size : level);
93 return std::accumulate(
count_m.begin(),
end, 0,
95 return sum + value_pair.second;
115 while ( inum > -1 ) {
138 for (
T i = 0; i <= level; ++i) {
162 while ( idx >=
end(level) && level <
size() )
std::map< Key, T >::size_type size_type
void increment(const Key &level, T nTimes=T(1))
const_iterator end() const
const_iterator begin() const
std::string::iterator iterator
T::PETE_Expr_t::PETE_Return_t sum(const PETE_Expr< T > &expr)
std::map< Key, T >::const_iterator const_iterator
std::map< Key, T > count_m
T getLocalNumUpToLevel(T level) const
T * value_type(const SliceIterator< T > &)
std::map< Key, T >::value_type value_type
AmrParticleLevelCounter()
std::map< Key, T >::iterator iterator
T getLocalNumAtLevel(T level) const
void decrement(const Key &level, T nTimes=T(1))
const T & operator[](T level) const