Skip to content
Snippets Groups Projects
Commit bff1957f authored by thibault.capt's avatar thibault.capt
Browse files

print

parent 3b7dc457
Branches
No related tags found
No related merge requests found
......@@ -81,31 +81,37 @@ public class Matrix {
System.out.println("---------------------------");
System.out.println(s);
System.out.println("---------------------------");
System.out.print("COLS: ");
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);
if (i < 10)
System.out.format("Z[%d] ", i);
else
System.out.format("Z[%d] ", i);
}
System.out.format("S[%d] ", this.y / 2);
System.out.format("S[%d] ", this.y / 2);
for (int i = 0; i < nbAux; i++) {
System.out.format("A[%d] ", i);
if (i < 10)
System.out.format("A[%d] ", i);
else
System.out.format("A[%d] ", i);
}
System.out.println();
for (int i = 0; i < this.x; i++) {
if (i < this.x - 2)
if (i < 10)
System.out.print("AUX_" + i + " | ");
System.out.print("AUX_" + i + " | ");
else
System.out.print("AUX_" + i + "| ");
System.out.print("AUX_" + i + " | ");
else if (i == this.x - 2)
System.out.print("X[0] | ");
else System.out.print("OBJ. | ");
System.out.print("OBJ. Init | ");
else System.out.print("OBJ. | ");
for (int j = 0; j < this.y; j++) {
System.out.format("%10.3f", this.data[i][j]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment