Dear Philippe,
this is because Triplet by default uses unsigned int as index type.
Is this on purpose? I would propose to set the default index type to int
or SparseMatrix<>::index_type instead.
Until that is done you can set the index type using the second template parameter, i.e. in the above test code use
typedef Eigen::Triplet<double,int> T;
instead.
Best regards,
Kolja