Fill in functions on graph class

Add parent and distance functions that return integers (no pointers to
vertices.