Added asserts and templated .dimension()

libeigen/eigen!2728

7 files changed