Merge of itasc branch. Project files, scons and cmake should be working. Makefile...
[blender.git] / intern / itasc / WSDLSSolver.hpp
1 /* $Id: WSDLSSolver.hpp 20622 2009-06-04 12:47:59Z ben2610 $
2  * WSDLSSolver.hpp
3  *
4  *  Created on: Mar 26, 2009
5  *      Author: benoit bolsee
6  */
7
8 #ifndef WSDLSSOLVER_HPP_
9 #define WSDLSSOLVER_HPP_
10
11 #include "Solver.hpp"
12
13 namespace iTaSC {
14
15 class WSDLSSolver: public iTaSC::Solver {
16 private:
17     e_matrix m_AWq,m_WyAWq,m_U,m_V,m_WqV;
18     e_vector m_S,m_temp,m_Wy_ydot;
19         std::vector<bool> m_ytask;
20         e_scalar m_qmax;
21         unsigned int m_ns, m_nc, m_nq;
22 public:
23     WSDLSSolver();
24     virtual ~WSDLSSolver();
25
26     virtual bool init(unsigned int _nq, unsigned int _nc, const std::vector<bool>& gc);
27     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);
28         virtual void setParam(SolverParam param, double value)
29         {
30                 switch (param) {
31                 case DLS_QMAX:
32                         m_qmax = value;
33                         break;
34                 }
35         }
36 };
37
38 }
39
40 #endif /* WSDLSSOLVER_HPP_ */