aligator
0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
expose-cost-ops.cpp
Go to the documentation of this file.
1
3
#include "
aligator/modelling/costs/cost-direct-sum.hpp
"
4
#include "
aligator/python/fwd.hpp
"
5
6
namespace
aligator
{
7
namespace
python
{
8
9
using
context::CostAbstract
;
10
using
context::Manifold
;
11
using
context::Scalar
;
12
using
DirectSumCost
=
DirectSumCostTpl<Scalar>
;
13
using
PolyCost
=
xyz::polymorphic<CostAbstract>
;
14
15
void
exposeCostOps
() {
16
bp::class_<DirectSumCost, bp::bases<CostAbstract>>(
"DirectSumCost"
,
17
bp::no_init)
18
.def(bp::init<
xyz::polymorphic<CostAbstract>
,
19
xyz::polymorphic<CostAbstract>
>(
20
bp::args(
"self"
,
"cost1"
,
"cost2"
)))
21
.def_readonly(
"cost1"
, &
DirectSumCost::c1_
)
22
.def_readonly(
"cost2"
, &
DirectSumCost::c2_
)
23
.def(
PolymorphicVisitor<PolyCost>
());
24
25
bp::class_<DirectSumCost::Data, bp::bases<context::CostData>>(
26
"DirectSumCostData"
, bp::no_init)
27
.def_readonly(
"data1"
, &DirectSumCost::Data::data1_)
28
.def_readonly(
"data2"
, &DirectSumCost::Data::data2_);
29
30
bp::def(
"directSum"
,
directSum<Scalar>
, bp::args(
"cost1"
,
"cost2"
),
31
"Perform the direct sum of two cost functions, :math:`l_3(x,u) = "
32
"l_1(x_1,u_1) + l_2(x_2,u_2)`"
);
33
}
34
35
}
// namespace python
36
}
// namespace aligator
fwd.hpp
xyz::polymorphic
Definition
polymorphic_cxx14.h:106
cost-direct-sum.hpp
aligator::context::CostAbstract
CostAbstractTpl< Scalar > CostAbstract
Definition
context.hpp:26
aligator::context::Manifold
ManifoldAbstractTpl< Scalar > Manifold
Definition
context.hpp:14
aligator::context::Scalar
double Scalar
Definition
context.hpp:9
aligator::python
The Python bindings.
Definition
blk-matrix.hpp:5
aligator::python::exposeCostOps
void exposeCostOps()
Definition
expose-cost-ops.cpp:15
aligator::python::PolyCost
xyz::polymorphic< CostAbstract > PolyCost
Definition
expose-costs.cpp:21
aligator::python::DirectSumCost
DirectSumCostTpl< Scalar > DirectSumCost
Definition
expose-cost-ops.cpp:12
aligator
Main package namespace.
Definition
action-model-wrap.hpp:14
aligator::directSum
auto directSum(xyz::polymorphic< CostAbstractTpl< Scalar > > const &c1, xyz::polymorphic< CostAbstractTpl< Scalar > > const &c2)
Definition
cost-direct-sum.hpp:127
aligator::DirectSumCostTpl
Definition
cost-direct-sum.hpp:10
aligator::DirectSumCostTpl< Scalar >::c1_
xyz::polymorphic< BaseCost > c1_
Definition
cost-direct-sum.hpp:27
aligator::DirectSumCostTpl< Scalar >::c2_
xyz::polymorphic< BaseCost > c2_
Definition
cost-direct-sum.hpp:27
aligator::python::PolymorphicVisitor
Definition
polymorphic.hpp:30
bindings
python
src
modelling
expose-cost-ops.cpp
Generated by
1.13.2