/** * The Euler class contains static methods to find Eulerian circuits in Graph objects. * This class cannot be instantiated. *
THIS CLASS SHOULD BE MODIFIED * @author Sophie Quigley * @author PUT YOUR NAMES HERE * */ public class Euler { /** * Stops class from being instantiated. */ private Euler() {} /** * graph for which a Eulerian circuit is sought */ private static Graph g = null; /** * Total number of vertices in graph */ private static int totalV; /** * Total number of edges in graph */ private static int totalE; /** * Eulerian circuit being built */ private static Walk result = null; /** * Finds a Eulerian circuit in graph if there is one. *
DO NOT MODIFY THE METHOD SIGNATURE AND RETURN TYPE OF THIS METHOD * @param graph graph for which a Eulerian circuit is sought * @return A Eulerian circuit for the graph if there is one, or null otherwise. */ public static Walk findEuler(Graph graph) { } /** * Finds a Eulerian circuit in graph if there is one. * @param vertex current vertex in the circuit * @param totalvisited total number of edges visited so far in the graph * @return true if a circuit path for the graph has been found * starting at the current vertex and returning to the first vertex in the walk */ private static boolean buildEuler(int vertex, int totalvisited) { return false; } }