|
7 | 7 | #include "eigenpy/eigen-from-python.hpp" |
8 | 8 | #include "eigenpy/std-vector.hpp" |
9 | 9 |
|
10 | | -template <typename MatType, |
11 | | - typename Allocator = Eigen::aligned_allocator<MatType> > |
12 | | -void printVectorOfMatrix(const std::vector<MatType, Allocator> &Ms) { |
| 10 | +template <typename MatType> |
| 11 | +void printVectorOfMatrix( |
| 12 | + const std::vector<MatType, Eigen::aligned_allocator<MatType> > &Ms) { |
13 | 13 | const std::size_t n = Ms.size(); |
14 | 14 | for (std::size_t i = 0; i < n; i++) { |
15 | 15 | std::cout << "el[" << i << "] =\n" << Ms[i] << '\n'; |
16 | 16 | } |
17 | 17 | } |
18 | 18 |
|
19 | | -template <typename MatType, |
20 | | - typename Allocator = Eigen::aligned_allocator<MatType> > |
21 | | -std::vector<MatType, Allocator> copy( |
22 | | - const std::vector<MatType, Allocator> &Ms) { |
23 | | - std::vector<MatType, Allocator> out = Ms; |
| 19 | +template <typename MatType> |
| 20 | +std::vector<MatType, Eigen::aligned_allocator<MatType> > copy( |
| 21 | + const std::vector<MatType, Eigen::aligned_allocator<MatType> > &Ms) { |
| 22 | + std::vector<MatType, Eigen::aligned_allocator<MatType> > out = Ms; |
24 | 23 | return out; |
25 | 24 | } |
26 | 25 |
|
27 | | -template <typename MatType, |
28 | | - typename Allocator = Eigen::aligned_allocator<MatType> > |
29 | | -void setZero(std::vector<MatType, Allocator> &Ms) { |
| 26 | +template <typename MatType> |
| 27 | +void setZero(std::vector<MatType, Eigen::aligned_allocator<MatType> > &Ms) { |
30 | 28 | for (std::size_t i = 0; i < Ms.size(); i++) { |
31 | 29 | Ms[i].setZero(); |
32 | 30 | } |
|
0 commit comments