NLToolbox
src/include/HybridizationInterface.h
00001 /*
00002  * HybridizationInterface.h
00003  *
00004  *  Created on: Feb 7, 2013
00005  *      Author: romain
00006  */
00007 
00008 #ifndef HYBRIDIZATIONINTERFACE_H_
00009 #define HYBRIDIZATIONINTERFACE_H_
00010 
00011 #include "DynamicalSystem.h"
00012 #include "Hpolyhedron.h"
00013 #include "PointerSystem.h"
00014 #include "ApproximationBuilder.h"
00015 #include "vector"
00016 
00017 namespace nltool {
00018 
00019 enum HybridizationResult {
00020         SUCCESS, REQUIRESPLITTING
00021 };
00022 
00023 class HybridizationInterface {
00032 public:
00033 
00037         HybridizationInterface();
00038 
00043         HybridizationInterface(int dimension);
00044 
00045         virtual ~HybridizationInterface();
00046 
00058         void setSystemDynamic(unsigned dim,
00059                         double (*f)(const int i, const std::vector<double>& pt, void* data),
00060                         double (*ddf)(const int i, const std::vector<double> &pt,
00061                                         const int dx, const int dy, void* data), void* data);
00062 
00074         void setSystemDynamic(unsigned dim, std::string str);
00075 
00086         void setInitialSet(unsigned dim, unsigned nbConstraint,
00087                         vector<vector<double> > &A, vector<double> &b);
00088 
00106         HybridizationResult computeApproximation(const double precision,
00107                         vector<vector<double> > &resultA, vector<double> &resultb,
00108                         vector<vector<double> > &domainA, vector<double> &domainb);
00109 
00110 private:
00111         unsigned dimension;
00112         Hpolyhedron initialSet;
00113         DynamicalSystem* systemPtr;
00114         bool systemReady, setReady;
00115         // PointerSystem pointerSystem;
00116         // ApproximationBuilder approximationBuilder;
00117 };
00118 
00119 } /* namespace nltool */
00120 #endif /* HYBRIDIZATIONINTERFACE_H_ */
 All Classes Namespaces Functions