125126127128129130131132
throws CycleException { CycleDetector cd = new CycleDetector( graph ); if ( cd.hasCycle() ) { throw new CycleException( "Cycle detected in Graph." ); } }
142143144145146147148149
Vertex end ) throws GraphException { if ( graph.hasConnection( end, start ) ) { throw new CycleException( "Introducing edge will cause a Cycle." ); } }