Added EIGEN support to template