Determine Eigen version with grep

Alec Jacobson

August 16, 2013

weblog/

Here's a small bash one-liner to determine the version of Eigen you have install with macports:
grep "#define EIGEN_[^_]*_VERSION" /usr/local/include/eigen3/Eigen/src/Core/util/Macros.h
Issuing this you should see something like:

#define EIGEN_WORLD_VERSION 3
#define EIGEN_MAJOR_VERSION 1
#define EIGEN_MINOR_VERSION 2
which would mean you're using version 3.1.2.