aligator
0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
mpc-util.hpp
Go to the documentation of this file.
1
4
#pragma once
5
6
#include <vector>
7
#include <algorithm>
8
9
namespace
aligator
{
10
16
template
<
typename
T,
typename
Alloc>
17
void
rotate_vec_left
(std::vector<T, Alloc> &v,
long
n_head = 0,
18
long
n_tail = 0) {
19
auto
beg = std::next(v.begin(), n_head);
20
auto
end = std::prev(v.end(), n_tail);
21
std::rotate(beg, beg + 1, end);
22
}
23
24
}
// namespace aligator
aligator
Main package namespace.
Definition
action-model-wrap.hpp:14
aligator::rotate_vec_left
void rotate_vec_left(std::vector< T, Alloc > &v, long n_head=0, long n_tail=0)
Simply rotate an entire std::vector to the left.
Definition
mpc-util.hpp:17
include
aligator
utils
mpc-util.hpp
Generated by
1.11.0