SparseMatrix template with a sample file