Blender V4.3
WDLSSolver.hpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Ruben Smits
2 *
3 * SPDX-License-Identifier: LGPL-2.1-or-later */
4
9#ifndef WDLSSOLVER_HPP_
10#define WDLSSOLVER_HPP_
11
12#include "Solver.hpp"
13
14namespace iTaSC {
15
17private:
18 e_matrix m_AWq,m_WyAWq,m_WyAWqt,m_U,m_V,m_WqV;
19 e_vector m_S,m_temp,m_Wy_ydot;
20 double m_lambda;
21 double m_epsilon;
22 double m_qmax;
23 int m_ns;
24 bool m_transpose;
25public:
26 WDLSSolver();
27 virtual ~WDLSSolver();
28
29 virtual bool init(unsigned int nq, unsigned int nc, const std::vector<bool>& gc);
30 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);
31 virtual void setParam(SolverParam param, double value)
32 {
33 switch (param) {
34 case DLS_QMAX:
35 m_qmax = value;
36 break;
37 case DLS_LAMBDA_MAX:
38 m_lambda = value;
39 break;
40 case DLS_EPSILON:
41 m_epsilon = value;
42 break;
43 }
44 }
45};
46
47}
48
49#endif /* WDLSSOLVER_HPP_ */
void init()
virtual void setParam(SolverParam param, double value)
virtual ~WDLSSolver()
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)
#define e_vector
#define e_scalar
#define e_matrix