16template<
typename ValueType>
34 void addValue(uint64_t
const state, ValueType value);
42 static ValueType defaultValue();
44 std::vector<ValueType> values;
45 std::vector<uint64_t> nonDefaultStates;
Accumulates a value for each state (numbers are added up, elements are inserted into sets,...
void clear()
Clears the set, i.e., writes the default value for all states.
std::vector< ValueType > const & getValues() const
SparseAccumulator(uint64_t const numStates)
std::vector< uint64_t > const & getNonDefaultStates() const
void addValue(uint64_t const state, ValueType value)
Adds value to the currently mapped value of the given state, i.e., inserts it into the set of that st...
SparseAccumulator< uint64_t > WrappingSetAccumulator
Accumulates a set of indices for each state, where only the index modulo 64 is stored,...