aligator  0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
composite-costs.hpp
Go to the documentation of this file.
1
3#pragma once
4
5#include "aligator/fwd.hpp"
8
9#include <fmt/ostream.h>
10
11namespace aligator {
12
14template <typename Scalar>
17 using Base = CostDataAbstractTpl<Scalar>;
18 using StageFunctionData = StageFunctionDataTpl<Scalar>;
19 using RowMatrixXs = Eigen::Matrix<Scalar, -1, -1, Eigen::RowMajor>;
20
21 shared_ptr<StageFunctionData> residual_data;
23 VectorXs Wv_buf;
24 CompositeCostDataTpl(const int ndx, const int nu,
25 shared_ptr<StageFunctionData> rdata)
26 : Base(ndx, nu), residual_data(rdata), JtW_buf(ndx + nu, rdata->nr),
27 Wv_buf(rdata->nr) {
28 JtW_buf.setZero();
29 Wv_buf.setZero();
30 }
31};
32
33} // namespace aligator
34
35#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
36#include "./composite-costs.txx"
37#endif
Base definitions for ternary functions.
Forward declarations.
Main package namespace.
Data struct for composite costs.
Eigen::Matrix< Scalar, -1, -1, Eigen::RowMajor > RowMatrixXs
CompositeCostDataTpl(const int ndx, const int nu, shared_ptr< StageFunctionData > rdata)
shared_ptr< StageFunctionData > residual_data
Data struct for CostAbstractTpl.