Update sparsegraphgen.cpp

Added display function.