Magnum::EigenIntegration namespace new in 2019.10

Integration with Eigen.

Contents

Conversion of math types from and to the Eigen library.

This library depends on the Eigen library and is built if WITH_EIGEN is enabled when building Magnum Integration. To use this library with CMake, you need to request the Eigen component of the MagnumIntegration package and link to the MagnumIntegration::Eigen target:

find_package(MagnumIntegration REQUIRED Eigen)

# ...
target_link_libraries(your-app MagnumIntegration::Eigen)

The integration routines are provided in the Magnum/EigenIntegration/Integration.h and Magnum/EigenIntegration/GeometryIntegration.h headers, see their documentation for more information. See also Downloading and building integration libraries and Integration library usage with CMake.

Functions

template<class To, class T>
auto cast(const Math::Quaternion<T>& from) -> To new in 2019.10
Convert a Magnum type to Eigen type.
template<class To, std::size_t cols, std::size_t rows, class T>
auto cast(const Math::RectangularMatrix<cols, rows, T>& from) -> To new in 2019.10
Convert a Magnum type to Eigen type.
template<class To, std::size_t size>
auto cast(const Math::BoolVector<size>& from) -> To new in 2019.10
template<class To, std::size_t size, class T>
auto cast(const Math::Vector<size, T>& from) -> To new in 2019.10

Function documentation

template<class To, class T>
To Magnum::EigenIntegration::cast(const Math::Quaternion<T>& from) new in 2019.10

Convert a Magnum type to Eigen type.

Provided only for consistency with cast(const Math::RectangularMatrix<cols, rows, T>&), cast(const Math::BoolVector<size>&) and cast(const Math::Vector<size, T>&) — conversion from Math::Quaternion to Eigen::Quaternion<T> can be done directly via an explicit conversion, unlike with matrices and vectors there's no need for a helper function.

template<class To, std::size_t cols, std::size_t rows, class T>
To Magnum::EigenIntegration::cast(const Math::RectangularMatrix<cols, rows, T>& from) new in 2019.10

Convert a Magnum type to Eigen type.

Due to the design of Eigen::Array and Eigen::Matrix classes, it's not possible to use the usual explicit conversion approach. See Magnum/EigenIntegration/Integration.h for more information.

template<class To, std::size_t size>
To Magnum::EigenIntegration::cast(const Math::BoolVector<size>& from) new in 2019.10

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class To, std::size_t size, class T>
To Magnum::EigenIntegration::cast(const Math::Vector<size, T>& from) new in 2019.10

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.