Customized SparseArray which allows using a iterator.