Data used in constraint components. Composed by slack, dual (Lagrange multiplier), primal residual, complementary slackness between the slack and dual, and directions of slack and dual.
More...
#include <constraint_component_data.hpp>
|
| ConstraintComponentData (const int dimc, const double barrier_param) |
| Constructor. More...
|
|
| ConstraintComponentData () |
| Default constructor. More...
|
|
| ~ConstraintComponentData ()=default |
| Default destructor. More...
|
|
| ConstraintComponentData (const ConstraintComponentData &)=default |
| Default copy constructor. More...
|
|
ConstraintComponentData & | operator= (const ConstraintComponentData &)=default |
| Default copy operator. More...
|
|
| ConstraintComponentData (ConstraintComponentData &&) noexcept=default |
| Default move constructor. More...
|
|
ConstraintComponentData & | operator= (ConstraintComponentData &&) noexcept=default |
| Default move assign operator. More...
|
|
double | KKTError () const |
| Returns the squared norm of the KKT reisdual, that is, the sum of the squared norm of the primal residual and complementary slackness of the constraint. More...
|
|
template<int p = 1> |
double | primalFeasibility () const |
| Returns the lp norm of the primal feasibility, i.e., the constraint violation. Default norm is l1-norm. You can also specify l-infty norm by passing Eigen::Infinity as the template parameter. More...
|
|
template<int p = 1> |
double | dualFeasibility () const |
| Returns the lp norm of the dual feasibility. Default norm is l1-norm. You can also specify l-infty norm by passing Eigen::Infinity as the template parameter. More...
|
|
void | resize (const int dimc) |
| Resizes the constraint. More...
|
|
int | dimc () const |
| Dimension of the constraint. More...
|
|
bool | checkDimensionalConsistency () const |
| Check whether dimensions of slack, dual, residual, cmpl, dslack, ddual are ConstraintComponentData::dimc(). More...
|
|
bool | isApprox (const ConstraintComponentData &other) const |
| Checks the equivalence of two ConstraintComponentData. More...
|
|
Data used in constraint components. Composed by slack, dual (Lagrange multiplier), primal residual, complementary slackness between the slack and dual, and directions of slack and dual.
◆ ConstraintComponentData() [1/4]
robotoc::ConstraintComponentData::ConstraintComponentData |
( |
const int |
dimc, |
|
|
const double |
barrier_param |
|
) |
| |
Constructor.
- Parameters
-
[in] | dimc | Dimension of the constraint component. Must be positive. |
[in] | barrier_param | Barrier parameter. Must be positive. Should be small. Only used to initialize the slack and dual variables. |
◆ ConstraintComponentData() [2/4]
robotoc::ConstraintComponentData::ConstraintComponentData |
( |
| ) |
|
◆ ~ConstraintComponentData()
robotoc::ConstraintComponentData::~ConstraintComponentData |
( |
| ) |
|
|
default |
◆ ConstraintComponentData() [3/4]
Default copy constructor.
◆ ConstraintComponentData() [4/4]
Default move constructor.
◆ checkDimensionalConsistency()
bool robotoc::ConstraintComponentData::checkDimensionalConsistency |
( |
| ) |
const |
◆ dimc()
int robotoc::ConstraintComponentData::dimc |
( |
| ) |
const |
|
inline |
Dimension of the constraint.
- Returns
- Dimension of the constraint.
◆ dualFeasibility()
template<int p = 1>
double robotoc::ConstraintComponentData::dualFeasibility |
( |
| ) |
const |
|
inline |
Returns the lp norm of the dual feasibility. Default norm is l1-norm. You can also specify l-infty norm by passing Eigen::Infinity as the template parameter.
- Template Parameters
-
p | Index of norm. Default is 1 (l1-norm). |
- Returns
- The lp norm of the dual feasibility.
◆ isApprox()
Checks the equivalence of two ConstraintComponentData.
- Parameters
-
- Returns
- true if this and other is same. false otherwise.
◆ KKTError()
double robotoc::ConstraintComponentData::KKTError |
( |
| ) |
const |
|
inline |
Returns the squared norm of the KKT reisdual, that is, the sum of the squared norm of the primal residual and complementary slackness of the constraint.
- Returns
- Squared norm of the KKT residual.
◆ operator=() [1/2]
◆ operator=() [2/2]
Default move assign operator.
◆ primalFeasibility()
template<int p = 1>
double robotoc::ConstraintComponentData::primalFeasibility |
( |
| ) |
const |
|
inline |
Returns the lp norm of the primal feasibility, i.e., the constraint violation. Default norm is l1-norm. You can also specify l-infty norm by passing Eigen::Infinity as the template parameter.
- Template Parameters
-
p | Index of norm. Default is 1 (l1-norm). |
- Returns
- The lp norm of the primal feasibility.
◆ resize()
void robotoc::ConstraintComponentData::resize |
( |
const int |
dimc | ) |
|
Resizes the constraint.
- Parameters
-
◆ cmpl
Eigen::VectorXd robotoc::ConstraintComponentData::cmpl |
◆ cond
Eigen::VectorXd robotoc::ConstraintComponentData::cond |
◆ ddual
Eigen::VectorXd robotoc::ConstraintComponentData::ddual |
◆ dslack
Eigen::VectorXd robotoc::ConstraintComponentData::dslack |
◆ dual
Eigen::VectorXd robotoc::ConstraintComponentData::dual |
std::vector<Eigen::MatrixXd> robotoc::ConstraintComponentData::J |
◆ log_barrier
double robotoc::ConstraintComponentData::log_barrier |
Value of the log berrier function of the slack variable.
std::vector<Eigen::VectorXd> robotoc::ConstraintComponentData::r |
◆ residual
Eigen::VectorXd robotoc::ConstraintComponentData::residual |
◆ slack
Eigen::VectorXd robotoc::ConstraintComponentData::slack |
The documentation for this class was generated from the following file: