|
Storm 1.14.0.1
A Modern Probabilistic Model Checker
|
Accumulates a value for each state (numbers are added up, elements are inserted into sets, c.f. More...
#include <SparseAccumulator.h>
Public Member Functions | |
| SparseAccumulator (uint64_t const numStates) | |
| std::vector< ValueType > const & | getValues () const |
| 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 state if the values are sets. | |
| void | clear () |
| Clears the set, i.e., writes the default value for all states. | |
Accumulates a value for each state (numbers are added up, elements are inserted into sets, c.f.
WrappingSetAccumulator) and keeps track of the states whose value differs from the default value, i.e., zero or the empty set. Accumulating and reading take constant time, and clearing only takes time linear in the number of touched states, so a single instance can be reused for many small computations. The memory consumption is linear in the total number of states, though. This data structure is also known as a sparse accumulator.
Definition at line 17 of file SparseAccumulator.h.
|
explicit |
Definition at line 13 of file SparseAccumulator.cpp.
| void storm::bisimulation::SparseAccumulator< ValueType >::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 state if the values are sets.
Definition at line 26 of file SparseAccumulator.cpp.
| void storm::bisimulation::SparseAccumulator< ValueType >::clear | ( | ) |
Clears the set, i.e., writes the default value for all states.
Definition at line 45 of file SparseAccumulator.cpp.
| std::vector< uint64_t > const & storm::bisimulation::SparseAccumulator< ValueType >::getNonDefaultStates | ( | ) | const |
Definition at line 21 of file SparseAccumulator.cpp.
| std::vector< ValueType > const & storm::bisimulation::SparseAccumulator< ValueType >::getValues | ( | ) | const |
Definition at line 16 of file SparseAccumulator.cpp.