20 #ifndef _CODE_LIBS_MPILIB_PRIORITYQUEUE_INCLUDE_GUARD
21 #define _CODE_LIBS_MPILIB_PRIORITYQUEUE_INCLUDE_GUARD
76 std::queue<StampedProbability>
_queue;
81 #endif // include guard
void push(const StampedProbability &prob)
push time stamped probability on the queue
Probability _prob_current_batch
A queue to store probability density, effectively a pipeline.
Probability TotalProbability() const
Total probability in queue.
bool HasProbability(Time) const
if there is time stamped probability that would be retrieved by CollectAndRemove before this will ret...
const Time TIME_REFRACT_MIN
Even if refraction is not considered, for some algorithms it is convenient to set it artificially to ...
ProbabilityQueue(Time time_step=TIME_REFRACT_MIN)
Probability is grouped in batches.
bool IsConsistent() const
Stamped Probability must entered in the queue in the right time order.
A time stamped measure of probability.
Probability CollectAndRemove(Time)
add all probability that is batched below the current time and remove it from the queue ...
std::queue< StampedProbability > _queue
~ProbabilityQueue()
destructor
void Scale(double)
Sometimes, after rebinning the probability in the queue needs to be rescaled.
Time TimeCurrent() const
Current time based on last CollectAndRemove call.