Merge branch 'blender2.7'
[blender.git] / intern / itasc / WSDLSSolver.hpp
1 /*
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_WyAWqt,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         bool m_transpose;
23 public:
24     WSDLSSolver();
25     virtual ~WSDLSSolver();
26
27     virtual bool init(unsigned int _nq, unsigned int _nc, const std::vector<bool>& gc);
28     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);
29         virtual void setParam(SolverParam param, double value)
30         {
31                 switch (param) {
32                 case DLS_QMAX:
33                         m_qmax = value;
34                         break;
35                 default:
36                         break;
37                 }
38         }
39 };
40
41 }
42
43 #endif /* WSDLSSOLVER_HPP_ */