Skip to content
Snippets Groups Projects
Commit 8fdd310f authored by juliano.souzaluz's avatar juliano.souzaluz
Browse files

add printabaux

parent ee9a627b
No related branches found
No related tags found
No related merge requests found
......@@ -76,4 +76,39 @@ public class Matrix {
System.out.println("]");
}
}
public void printTabAux(String s, int nbX, int nbZ, int nbAux) {
System.out.println("---------------------------");
System.out.println(s);
System.out.println("---------------------------");
System.out.print("COLS: ");
for (int i = 0; i < nbX; i++) {
System.out.format("X[%d] ", i);
}
for (int i = 0; i < nbZ; i++) {
System.out.format("Z[%d] ", i);
}
System.out.format("S[%d] ", this.y/2);
for (int i = 0; i < nbAux; i++) {
System.out.format("A[%d] ", i);
}
System.out.println();
for (int i = 0; i < this.x; i++) {
if(i < this.x - 2)
System.out.print("AUX_" + i);
else if(i == this.x - 2)
System.out.print("X[0] ");
else System.out.print("OBJ. ");
System.out.print( " | ");
for (int j = 0; j < this.y; j++) {
System.out.format("%10.3f", this.data[i][j]);
}
System.out.println();
}
System.out.print("");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment