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

print

parent bff1957f
No related branches found
No related tags found
No related merge requests found
......@@ -67,13 +67,9 @@ public class Matrix {
public void matrixPrint(String s, int precision) {
System.out.println(s + ": ");
for (int i = 0; i < x; i++) {
System.out.print("[");
for (int j = 0; j < y; j++) {
System.out.printf(this.data[i][j] < 0.0 ?
String.format("%." + precision + "f ", this.data[i][j]) :
String.format(" %." + precision + "f ", this.data[i][j]));
System.out.format("%8.2f", this.data[i][j]);
}
System.out.println("]");
}
}
......
......@@ -68,7 +68,6 @@ public class Simplex {
}
void tabAux(int line) {
// TODO : A REVOIR CETTE PARTIE
double[] tabRes = new double[this.y + this.nbSousCondition + 1];
Arrays.fill(tabRes, 1.0);
for (int j = 0; j < this.y; j++) {
......@@ -78,15 +77,11 @@ public class Simplex {
}
double tmpSum = 0;
for (int i = 0; i < this.x; i++) {
//tabRes[j] -= Math.abs(this.matEcart.getData(i, j));
tmpSum += -1 * this.matEcart.getData(i, j);
//tabRes[j] -= this.matEcart.getData(i, j);
}
tabRes[j] = tmpSum;
System.out.print(tmpSum + " ");
}
System.out.println();
// FIN DU TODO
// -2 car => tabRes[(tabRes.length-1) - (this.nbSousCondition - 1)];
tabRes[tabRes.length - 1] = tabRes[tabRes.length - this.nbSousCondition - 2];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment