aligator  0.14.0
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>
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)
27 , residual_data(rdata)
28 , JtW_buf(ndx + nu, rdata->nr)
29 , Wv_buf(rdata->nr) {
30 JtW_buf.setZero();
31 Wv_buf.setZero();
32 }
33};
34
35} // namespace aligator
36
37#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
38#include "./composite-costs.txx"
39#endif
Base definitions for ternary functions.
Forward declarations.
Main package namespace.
CostDataAbstractTpl< Scalar > Base
Eigen::Matrix< Scalar, -1, -1, Eigen::RowMajor > RowMatrixXs
StageFunctionDataTpl< Scalar > StageFunctionData
CompositeCostDataTpl(const int ndx, const int nu, shared_ptr< StageFunctionData > rdata)
shared_ptr< StageFunctionData > residual_data
CostDataAbstractTpl(const int ndx, const int nu)
Base struct for function data.