aligator
0.19.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Toggle main menu visibility
Loading...
Searching...
No Matches
results.hpp
Go to the documentation of this file.
1
3
#pragma once
4
5
#include "
aligator/solvers/results-base.hpp
"
6
#include <fmt/ostream.h>
7
#include <fmt/format.h>
8
9
namespace
aligator
{
10
12
template
<
typename
_Scalar>
struct
ResultsTpl
final :
ResultsBaseTpl
<_Scalar> {
13
using
Scalar
= _Scalar;
14
ALIGATOR_DYNAMIC_TYPEDEFS
(
Scalar
);
15
using
Base
=
ResultsBaseTpl<Scalar>
;
16
using
Base::conv
;
17
using
Base::gains_
;
18
using
Base::num_iters
;
19
using
Base::us
;
20
using
Base::xs
;
21
23
std::vector<VectorXs>
lams
;
25
std::vector<VectorXs>
vs
;
27
std::size_t
al_iter
= 0;
28
29
explicit
ResultsTpl
()
30
:
Base
() {}
31
32
ResultsTpl
(
const
ResultsTpl
&) =
default
;
33
ResultsTpl
&
operator=
(
const
ResultsTpl
&) =
default
;
34
35
ResultsTpl
(
ResultsTpl
&&) =
default
;
36
ResultsTpl
&
operator=
(
ResultsTpl
&&) =
default
;
37
40
explicit
ResultsTpl
(
const
TrajOptProblemTpl<Scalar>
&problem);
41
42
void
cycleAppend
(
const
TrajOptProblemTpl<Scalar>
&problem,
43
const
ConstVectorRef &x0);
44
};
45
46
template
<
typename
Scalar>
47
std::ostream &
operator<<
(std::ostream &oss,
const
ResultsTpl<Scalar>
&self) {
48
return
oss << fmt::format(
"{}"
, self);
49
}
50
51
#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
52
extern
template
struct
ResultsTpl<context::Scalar>;
53
#endif
54
}
// namespace aligator
55
56
template
<
typename
Scalar>
struct
fmt::formatter<aligator::ResultsTpl<Scalar>> {
57
constexpr
auto
parse(format_parse_context &ctx)
const
58
->
decltype
(ctx.begin()) {
59
return
ctx.end();
60
}
61
62
auto
format(
const
aligator::ResultsTpl<Scalar>
&self,
63
format_context &ctx)
const
->
decltype
(ctx.out()) {
64
auto
s = self.printBase();
65
return
fmt::format_to(ctx.out(),
"Results {{{}\n}}"
, s);
66
}
67
};
aligator
Main package namespace.
Definition
action-model-wrap.hpp:14
aligator::operator<<
std::ostream & operator<<(std::ostream &oss, const StageFunctionDataTpl< T > &self)
results-base.hpp
aligator::ResultsBaseTpl< Scalar >::us
std::vector< VectorXs > us
Definition
results-base.hpp:34
aligator::ResultsBaseTpl< Scalar >::conv
bool conv
Definition
results-base.hpp:20
aligator::ResultsBaseTpl< Scalar >::num_iters
std::size_t num_iters
Definition
results-base.hpp:19
aligator::ResultsBaseTpl::ResultsBaseTpl
ResultsBaseTpl()
Definition
results-base.hpp:36
aligator::ResultsBaseTpl< Scalar >::xs
std::vector< VectorXs > xs
Definition
results-base.hpp:32
aligator::ResultsBaseTpl< Scalar >::gains_
std::vector< MatrixXs > gains_
Definition
results-base.hpp:30
aligator::ResultsTpl
Results holder struct.
Definition
results.hpp:12
aligator::ResultsTpl::ResultsTpl
ResultsTpl()
Definition
results.hpp:29
aligator::ResultsTpl::ResultsTpl
ResultsTpl(ResultsTpl &&)=default
aligator::ResultsTpl::ResultsTpl
ResultsTpl(const ResultsTpl &)=default
aligator::ResultsTpl< Scalar >::al_iter
std::size_t al_iter
Definition
results.hpp:27
aligator::ResultsTpl::ResultsTpl
ResultsTpl(const TrajOptProblemTpl< Scalar > &problem)
Create the results struct from a problem (TrajOptProblemTpl) instance.
aligator::ResultsTpl::ALIGATOR_DYNAMIC_TYPEDEFS
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
aligator::ResultsTpl< Scalar >::lams
std::vector< VectorXs > lams
Definition
results.hpp:23
aligator::ResultsTpl::cycleAppend
void cycleAppend(const TrajOptProblemTpl< Scalar > &problem, const ConstVectorRef &x0)
aligator::ResultsTpl< Scalar >::Scalar
Scalar Scalar
Definition
results.hpp:13
aligator::ResultsTpl::operator=
ResultsTpl & operator=(ResultsTpl &&)=default
aligator::ResultsTpl::operator=
ResultsTpl & operator=(const ResultsTpl &)=default
aligator::ResultsTpl< Scalar >::vs
std::vector< VectorXs > vs
Definition
results.hpp:25
aligator::ResultsTpl< Scalar >::Base
ResultsBaseTpl< Scalar > Base
Definition
results.hpp:15
aligator::TrajOptProblemTpl
Trajectory optimization problem.
Definition
traj-opt-problem.hpp:102
include
aligator
solvers
proxddp
results.hpp
Generated by
1.17.0