DART  6.7.3
dart::constraint::BoxedLcpSolver Class Referenceabstract

#include <BoxedLcpSolver.hpp>

Inheritance diagram for dart::constraint::BoxedLcpSolver:
dart::constraint::DantzigBoxedLcpSolver dart::constraint::PgsBoxedLcpSolver

Public Member Functions

virtual ~BoxedLcpSolver ()=default
 Destructor. More...
 
virtual const std::string & getType () const =0
 Returns the type. More...
 
template<typename BoxedLcpSolverT >
bool is () const
 Get true if this solver and the template parameter (a solver class) are the same type. More...
 
virtual void solve (int n, double *A, double *x, double *b, int nub, double *lo, double *hi, int *findex)=0
 Solves constriant impulses for a constrained group. More...
 
virtual bool canSolve (int n, const double *A)=0
 

Constructor & Destructor Documentation

◆ ~BoxedLcpSolver()

virtual dart::constraint::BoxedLcpSolver::~BoxedLcpSolver ( )
virtualdefault

Destructor.

Member Function Documentation

◆ canSolve()

virtual bool dart::constraint::BoxedLcpSolver::canSolve ( int  n,
const double *  A 
)
pure virtual

◆ getType()

virtual const std::string& dart::constraint::BoxedLcpSolver::getType ( ) const
pure virtual

◆ is()

template<typename BoxedLcpSolverT >
bool dart::constraint::BoxedLcpSolver::is

Get true if this solver and the template parameter (a solver class) are the same type.

This function is a syntactic sugar, which is identical to:

getType() == ShapeType::getStaticType()
virtual const std::string & getType() const =0
Returns the type.

.

Example code:

auto shape = bodyNode->getShapeNode(0)->getShape();
if (shape->is<BoxShape>())
std::cout << "The shape type is box!\n";
See also
getType()

◆ solve()

virtual void dart::constraint::BoxedLcpSolver::solve ( int  n,
double *  A,
double *  x,
double *  b,
int  nub,
double *  lo,
double *  hi,
int *  findex 
)
pure virtual

Solves constriant impulses for a constrained group.

Implemented in dart::constraint::PgsBoxedLcpSolver, and dart::constraint::DantzigBoxedLcpSolver.