Commit 02e96c2d authored by jcarpent's avatar jcarpent
Browse files

[Core] Register by default both MatType and Ref<MatType>

parent 0ad69ef3
/*
* Copyright (c) 2015 LAAS-CNRS
* Copyright (c) 2015-2018 LAAS-CNRS
*
* This file is part of eigenpy.
* eigenpy is free software: you can redistribute it and/or
......@@ -22,17 +22,18 @@ namespace eigenpy
/* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance. */
void enableEigenPy()
{
using namespace Eigen;
Exception::registerException();
enableEigenPySpecific<Eigen::MatrixXd>();
enableEigenPySpecific<Eigen::Matrix2d>();
enableEigenPySpecific<Eigen::Matrix3d>();
enableEigenPySpecific<Eigen::Matrix4d>();
enableEigenPySpecific<Eigen::VectorXd>();
enableEigenPySpecific<Eigen::Vector2d>();
enableEigenPySpecific<Eigen::Vector3d>();
enableEigenPySpecific<Eigen::Vector4d>();
ENABLE_SPECIFIC_MATRIX_TYPE(MatrixXd);
ENABLE_SPECIFIC_MATRIX_TYPE(Matrix2d);
ENABLE_SPECIFIC_MATRIX_TYPE(Matrix3d);
ENABLE_SPECIFIC_MATRIX_TYPE(Matrix4d);
ENABLE_SPECIFIC_MATRIX_TYPE(VectorXd);
ENABLE_SPECIFIC_MATRIX_TYPE(Vector2d);
ENABLE_SPECIFIC_MATRIX_TYPE(Vector3d);
ENABLE_SPECIFIC_MATRIX_TYPE(Vector4d);
}
} // namespace eigenpy
......@@ -18,15 +18,18 @@
#define __eigenpy_eigenpy_hpp__
#include "eigenpy/fwd.hpp"
#include "eigenpy/memory.hpp"
#include "eigenpy/deprecated.hh"
#include "eigenpy/ref.hpp"
#define ENABLE_SPECIFIC_MATRIX_TYPE(TYPE) \
enableEigenPySpecific<TYPE>(); \
enableEigenPySpecific< eigenpy::Ref<TYPE> >();
namespace eigenpy
{
/* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance. */
void enableEigenPy();
template<typename MatType>
void enableEigenPySpecific();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment