eigen.cpp
Go to the documentation of this file.
1 #include "eigen.h"
2 
3 #include <algorithm>
4 #include <iterator>
5 #include <vector>
6 
8 {
9 
10  std::vector<Eigen::Vector3f>
11  to3D(const std::vector<Eigen::Vector2f>& v)
12 
13  {
14  std::vector<Eigen::Vector3f> v3;
15  v3.reserve(v.size());
16 
17  std::transform(v.begin(),
18  v.end(),
19  std::back_inserter(v3),
20  static_cast<Eigen::Vector3f (*)(const Eigen::Vector2f&)>(&to3D));
21 
22  return v3;
23  }
24 
25 } // namespace armarx::conversions
armarx::conversions::to3D
std::vector< Eigen::Vector3f > to3D(const std::vector< Eigen::Vector2f > &v)
Definition: eigen.cpp:11
eigen.h
armarx::conversions
Definition: eigen.cpp:7
armarx::transform
auto transform(const Container< InputT, Alloc > &in, OutputT(*func)(InputT const &)) -> Container< OutputT, typename std::allocator_traits< Alloc >::template rebind_alloc< OutputT >>
Convenience function (with less typing) to transform a container of type InputT into the same contain...
Definition: algorithm.h:351
armarx::ctrlutil::v
double v(double t, double v0, double a0, double j)
Definition: CtrlUtil.h:39