Additional helper functions in SparseRepresentation.cpp