Use eigen for small vectors and matrices.
Remove Eigen::RowMajor in matrices.