public Graph bfs()
    {
        Util.Queue<Integer> theQueue = new Util.QueueLinkedList<Integer>();
        
        Graph search = new GraphAdjMatrix();
        ((GraphAdjMatrix)search).vertList = this.vertList;
        
        theQueue.enqueue(0);
        vertList[0].wasVisited = true;
//         vertList[0].display();
        int lastVisited=0;
        
        while( theQueue.getLength() > 0 )
        {
            int v1 = theQueue.dequeue();
            while( true )
            {
                int v2 = getAdjUnvisitedVertex( v1 );
                if(v2 == -1) 
                    break;
                else {
                    vertList[v2].wasVisited = true;
                    search.einfKante( lastVisited, v2);
                    lastVisited = v2;
//                     vertList[v2].display();
                    theQueue.enqueue(v2);
                }
            }
        }
        
        for(int i=0; i<this.nVerts; i++)
            this.vertList[i].wasVisited = false;
        
        return search;
    }