Skip to content

Instantly share code, notes, and snippets.

@oppahero
Last active April 1, 2018 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oppahero/f437550664e7f4506c57463b8d180abb to your computer and use it in GitHub Desktop.
Save oppahero/f437550664e7f4506c57463b8d180abb to your computer and use it in GitHub Desktop.
Algoritmo principal
//Método de la clase TrianguloE. Realiza la composición de las permutaciones recibidas y la retorna
public Permutacion operarPermutaciones(Permutacion p1, Permutacion p2){
int pos1,pos2,pos3;
pos1 = p2.devuelveVert(p1.devuelveVert(1));
pos2 = p2.devuelveVert(p1.devuelveVert(2));
pos3 = p2.devuelveVert(p1.devuelveVert(3));
Permutacion aux;
aux = new Permutacion (pos1,pos2,pos3);
asignaNombre(aux);
return aux;
}
//Método de la clase Permutacion
public int devuelveVert(int base){
return matriz[1][base-1];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment