|
MultiAgentDecisionProcess
|
TimedAlgorithm allows for easy timekeeping of parts of an algorithm. More...
#include <TimedAlgorithm.h>
Public Member Functions | |
| void | AddTimedEvent (const std::string &id, clock_t duration) |
| Adds event of certain duration, e.g., an external program call. More... | |
| std::vector< double > | GetTimedEventDurations (const std::string &id) |
| Returns all stored durations (in s) for a particular event. More... | |
| void | LoadTimers (const std::string &filename) |
| Load timing info from file filename. More... | |
| void | PrintTimers () const |
| Print stored timing info. More... | |
| void | PrintTimersSummary () const |
| Sums data and prints out a summary. More... | |
| void | SaveTimers (const std::string &filename) const |
| Save collected timing info to file filename. More... | |
| void | SaveTimers (std::ofstream &of) const |
| Save collected timing info to ofstream of. More... | |
| void | StartTimer (const std::string &id) const |
| Start to time an event identified by id. More... | |
| void | StopTimer (const std::string &id) const |
| Stop to time an event identified by id. More... | |
| TimedAlgorithm () | |
| (default) Constructor More... | |
| virtual | ~TimedAlgorithm () |
| Destructor. More... | |
Private Attributes | |
| Timing * | _m_timer |
| Stores the timing info. More... | |
TimedAlgorithm allows for easy timekeeping of parts of an algorithm.
| TimedAlgorithm::TimedAlgorithm | ( | ) |
(default) Constructor
|
virtual |
Destructor.
| void TimedAlgorithm::AddTimedEvent | ( | const std::string & | id, |
| clock_t | duration | ||
| ) |
Adds event of certain duration, e.g., an external program call.
| vector< double > TimedAlgorithm::GetTimedEventDurations | ( | const std::string & | id | ) |
Returns all stored durations (in s) for a particular event.
| void TimedAlgorithm::LoadTimers | ( | const std::string & | filename | ) |
Load timing info from file filename.
| void TimedAlgorithm::PrintTimers | ( | ) | const |
Print stored timing info.
| void TimedAlgorithm::PrintTimersSummary | ( | ) | const |
Sums data and prints out a summary.
Referenced by MDPValueIteration::Plan(), Perseus::PlanEndOfIteration(), MDPValueIteration::PlanSlow(), MDPPolicyIteration::PlanSlow(), and MDPPolicyIterationGPU::PlanSlow().
| void TimedAlgorithm::SaveTimers | ( | const std::string & | filename | ) | const |
Save collected timing info to file filename.
Referenced by GeneralizedMAAStarPlanner::Plan(), Perseus::PlanEndOfIteration(), and Perseus::PlanLeadOut().
| void TimedAlgorithm::SaveTimers | ( | std::ofstream & | of | ) | const |
Save collected timing info to ofstream of.
| void TimedAlgorithm::StartTimer | ( | const std::string & | id | ) | const |
Start to time an event identified by id.
Referenced by DICEPSPlanner::ApproximateEvaluate(), AlphaVectorPlanning::BackProject(), AlphaVectorPlanning::BackProjectFull(), AlphaVectorPlanning::BackProjectSparse(), Perseus::BackupStageLeadIn(), AlphaVectorPOMDP::BeliefBackup(), AlphaVectorConstrainedPOMDP::BeliefBackup(), AlphaVectorBG::BeliefBackup(), AlphaVectorConstrainedPOMDP::BeliefBackupQ(), GMAA_MAA_ELSI::CAVNP_quick_n_dirty2(), GMAA_MAAstarClassic::ConstructAndValuateNextPolicies(), GMAA_kGMAA::ConstructAndValuateNextPolicies(), GMAA_MAAstar::ConstructAndValuateNextPolicies(), GMAA_MAAstarCluster::ConstructAndValuateNextPolicies(), GMAA_kGMAACluster::ConstructAndValuateNextPolicies(), GMAA_MAA_ELSI::ConstructAndValuateNextPoliciesExactBG(), GMAA_MAA_ELSI::ConstructBayesianGame(), MDPPolicyIteration::Initialize(), MDPPolicyIterationGPU::Initialize(), MDPValueIteration::Initialize(), MDPValueIteration::Plan(), DICEPSPlanner::Plan(), GeneralizedMAAStarPlanner::Plan(), Perseus::PlanLeadIn(), MDPValueIteration::PlanSlow(), MDPPolicyIteration::PlanSlow(), MDPPolicyIterationGPU::PlanSlow(), AlphaVectorPlanning::SampleBeliefs(), and AlphaVectorPlanning::SampleBeliefsNonStationary().
| void TimedAlgorithm::StopTimer | ( | const std::string & | id | ) | const |
Stop to time an event identified by id.
Referenced by DICEPSPlanner::ApproximateEvaluate(), AlphaVectorPlanning::BackProject(), AlphaVectorPlanning::BackProjectFull(), AlphaVectorPlanning::BackProjectSparse(), Perseus::BackupStageLeadOut(), AlphaVectorPOMDP::BeliefBackup(), AlphaVectorConstrainedPOMDP::BeliefBackup(), AlphaVectorBG::BeliefBackup(), AlphaVectorConstrainedPOMDP::BeliefBackupQ(), GMAA_MAA_ELSI::CAVNP_quick_n_dirty2(), GMAA_MAAstarClassic::ConstructAndValuateNextPolicies(), GMAA_kGMAA::ConstructAndValuateNextPolicies(), GMAA_MAAstar::ConstructAndValuateNextPolicies(), GMAA_MAAstarCluster::ConstructAndValuateNextPolicies(), GMAA_kGMAACluster::ConstructAndValuateNextPolicies(), GMAA_MAA_ELSI::ConstructAndValuateNextPoliciesExactBG(), GMAA_MAA_ELSI::ConstructBayesianGame(), MDPPolicyIteration::Initialize(), MDPPolicyIterationGPU::Initialize(), MDPValueIteration::Initialize(), MDPValueIteration::Plan(), DICEPSPlanner::Plan(), GeneralizedMAAStarPlanner::Plan(), Perseus::PlanLeadOut(), MDPValueIteration::PlanSlow(), MDPPolicyIteration::PlanSlow(), MDPPolicyIterationGPU::PlanSlow(), AlphaVectorPlanning::SampleBeliefs(), and AlphaVectorPlanning::SampleBeliefsNonStationary().
|
private |
Stores the timing info.