Add NaN and Inf constant matrices

Submitted by Gael Guennebaud @ggael

Assigned to Nobody

Link to original bugzilla bug (#586)

Description

Just like we have Ones and Zero matrices, we could have NaN and Inf shortcuts. NaN is complementary to the EIGEN_INITIALIZE_MATRICES_BY_NAN option, and use cases of Inf are pretty obvious.

Regarding names, matlab has NaN(,) and Inf(,) functions, but we could go for more explicit names. In particular shouldn't we add plural "s" -> NaNs() and Infs() or Infinities()?

Blocking

#1608

Edited by Eigen Bugzilla