Added HasArc function to the Graph structure