Open m-rest opened 8 years ago
Use a wrapper and a type definition to externalize the use of Armadillo like:
#ifdef ARMADILLO_WRAPPE template <typename PrecisionType> using Matrix = arma::Mat<PrecisionType>; ... #elif EIGEN_WRAPPER template <typename PrecisionType> using Matrix = eigen::Matrix<PrecisionType, eigen::Dynamic, eigen::Dynamic>; ... #endif } // namespace wdf
http://en.cppreference.com/w/cpp/language/type_alias for more information
If someone have better idea or more clean/powerful way to do a wrapper (and possibly avoid macro) let me know.
Use a wrapper and a type definition to externalize the use of Armadillo like: