Write a function to check whether two vertices are directly connected by an edge
Use the function interface:
int connected(Graph g, Vertex x, Vertex y);