Speedup in sparse matrix wrapper
Created by: gcarleo
The way the Eigen sparse matrix was constructed was very inefficient, because it involved accessing a map every time a new element was inserted in the sparse matrix. Using triplets substantially speeds up the matrix construction (maybe a couple of orders of magnitude faster on large systems).