SpareMatrix data structure