Blender V2.61 - r43446
|
00001 /* 00002 * WDLSSolver.hpp 00003 * 00004 * Created on: Jan 8, 2009 00005 * Author: rubensmits 00006 */ 00007 00008 #ifndef WDLSSOLVER_HPP_ 00009 #define WDLSSOLVER_HPP_ 00010 00011 #include "Solver.hpp" 00012 00013 namespace iTaSC { 00014 00015 class WDLSSolver: public iTaSC::Solver { 00016 private: 00017 e_matrix m_AWq,m_WyAWq,m_WyAWqt,m_U,m_V,m_WqV; 00018 e_vector m_S,m_temp,m_Wy_ydot; 00019 double m_lambda; 00020 double m_epsilon; 00021 double m_qmax; 00022 int m_ns; 00023 bool m_transpose; 00024 public: 00025 WDLSSolver(); 00026 virtual ~WDLSSolver(); 00027 00028 virtual bool init(unsigned int nq, unsigned int nc, const std::vector<bool>& gc); 00029 virtual bool solve(const e_matrix& A, const e_vector& Wy, const e_vector& ydot, const e_matrix& Wq, e_vector& qdot, e_scalar& nlcoef); 00030 virtual void setParam(SolverParam param, double value) 00031 { 00032 switch (param) { 00033 case DLS_QMAX: 00034 m_qmax = value; 00035 break; 00036 case DLS_LAMBDA_MAX: 00037 m_lambda = value; 00038 break; 00039 case DLS_EPSILON: 00040 m_epsilon = value; 00041 break; 00042 } 00043 } 00044 }; 00045 00046 } 00047 00048 #endif /* WDLSSOLVER_HPP_ */