Miind
|
#include <libs/MPILib/include/ProbabilityQueue.hpp>
Public Member Functions | |
ProbabilityQueue (Time time_step=TIME_REFRACT_MIN) | |
~ProbabilityQueue () | |
Probability | CollectAndRemove (Time) |
bool | HasProbability (Time) const |
bool | IsConsistent () const |
void | push (const StampedProbability &prob) |
void | Scale (double) |
Time | TBatch () const |
Time | TimeCurrent () const |
Probability | TotalProbability () const |
Private Attributes | |
Probability | _prob_current_batch |
std::queue< StampedProbability > | _queue |
double | _scale |
Time | _t_batch_size |
Time | _t_current |
Time | _t_current_batch |
Probability | _total |
A queue to store probability density, effectively a pipeline.
ProbabilityQueue stores StampedProbability instances.
Definition at line 35 of file ProbabilityQueue.hpp.
ProbabilityQueue::ProbabilityQueue | ( | Time | time_step = TIME_REFRACT_MIN | ) |
Probability is grouped in batches.
Definition at line 26 of file ProbabilityQueue.cpp.
|
inline |
destructor
Definition at line 41 of file ProbabilityQueue.hpp.
Probability ProbabilityQueue::CollectAndRemove | ( | Time | time | ) |
add all probability that is batched below the current time and remove it from the queue
Definition at line 58 of file ProbabilityQueue.cpp.
References _prob_current_batch, _queue, _scale, _t_batch_size, _t_current_batch, and _total.
Referenced by GeomLib::SpikingOdeSystem::RetrieveFromQueue().
bool ProbabilityQueue::HasProbability | ( | Time | time | ) | const |
if there is time stamped probability that would be retrieved by CollectAndRemove before this will return true, false otherwise
Definition at line 79 of file ProbabilityQueue.cpp.
References _queue.
bool MPILib::populist::ProbabilityQueue::IsConsistent | ( | ) | const |
Stamped Probability must entered in the queue in the right time order.
void ProbabilityQueue::push | ( | const StampedProbability & | prob | ) |
push time stamped probability on the queue
Definition at line 39 of file ProbabilityQueue.cpp.
References MPILib::populist::StampedProbability::_prob, _prob_current_batch, _queue, _t_batch_size, _t_current, _t_current_batch, MPILib::populist::StampedProbability::_time, and _total.
Referenced by GeomLib::SpikingOdeSystem::StoreInQueue().
void ProbabilityQueue::Scale | ( | double | scale | ) |
Sometimes, after rebinning the probability in the queue needs to be rescaled.
Definition at line 86 of file ProbabilityQueue.cpp.
References _scale.
|
inline |
Definition at line 64 of file ProbabilityQueue.hpp.
References _t_batch_size.
Referenced by GeomLib::SpikingOdeSystem::RetrieveFromQueue(), and GeomLib::QifOdeSystem::TBatch().
|
inline |
Current time based on last CollectAndRemove call.
Definition at line 59 of file ProbabilityQueue.hpp.
References _t_current.
|
inline |
Total probability in queue.
Definition at line 53 of file ProbabilityQueue.hpp.
|
private |
Definition at line 73 of file ProbabilityQueue.hpp.
Referenced by CollectAndRemove(), and push().
|
private |
Definition at line 76 of file ProbabilityQueue.hpp.
Referenced by CollectAndRemove(), HasProbability(), and push().
|
private |
Definition at line 68 of file ProbabilityQueue.hpp.
Referenced by CollectAndRemove(), Scale(), and TotalProbability().
|
private |
Definition at line 69 of file ProbabilityQueue.hpp.
Referenced by CollectAndRemove(), push(), and TBatch().
|
private |
Definition at line 70 of file ProbabilityQueue.hpp.
Referenced by push(), and TimeCurrent().
|
private |
Definition at line 71 of file ProbabilityQueue.hpp.
Referenced by CollectAndRemove(), and push().
|
private |
Definition at line 74 of file ProbabilityQueue.hpp.
Referenced by CollectAndRemove(), push(), and TotalProbability().