Skip to content
Snippets Groups Projects
Commit ba5c0da6 authored by MTlls's avatar MTlls
Browse files

add: corrigido C(v)+(tipo_v + C(w)) para C(v) + tipo_v (C(w))

parent 34dd3a80
No related branches found
No related tags found
No related merge requests found
...@@ -318,12 +318,12 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) { ...@@ -318,12 +318,12 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) {
break; break;
case 'b': case 'b':
// Concatena "2" com o código da vizinhança de saída // Concatena "2" com o código da vizinhança de saída
temp += "(2"; temp += "2(";
temp += v->out_neighbors.vertices.begin()->get()->code + ")"; temp += v->out_neighbors.vertices.begin()->get()->code + ")";
break; break;
case 'c': { case 'c': {
// Concatena "3" com o código dos vizinhos // Concatena "3" com o código dos vizinhos
temp += "(3"; temp += "3(";
Vertex* aux1 = v->out_neighbors.vertices.begin()->get(); Vertex* aux1 = v->out_neighbors.vertices.begin()->get();
Vertex* aux2 = next(v->out_neighbors.vertices.begin())->get(); Vertex* aux2 = next(v->out_neighbors.vertices.begin())->get();
if(aux1->out_neighbors.vertices.begin()->get() == aux2) { if(aux1->out_neighbors.vertices.begin()->get() == aux2) {
...@@ -336,7 +336,7 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) { ...@@ -336,7 +336,7 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) {
} }
case 'd': { case 'd': {
// Concatena "6" com os códigos em ordem lexicográfica + os de distancia 2 // Concatena "6" com os códigos em ordem lexicográfica + os de distancia 2
temp += "(6"; temp += "6(";
// ordena os vizinhos de v // ordena os vizinhos de v
sort(v->out_neighbors.vertices.begin(), v->out_neighbors.vertices.end(), lex); sort(v->out_neighbors.vertices.begin(), v->out_neighbors.vertices.end(), lex);
...@@ -353,7 +353,7 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) { ...@@ -353,7 +353,7 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) {
// Concatena p+4 com os códigos dos vizinhos em ordem lexicográfica, sendo p a quantidade de vizinhos de saída // Concatena p+4 com os códigos dos vizinhos em ordem lexicográfica, sendo p a quantidade de vizinhos de saída
} }
case 'e': { case 'e': {
temp += "(" + to_string(v->out_degree + 4); temp += to_string(v->out_degree + 4) + "(";
sort(v->out_neighbors.vertices.begin(), v->out_neighbors.vertices.end(), lex); sort(v->out_neighbors.vertices.begin(), v->out_neighbors.vertices.end(), lex);
...@@ -370,7 +370,7 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) { ...@@ -370,7 +370,7 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) {
} }
case 'f': { case 'f': {
// Concatena "4" // Concatena "4"
temp += "(4"; temp += "4(";
Vertex* entrada1 = v->out_neighbors.vertices.begin()->get(); Vertex* entrada1 = v->out_neighbors.vertices.begin()->get();
Vertex* entrada2 = next(v->out_neighbors.vertices.begin())->get(); Vertex* entrada2 = next(v->out_neighbors.vertices.begin())->get();
...@@ -392,7 +392,7 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) { ...@@ -392,7 +392,7 @@ string DjikstraIsomorphism(vector<shared_ptr<Vertex>>& vertices) {
} }
case 'g': { case 'g': {
// Concatena "5" // Concatena "5"
temp += "(5"; temp += "5(";
// concatena a vizinhanca de saida // concatena a vizinhanca de saida
temp += "("; temp += "(";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment