53 for (
const auto& vars :
variables_->GetComponents()) {
55 int n = vars->GetRows();
61 for (
int k=0; k<jac.outerSize(); ++k)
62 for (Jacobian::InnerIterator it(jac,k); it; ++it)
63 jacobian.coeffRef(it.row(), col+it.col()) = it.value();
virtual double GetCost() const =0
Returns the scalar cost term calculated from the variables.
virtual VecBound GetBounds() const overridefinal
Returns infinite bounds (e.g. no bounds).
A container holding a set of related constraints.
Composite::Ptr VariablesPtr
ConstraintSet(int n_constraints, const std::string &name)
Creates constraints on the variables x.
virtual void LinkWithVariables(const VariablesPtr &x) final
Connects the constraint with the optimization variables.
Jacobian GetJacobian() const overridefinal
The matrix of derivatives for these constraints and variables.
static const Bounds NoBound
virtual void FillJacobianBlock(std::string var_set, Jacobian &jac_block) const =0
Set individual Jacobians corresponding to each decision variable set.
VariableSet(int n_var, const std::string &name)
Creates a set of variables representing a single concept.
Eigen::SparseMatrix< double, Eigen::RowMajor > Jacobian
CostTerm(const std::string &name)
Interface representing either Variable, Cost or Constraint.
virtual void InitVariableDependedQuantities(const VariablesPtr &x_init)
Initialize quantities that depend on the optimization variables.
virtual VectorXd GetValues() const overridefinal
Wrapper function that converts double to Eigen::VectorXd.
std::vector< Bounds > VecBound
int GetRows() const
Returns the number of rows of this component.