20 #ifndef NUMERICS_LEMKE_ALGORITHM_H_
21 #define NUMERICS_LEMKE_ALGORITHM_H_
23 #include <fmatvec/fmatvec.h>
24 #include <fmatvec/atom.h>
36 assert(M_.rows() == q.size());
37 assert(M_.cols() == q.size());
64 assert(M_.rows() == q_.size());
65 assert(M_.cols() == q_.size());
75 for (
int i = 0; i < M.size(); i++)
76 for (
int j = 0; j < M.size(); j++)
91 int findLexicographicMinimum(
const fmatvec::Mat &A,
const int & pivotColIndex);
93 void GaussJordanEliminationStep(
fmatvec::Mat &A,
int pivotRowIndex,
int pivotColumnIndex,
const std::vector<size_t> & basis);
95 bool validBasis(
const std::vector<size_t> & basis);
bool DEBUGLEVEL
define level of debug output
Definition: lemke_algorithm.h:108
void setSystem(const fmatvec::SymMat &M_, const fmatvec::Vec &q_)
set system with Matrix M and vector q
Definition: lemke_algorithm.h:73
Definition: lemke_algorithm.h:28
void setSystem(const fmatvec::SqrMat &M_, const fmatvec::Vec &q_)
set system with Matrix M and vector q
Definition: lemke_algorithm.h:63
fmatvec::Vec solve(unsigned int maxloops=0)
solve algorithm adapted from : Fast Implementation of Lemkeās Algorithm for Rigid Body Contact Simula...
Definition: lemke_algorithm.cc:34
SquareMatrix< Ref, double > SqrMat
int getSteps(void)
get the number of steps until the solution was found
Definition: lemke_algorithm.h:56
int getInfo()
return info of solution process
Definition: lemke_algorithm.h:49
unsigned int steps
number of steps until the Lemke algorithm found a solution
Definition: lemke_algorithm.h:103
int info
did the algorithm find a solution
Definition: lemke_algorithm.h:116