Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Solver.hpp « itasc « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2213834f1146b6207b7c906f419da44a5e175c01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* SPDX-License-Identifier: LGPL-2.1-or-later
 * Copyright 2009 Ruben Smits. */

/** \file
 * \ingroup intern_itasc
 */

#ifndef SOLVER_HPP_
#define SOLVER_HPP_

#include <vector>
#include "eigen_types.hpp"

namespace iTaSC{

class Solver{
public:
	enum SolverParam {
		DLS_QMAX = 0,
		DLS_LAMBDA_MAX,
		DLS_EPSILON
	};
    virtual ~Solver(){};

	// gc = grouping of constraint output , 
	//      size of vector = nc, alternance of true / false to indicate the grouping of output
	virtual bool init(unsigned int nq, unsigned int nc, const std::vector<bool>& gc)=0;
    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)=0;
	virtual void setParam(SolverParam param, double value)=0;
};

}
#endif /* SOLVER_HPP_ */