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

Changes by julianosl

parent 526c17c8
No related branches found
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ public class Main { ...@@ -43,7 +43,7 @@ public class Main {
Scanner readFile = new Scanner(System.in); Scanner readFile = new Scanner(System.in);
System.out.println("Entrez le nom du fichier à tester, il doit se situer dans le dossier src."); System.out.println("Entrez le nom du fichier à tester, il doit se situer dans le dossier src.");
//String nameFile = readFile.nextLine(); //String nameFile = readFile.nextLine();
String nameFile = "network1.txt"; String nameFile = "inputNonAdmissible.txt";
//String nameFile = "inputNonAdmissible.txt"; //String nameFile = "inputNonAdmissible.txt";
File f = new File("src/" + nameFile); File f = new File("src/" + nameFile);
Scanner sc = new Scanner(f); Scanner sc = new Scanner(f);
......
...@@ -118,7 +118,7 @@ public class Simplex { ...@@ -118,7 +118,7 @@ public class Simplex {
} }
int getFirstNeg(Matrix mat) { int getFirstNeg(Matrix mat) {
for (int j = 0; j < mat.getY(); j++) { for (int j = 0; j < mat.getY() - 1; j++) {
if (signe(mat.getData(mat.getX() - 1, j))) return j; if (signe(mat.getData(mat.getX() - 1, j))) return j;
} }
return -1; return -1;
...@@ -146,9 +146,7 @@ public class Simplex { ...@@ -146,9 +146,7 @@ public class Simplex {
for (int j = 0; j < mat.getY(); j++) for (int j = 0; j < mat.getY(); j++)
if (signe(mat.getData(mat.getX() - 1, j))) { if (signe(mat.getData(mat.getX() - 1, j))) {
has_neg = true; has_neg = true;
if (has_neg) { break;
break;
}
} }
if (has_neg) if (has_neg)
pivot(mat); pivot(mat);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment