public EulerianPath(Graph<?> G) {
        this.hasPath = false;
        this.marked = new ListOrderedMap<>();

        int count = 0;

        for (Object x : G.getAllVertices()) if (G.getDegree(x) % 2 != 0) count++;

        if (count == 0)
            //Use Hierholzer
            this.hasPath = false;
        else if (count == 2)
            //Use Fleury
            this.hasPath = true;

        this.path = new Stack<>();

        Iterable<?> x = G.getAllVertices();

        dfs(G, x.iterator().next(), null);


/*        for (Object x : G.getAllVertices()) {

            if (!this.marked.get(x)) {
                this.path = new Stack<>();
                dfs(G, x, null);
            }
        }*/
    }