libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
StatCostStructure.hpp
1 #ifndef COST_STAT_HPP
2 #define COST_STAT_HPP
3 
4 #include <fstream>
5 #include <string>
6 #include <sstream>
7 
12 class StatCost
13 {
14 private:
15  p3d_graph* Graph;
16  p3d_rob* Robot;
17 
18  std::vector<double> MinimalCost;
19  std::vector<double> MaximalCost;
20  std::vector<double> AverageCost;
21  std::vector<double> SumCost;
22  std::vector<double> PathLength;
23  std::vector<double> Time;
24  std::vector<double> nbNodes;
25  std::vector<int> nbQRand;
26 
27  double aMinimalCost;
28  double aMaximalCost;
29  double aAverageCost;
30  double aSumCost;
31  double aPathLength;
32  double aTime;
33  double anbNodes;
34  double anbQRand;
35 
36  double bMinimalCost;
37  double bMaximalCost;
38  double bAverageCost;
39  double bSumCost;
40  double bPathLength;
41 
42  std::ofstream s;
43 
44  std::vector<double> pene_MinimalCost;
45  std::vector<double> pene_MaximalCost;
46  std::vector<double> pene_AverageCost;
47  std::vector<double> pene_SumCost;
48 
49  double pene_aMinimalCost;
50  double pene_aMaximalCost;
51  double pene_aAverageCost;
52  double pene_aSumCost;
53 
54 public:
55  StatCost();
56  StatCost(p3d_graph* g, p3d_rob* r);
57  StatCost(p3d_rob* r);
58 
59  void setGraph(p3d_graph* g);
60  void setValues();
61 
62  double average(std::vector<double> vect);
63  double average(std::vector<int> vect);
64  void setAverages();
65 
66  void setBestValues();
67 
68  void indexToFile(uint i);
69  void saveToFile();
70  void print();
71 
72 };
73 
74 #endif
Definition: graph.hpp:28
This class holds a the robot represented by a kinematic chain.
Definition: robot.hpp:42
This class can store cost statistics over sevral run and compute avreages.
Definition: StatCostStructure.hpp:12