Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool Grafo::existenciaAresta(int a1,int a2){
- for(Vertice *v=vPri; v!=NULL; v=v->getNext())
- {
- {
- for(Aresta *a=v->getApri(); a!=NULL; a=a->getNext())
- {
- if (a->getVertice1()->getId()==a1 && a->getVertice2()->getId()==a2
- || a->getVertice2()->getId()==a1 && a->getVertice1()->getId()==a2){
- return true;
- }
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement