So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
|
LCP local solver that can be used within GaussSeidel and ProjectedGradient solvers. More...
#include <LCPLaw.hpp>
Public Types | |
enum | { dimension = 1 } |
typedef LocalProblemTraits < dimension, Scalar > | Traits |
Public Member Functions | |
LCPLaw () | |
Constructor. | |
Scalar | eval (const unsigned problemIndex, const typename Traits::Vector &x, const typename Traits::Vector &y) const |
bool | solveLocal (const unsigned problemIndex, const typename Traits::Matrix &A, const typename Traits::Vector &b, typename Traits::Vector &x, const Scalar scaling) const |
Solves the local problem. More... | |
void | projectOnConstraint (const unsigned problemIndex, typename Traits::Vector &x) const |
Projects x on . | |
template<typename Segment > | |
void | dualityCOV (const unsigned, const Segment &, typename Traits::Vector &s) const |
This NSLaw is always associated, so dualityCOV is null. | |
LCP local solver that can be used within GaussSeidel and ProjectedGradient solvers.
For demonstration purposes. Since blocks are 1x1, other libraries are probably more suited.
Scalar | the scalar type |
Dimension | the dimension of the blocks of the global matrix |
Scalar bogus::LCPLaw< Scalar >::eval | ( | const unsigned | problemIndex, |
const typename Traits::Vector & | x, | ||
const typename Traits::Vector & | y | ||
) | const |
bool bogus::LCPLaw< Scalar >::solveLocal | ( | const unsigned | problemIndex, |
const typename Traits::Matrix & | A, | ||
const typename Traits::Vector & | b, | ||
typename Traits::Vector & | x, | ||
const Scalar | scaling | ||
) | const |
Solves the local problem.