jrl::qp::internal::ConstraintNormal Class Reference

#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
 
ConstraintNormaloperator= (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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ConstraintNormal() [1/5]

jrl::qp::internal::ConstraintNormal::ConstraintNormal ( )
inline

Default constructor.

◆ ConstraintNormal() [2/5]

jrl::qp::internal::ConstraintNormal::ConstraintNormal ( const MatrixConstRef C,
int  p,
ActivationStatus  status 
)
inline

Usual constructor

Parameters
CMatrix 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.
pIf smaller than C.cols(), refers to a column of C (general constraints). If not, refer to the bound with index p-C.Cols().
statusActivation status of the associated constraint. Must be consistent with the index p.

◆ ConstraintNormal() [3/5]

jrl::qp::internal::ConstraintNormal::ConstraintNormal ( const MatrixConstRef C,
const SelectedConstraint sc 
)
inline

Same as the usual construtor, but with (p, status) given by a SelectedConstraint class.

◆ ConstraintNormal() [4/5]

jrl::qp::internal::ConstraintNormal::ConstraintNormal ( const ConstraintNormal other)
inline

◆ ConstraintNormal() [5/5]

jrl::qp::internal::ConstraintNormal::ConstraintNormal ( ConstraintNormal &&  other)
inlinenoexcept

Member Function Documentation

◆ bndIndex()

int jrl::qp::internal::ConstraintNormal::bndIndex ( ) const
inline

Underlying index of the constraint seen as a bound constraint, i.e. index() - C.cols().

◆ dot()

double jrl::qp::internal::ConstraintNormal::dot ( const VectorConstRef v) const
inline

Performs \( n^T v \).

◆ index()

int jrl::qp::internal::ConstraintNormal::index ( ) const
inline

Underlying index of the constraint.

◆ operator=()

ConstraintNormal& jrl::qp::internal::ConstraintNormal::operator= ( const ConstraintNormal other)
inline

◆ preMultiplyByMt()

void jrl::qp::internal::ConstraintNormal::preMultiplyByMt ( VectorRef  out,
const MatrixConstRef M 
) const
inline

Performs \( out = M^T * n \).

◆ status()

ActivationStatus jrl::qp::internal::ConstraintNormal::status ( ) const
inline

Activation status of the corresponding constraint.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const ConstraintNormal n 
)
friend

The documentation for this class was generated from the following file: