blender/intern/itasc/WDLSSolver.hpp
Campbell Barton 77617fce77 Revert "Cleanup: make format."
This reverts commit 06b8ddca8f.

Add ".clang-format" which prevents these files from being formatted.

Commit [0] missed adding this file.

[0]: f43da6fc4c
2024-09-20 19:46:56 +10:00

49 lines
1,006 B
C++

/* SPDX-FileCopyrightText: 2009 Ruben Smits
*
* SPDX-License-Identifier: LGPL-2.1-or-later */
/** \file
* \ingroup intern_itasc
*/
#ifndef WDLSSOLVER_HPP_
#define WDLSSOLVER_HPP_
#include "Solver.hpp"
namespace iTaSC {
class WDLSSolver: public iTaSC::Solver {
private:
e_matrix m_AWq,m_WyAWq,m_WyAWqt,m_U,m_V,m_WqV;
e_vector m_S,m_temp,m_Wy_ydot;
double m_lambda;
double m_epsilon;
double m_qmax;
int m_ns;
bool m_transpose;
public:
WDLSSolver();
virtual ~WDLSSolver();
virtual bool init(unsigned int nq, unsigned int nc, const std::vector<bool>& gc);
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);
virtual void setParam(SolverParam param, double value)
{
switch (param) {
case DLS_QMAX:
m_qmax = value;
break;
case DLS_LAMBDA_MAX:
m_lambda = value;
break;
case DLS_EPSILON:
m_epsilon = value;
break;
}
}
};
}
#endif /* WDLSSOLVER_HPP_ */