Parasol Planning Library (PPL)
PathEvaluator.h
Go to the documentation of this file.
1 #ifndef PMPL_PATH_EVALUATOR_H
2 #define PMPL_PATH_EVALUATOR_H
3 
4 #include "MapEvaluatorMethod.h"
5 
13 
14  public:
15 
18 
20  typedef typename RoadmapType::VID VID;
21 
22 
26 
27  PathEvaluator();
28 
29  PathEvaluator(XMLNode& _node);
30 
31  virtual ~PathEvaluator() = default;
32 
34 
37 
38  virtual void Initialize() override;
39 
43 
44  virtual bool operator()() override;
45 
47 
48  protected:
49 
50  private:
51 
56  std::vector<double> GetClearanceStats(const Path* path);
57 
59  double GetPathLength(const Path* path);
60 
62  std::string m_cuLabel{}; // Clearance Utility (MPTool)
63  std::string m_ievcLabel{}; // Intermediates Edge Validity Checker
64  std::string m_dmLabel{}; // Distance Metric
65 
66  // Why copy/paste when you could write a bunch of helper functions instead?
67  // Each of these functions adds (key, value) to this's stat class
68  // and prints them to std::cout.
69  // You can find statistics in the .stat output file.
70  void AddToStats(std::string _key, double _value);
71  inline void AddToStats(std::string _key, int _value) { AddToStats(_key, (double)_value); };
72  inline void AddToStats(std::string _key, bool _value) { AddToStats(_key, (double)_value); };
73  inline void AddToStats(std::string _key, size_t _value) { AddToStats(_key, (double)_value); };
74 
75 
76 };
77 
78 #endif
Definition: GenericStateGraph.h:67
STAPLGraph::vertex_descriptor VID
Definition: GenericStateGraph.h:83
Definition: MapEvaluatorMethod.h:16
Definition: PathEvaluator.h:12
RoadmapType::VID VID
Definition: PathEvaluator.h:20
virtual bool operator()() override
Definition: PathEvaluator.cpp:38
virtual void Initialize() override
Definition: PathEvaluator.cpp:29
PathEvaluator()
Definition: PathEvaluator.cpp:10
virtual ~PathEvaluator()=default
MPBaseObject::RoadmapType RoadmapType
Definition: PathEvaluator.h:19
Definition: Path.h:23
Definition: XMLNode.h:27