#include <jrl-qp/internal/ConstraintNormal.h>
Public Member Functions | |
ConstraintNormal () | |
ConstraintNormal (const MatrixConstRef &C, int p, ActivationStatus status) | |
ConstraintNormal (const MatrixConstRef &C, const SelectedConstraint &sc) | |
ConstraintNormal (const ConstraintNormal &other) | |
ConstraintNormal (ConstraintNormal &&other) noexcept | |
ConstraintNormal & | operator= (const ConstraintNormal &other) |
int | index () const |
int | bndIndex () const |
ActivationStatus | status () const |
void | preMultiplyByMt (VectorRef out, const MatrixConstRef &M) const |
double | dot (const VectorConstRef &v) const |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ConstraintNormal &n) |
A class to represent the vector n
of a constraint \( n^T x op b \).
It is meant to abstract the difference between general constraints, where n
is a column of a dense matrix C
, and bounds, where n
is a column of the identity matrix, to provide optimized computations.
|
inline |
Default constructor.
|
inline |
Usual constructor
C | Matrix from which the column is taken. Useful only if p < C.cols(). Note that the object only keep a reference on the matrix, that must remain valid for the lifetime of the object. |
p | If smaller than C.cols(), refers to a column of C (general constraints). If not, refer to the bound with index p-C.Cols(). |
status | Activation status of the associated constraint. Must be consistent with the index p . |
|
inline |
Same as the usual construtor, but with (p, status) given by a SelectedConstraint class.
|
inline |
|
inlinenoexcept |
|
inline |
Underlying index of the constraint seen as a bound constraint, i.e. index() - C.cols().
|
inline |
Performs \( n^T v \).
|
inline |
Underlying index of the constraint.
|
inline |
|
inline |
Performs \( out = M^T * n \).
|
inline |
Activation status of the corresponding constraint.
|
friend |