Graph *GraphGenerator::copyGraph(Graph *graph){ queue queue; set nodSet; set edgSet; node *nod = new node; node *n = nod; queue.push(graph->getInitialNode()); while(!queue.empty()){ node* orgnod = queue.front(); queue.pop(); for(int i = 0; i < orgnod->getEdgeOutList().size(); i++){ if(edgSet.find(orgnod->getEdgeOutList()[i]) != edgSet.end()){ //check for node,push //create one //set as copy //add to set }//else //get node copy, push //create edge //add to set } }