Optimizer.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 #ifndef __OPTIMIZER_H
4 #define __OPTIMIZER_H
5 
6 #include <vector>
7 #include "Configuration.h"
8 
9 namespace PathEngine {
10  class PathPlanner;
11 
17  class Optimizer {
18  public:
23  Optimizer(PathPlanner* planner) : planner_(planner) {}
24 
28  virtual ~Optimizer() {}
29 
35  virtual std::vector<Configuration> optimize(const std::vector<Configuration> &path)=0;
36  protected:
38  };
39 
43  typedef Optimizer* (*OptimizerNewFunc)(PathPlanner* planner);
44 
48  typedef void (*OptimizerDeleteFunc)(Optimizer* optimizer);
49 
50  template <class _New>
52  return new _New(planner);
53  }
54 
55  template <class _Delete>
56  void OptimizerDelete(Optimizer* optimizer) {
57  delete optimizer;
58  }
59 };
60 
61 #endif
void(* OptimizerDeleteFunc)(Optimizer *optimizer)
Definition: Optimizer.h:48
PathPlanner * planner_
Definition: Optimizer.h:37
経路最適化アルゴリズム実装用の抽象クラス
Definition: Optimizer.h:17
Optimizer(PathPlanner *planner)
コンストラクタ
Definition: Optimizer.h:23
void OptimizerDelete(Optimizer *optimizer)
Definition: Optimizer.h:56
virtual ~Optimizer()
デストラクタ
Definition: Optimizer.h:28
typedef void(PNGAPI *png_error_ptr) PNGARG((png_structp
virtual std::vector< Configuration > optimize(const std::vector< Configuration > &path)=0
経路を最適化する
Optimizer * OptimizerCreate(PathPlanner *planner)
Definition: Optimizer.h:51
path


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:24