public void addEdge(Vertex v, Vertex w) {
        if (!adjMap.containsKey(v)) {
            adjMap.put(v, new HashBag<Vertex>());
        }
        if (!adjMap.containsKey(w)) {
            adjMap.put(w, new HashBag<Vertex>());
        }
        adjMap.get(v).add(w);
    }