Skip to content
Snippets Groups Projects
Commit 2aeb3838 authored by Antonio El Khoury's avatar Antonio El Khoury
Browse files

Add Scalar template argument to UnalignedEquivalent struct.

* It allows creating unaligned equivalent of Eigen matrix using a
  different scalar type. This can be useful when matrix types use
  single precision floats, whereas Numpy matrix types use double
  precision floats by default.
* Default template argument value is Matrix D scalar type to preserve
  backward-compatibility.
parent 551f08a9
No related branches found
No related tags found
No related merge requests found
......@@ -22,11 +22,11 @@
namespace eigenpy
{
template<typename D>
template<typename D, typename Scalar = typename D::Scalar>
struct UnalignedEquivalent
{
typedef Eigen::MatrixBase<D> MatType;
typedef Eigen::Matrix<typename D::Scalar,
typedef Eigen::Matrix<Scalar,
D::RowsAtCompileTime,
D::ColsAtCompileTime,
#ifndef EIGENPY_ALIGNED
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment