1 #ifndef AMR_PARTICLE_LEVEL_COUNTER_H
2 #define AMR_PARTICLE_LEVEL_COUNTER_H
20 class Compare = std::less<Key>,
21 class Allocator = std::allocator<std::pair<const Key, T> >
27 typedef typename std::map<Key, T>::size_type
size_type;
74 std::advance(
end, (level > size) ? size : level);
76 return std::accumulate(
count_m.begin(),
end, 0,
78 return sum + value_pair.second;
121 for (
T i = 0; i <= level; ++i) {
145 while ( idx >=
end(level) && level <
size() )
T getLocalNumAtLevel(T level) const
const_iterator begin() const
void increment(const Key &level, T nTimes=T(1))
void decrement(const Key &level, T nTimes=T(1))
const T & operator[](T level) const
T::PETE_Expr_t::PETE_Return_t sum(const PETE_Expr< T > &expr)
std::map< Key, T >::size_type size_type
T getLocalNumUpToLevel(T level) const
T * value_type(const SliceIterator< T > &)
std::map< Key, T > count_m
std::map< Key, T >::value_type value_type
AmrParticleLevelCounter()
std::map< Key, T >::const_iterator const_iterator
std::string::iterator iterator
std::map< Key, T >::iterator iterator
const_iterator end() const