Implementing the addition of sparse matrices