SHARE
TWEET

Untitled

a guest Nov 18th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void carreterasFloyd(Grafo *&grafo, ifstream &fileIn){
  2.     string datos[2];
  3.     int i,j,k,nodos,num;
  4.     vector<vector<float>> C;
  5.     vector<vector<int>> P;
  6.     nodos = grafo->getNumeroNodos();
  7.     C.resize(nodos);
  8.     P.resize(nodos);
  9.     for(i=0;i<nodos;i++){
  10.         C[i].resize(nodos);
  11.         P[i].resize(nodos);
  12.     }
  13.     grafo->Floyd(C,P);
  14.  
  15.     getline(fileIn, datos[0]); // ESte dato me aparece en blanco
  16.     num = atoi(datos[0].c_str());
  17.     cout << "aaaa" << endl;
  18.     for(k=0;k<num;k++){
  19.         cout << "aaaa" << endl;
  20.         getline(fileIn,datos[0],' ');
  21.         getline(fileIn,datos[1]);
  22.         i = grafo->getNumVertice(datos[0]);
  23.         j = grafo->getNumVertice(datos[1]);
  24.         grafo->caminoFloyd(i,j,P,C);
  25.     }
  26.  
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top