#include <edge_interface.h>

Public Types | |
| using | Ptr = std::shared_ptr< BaseMixedEdge > |
| using | UPtr = std::unique_ptr< BaseMixedEdge > |
Public Types inherited from corbo::EdgeInterface | |
| using | Ptr = std::shared_ptr< EdgeInterface > |
| using | UPtr = std::unique_ptr< EdgeInterface > |
Public Member Functions | |
| virtual void | computeConstraintHessians (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &eq_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &ineq_jacobian_i, Eigen::Ref< Eigen::MatrixXd > eq_hessian_ij, Eigen::Ref< Eigen::MatrixXd > ineq_hessian_ij, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr) |
| virtual void | computeConstraintHessiansInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &eq_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &ineq_jacobian_i, Eigen::Ref< Eigen::MatrixXd > eq_hessian_ij, Eigen::Ref< Eigen::MatrixXd > ineq_hessian_ij, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr) |
| virtual void | computeConstraintJacobians (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > eq_jacobian, Eigen::Ref< Eigen::MatrixXd > ineq_jacobian, const double *eq_multipliers=nullptr, const double *ineq_multipliers=nullptr) |
| virtual void | computeEqualityHessian (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0) |
| virtual void | computeEqualityHessianInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0) |
| virtual void | computeEqualityJacobian (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > block_jacobian, const double *multipliers=nullptr) |
| virtual void | computeEqualityValues (Eigen::Ref< Eigen::VectorXd > eq_values)=0 |
| virtual void | computeHessians (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &obj_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &eq_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &ineq_jacobian_i, Eigen::Ref< Eigen::MatrixXd > obj_hessian_ij, Eigen::Ref< Eigen::MatrixXd > eq_hessian_ij, Eigen::Ref< Eigen::MatrixXd > ineq_hessian_ij, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr, double weight_obj=1.0) |
| virtual void | computeHessiansInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &obj_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &eq_jacobian_i, const Eigen::Ref< const Eigen::MatrixXd > &ineq_jacobian_i, Eigen::Ref< Eigen::MatrixXd > obj_hessian_ij, Eigen::Ref< Eigen::MatrixXd > eq_hessian_ij, Eigen::Ref< Eigen::MatrixXd > ineq_hessian_ij, const double *multipliers_eq=nullptr, const double *multipliers_ineq=nullptr, double weight_obj=1.0) |
| virtual void | computeInequalityHessian (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0) |
| virtual void | computeInequalityHessianInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0) |
| virtual void | computeInequalityJacobian (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > block_jacobian, const double *multipliers=nullptr) |
| virtual void | computeInequalityValues (Eigen::Ref< Eigen::VectorXd > ineq_values)=0 |
| virtual void | computeJacobians (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > obj_jacobian, Eigen::Ref< Eigen::MatrixXd > eq_jacobian, Eigen::Ref< Eigen::MatrixXd > ineq_jacobian, const double *obj_multipliers=nullptr, const double *eq_multipliers=nullptr, const double *ineq_multipliers=nullptr) |
| virtual void | computeObjectiveHessian (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0) |
| virtual void | computeObjectiveHessianInc (int vtx_idx_i, int vtx_idx_j, const Eigen::Ref< const Eigen::MatrixXd > &block_jacobian_i, Eigen::Ref< Eigen::MatrixXd > block_hessian_ij, const double *multipliers=nullptr, double weight=1.0) |
| virtual void | computeObjectiveJacobian (int vtx_idx, Eigen::Ref< Eigen::MatrixXd > block_jacobian, const double *multipliers=nullptr) |
| virtual void | computeObjectiveValues (Eigen::Ref< Eigen::VectorXd > obj_values)=0 |
| virtual double | computeSquaredNormOfObjectiveValues () |
| virtual double | computeSumOfObjectiveValues () |
| void | computeValues (Eigen::Ref< Eigen::VectorXd > values) final |
| Compute function values. More... | |
| int | getDimension () const override |
| Get dimension of the edge (dimension of the cost-function/constraint value vector) More... | |
| virtual int | getEqualityDimension () const =0 |
| virtual int | getInequalityDimension () const =0 |
| virtual int | getObjectiveDimension () const =0 |
| virtual bool | isEqualityLinear () const |
| virtual bool | isInequalityLinear () const |
| virtual bool | isObjectiveLeastSquaresForm () const =0 |
| virtual bool | isObjectiveLinear () const |
| Return true if the edge is linear (and hence its Hessian is always zero) More... | |
| virtual void | precompute ()=0 |
Public Member Functions inherited from corbo::EdgeInterface | |
| virtual double | computeSquaredNormOfValues () |
| virtual double | computeSumOfValues () |
| int | getNumFiniteVerticesLowerBounds () const |
| int | getNumFiniteVerticesUpperBounds () const |
| virtual int | getNumVertices () const =0 |
| Return number of attached vertices. More... | |
| virtual const VertexInterface * | getVertex (int idx) const =0 |
| virtual VertexInterface * | getVertexRaw (int idx)=0 |
Get access to vertex with index idx (0 <= idx < numVertices) More... | |
| virtual int | verticesDimension () const =0 |
| Return the combined dimension of all attached vertices (excluding fixed vertex components) More... | |
| virtual | ~EdgeInterface () |
| Virtual destructor. More... | |
Friends | |
| class | EdgeSetInterface |
Caching of edge values and block jacobians | |
| int | _edge_idx_obj = 0 |
| int | _edge_idx_eq = 0 |
| int | _edge_idx_ineq = 0 |
| EdgeCache | _objective_cache |
| EdgeCache | _equality_cache |
| EdgeCache | _inequality_cache |
| void | reserveCacheMemory (int num_value_vectors, int num_jacobians) |
| void | reserveValuesCacheMemory (int num_obj_values, int num_eq_values, int num_ineq_values) |
| void | reserveJacobiansCacheMemory (int num_obj_jacobians, int num_eq_jacobians, int num_ineq_jacobians) |
| void | computeObjectiveValuesCached () |
| Call computeObjectiveValues() and store result to the internal cache. More... | |
| void | computeSquaredNormOfObjectiveValuesCached () |
| compute the specialied squared-norm method for computing the values (note only the first element in the values cache is used) More... | |
| void | computeEqualityValuesCached () |
| Call computeEqualityValues() and store result to the internal cache. More... | |
| void | computeInequalityValuesCached () |
| Call computeInequalityValues() and store result to the internal cache. More... | |
| EdgeCache & | getObjectiveCache () |
| const EdgeCache & | getObjectiveCache () const |
| EdgeCache & | getEqualityCache () |
| const EdgeCache & | getEqualityCache () const |
| EdgeCache & | getInequalityCache () |
| const EdgeCache & | getInequalityCache () const |
| int | getEdgeObjectiveIdx () const |
| Retrieve current edge index (warning, this value is determined within the related HyperGraph) More... | |
| int | getEdgeEqualityIdx () const |
| int | getEdgeInequalityIdx () const |
Definition at line 239 of file edge_interface.h.
| using corbo::BaseMixedEdge::Ptr = std::shared_ptr<BaseMixedEdge> |
Definition at line 244 of file edge_interface.h.
| using corbo::BaseMixedEdge::UPtr = std::unique_ptr<BaseMixedEdge> |
Definition at line 245 of file edge_interface.h.
|
virtual |
Definition at line 803 of file edge_interface.cpp.
|
virtual |
Definition at line 1127 of file edge_interface.cpp.
|
virtual |
Definition at line 488 of file edge_interface.cpp.
|
virtual |
Definition at line 602 of file edge_interface.cpp.
|
virtual |
Definition at line 935 of file edge_interface.cpp.
|
virtual |
Definition at line 327 of file edge_interface.cpp.
|
pure virtual |
Implemented in corbo::MixedEdge<>, corbo::MixedEdge< Vertices >, corbo::MixedEdge< VectorVertex, VectorVertex, ScalarVertex, VectorVertex >, corbo::MixedEdge< VerticesT... >, corbo::MixedEdge< VectorVertex, VectorVertex, ScalarVertex, VectorVertex, VectorVertex >, corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::MixedEdgeGenericVectorFun< VerticesT >, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
|
inline |
Call computeEqualityValues() and store result to the internal cache.
Definition at line 354 of file edge_interface.h.
|
virtual |
Definition at line 712 of file edge_interface.cpp.
|
virtual |
Definition at line 1041 of file edge_interface.cpp.
|
virtual |
Definition at line 657 of file edge_interface.cpp.
|
virtual |
Definition at line 988 of file edge_interface.cpp.
|
virtual |
Definition at line 371 of file edge_interface.cpp.
|
pure virtual |
Implemented in corbo::MixedEdge<>, corbo::MixedEdge< Vertices >, corbo::MixedEdge< VectorVertex, VectorVertex, ScalarVertex, VectorVertex >, corbo::MixedEdge< VerticesT... >, corbo::MixedEdge< VectorVertex, VectorVertex, ScalarVertex, VectorVertex, VectorVertex >, corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::MixedEdgeGenericVectorFun< VerticesT >, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
|
inline |
Call computeInequalityValues() and store result to the internal cache.
Definition at line 356 of file edge_interface.h.
|
virtual |
Definition at line 416 of file edge_interface.cpp.
|
virtual |
Definition at line 547 of file edge_interface.cpp.
|
virtual |
Definition at line 882 of file edge_interface.cpp.
|
virtual |
Definition at line 283 of file edge_interface.cpp.
|
pure virtual |
Implemented in corbo::MixedEdge<>, corbo::MixedEdge< Vertices >, corbo::MixedEdge< VectorVertex, VectorVertex, ScalarVertex, VectorVertex >, corbo::MixedEdge< VerticesT... >, corbo::MixedEdge< VectorVertex, VectorVertex, ScalarVertex, VectorVertex, VectorVertex >, corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::MixedEdgeGenericVectorFun< VerticesT >, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
|
inline |
Call computeObjectiveValues() and store result to the internal cache.
Definition at line 350 of file edge_interface.h.
|
inlinevirtual |
Definition at line 280 of file edge_interface.h.
|
inline |
compute the specialied squared-norm method for computing the values (note only the first element in the values cache is used)
Definition at line 352 of file edge_interface.h.
|
inlinevirtual |
Definition at line 273 of file edge_interface.h.
|
inlinefinalvirtual |
Compute function values.
Here, the actual cost/constraint function values are computed:
| [in] | values | values should be stored here according to getDimension(). |
Implements corbo::EdgeInterface.
Definition at line 265 of file edge_interface.h.
|
inlineoverridevirtual |
Get dimension of the edge (dimension of the cost-function/constraint value vector)
Implements corbo::EdgeInterface.
Definition at line 247 of file edge_interface.h.
|
inline |
Definition at line 371 of file edge_interface.h.
|
inline |
Definition at line 372 of file edge_interface.h.
|
inline |
Retrieve current edge index (warning, this value is determined within the related HyperGraph)
Definition at line 370 of file edge_interface.h.
|
inline |
Definition at line 361 of file edge_interface.h.
|
inline |
Definition at line 362 of file edge_interface.h.
|
pure virtual |
Implemented in corbo::MixedEdge<>, corbo::MixedEdge< Vertices >, corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::MixedEdgeGenericVectorFun< VerticesT >, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
|
inline |
Definition at line 364 of file edge_interface.h.
|
inline |
Definition at line 365 of file edge_interface.h.
|
pure virtual |
Implemented in corbo::MixedEdge<>, corbo::MixedEdge< Vertices >, corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::MixedEdgeGenericVectorFun< VerticesT >, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
|
inline |
Definition at line 358 of file edge_interface.h.
|
inline |
Definition at line 359 of file edge_interface.h.
|
pure virtual |
Implemented in corbo::MixedEdge<>, corbo::MixedEdge< Vertices >, corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::MixedEdgeGenericVectorFun< VerticesT >, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
|
inlinevirtual |
Reimplemented in corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
Definition at line 257 of file edge_interface.h.
|
inlinevirtual |
Reimplemented in corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
Definition at line 258 of file edge_interface.h.
|
pure virtual |
Implemented in corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::MixedEdgeGenericVectorFun< VerticesT >, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
|
inlinevirtual |
Return true if the edge is linear (and hence its Hessian is always zero)
Reimplemented in corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
Definition at line 256 of file edge_interface.h.
|
pure virtual |
Implemented in corbo::MixedEdge<>, corbo::MixedEdge< Vertices >, corbo::MixedEdge< VectorVertex, VectorVertex, ScalarVertex, VectorVertex >, corbo::MixedEdge< VerticesT... >, corbo::MixedEdge< VectorVertex, VectorVertex, ScalarVertex, VectorVertex, VectorVertex >, corbo::CombinedUncompressedCollocationEdge, corbo::CombinedCompressedCollocationMultipleControlsEdge, corbo::CombinedCompressedCollocationEdge, corbo::ConstControlCombinedCompressedCollocationEdge, corbo::MultipleShootingEdge, corbo::MultipleShootingEdgeSingleControlTimeScaling, corbo::MixedEdgeGenericVectorFun< VerticesT >, corbo::QuadratureCollocationEdge, and corbo::MultipleShootingEdgeSingleControl.
Definition at line 331 of file edge_interface.h.
|
inline |
Definition at line 342 of file edge_interface.h.
|
inline |
Definition at line 336 of file edge_interface.h.
|
friend |
Definition at line 241 of file edge_interface.h.
|
protected |
Definition at line 376 of file edge_interface.h.
|
protected |
Definition at line 377 of file edge_interface.h.
|
protected |
Definition at line 375 of file edge_interface.h.
|
protected |
Definition at line 380 of file edge_interface.h.
|
protected |
Definition at line 381 of file edge_interface.h.
|
protected |
Definition at line 379 of file edge_interface.h.