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

méthode pivot

parent c90b835e
No related branches found
No related tags found
No related merge requests found
......@@ -163,12 +163,16 @@ public class Simplex {
* @return la colonne du premier négatif rencontré
*/
int getFirstNeg(Matrix mat) {
// Méthode 1 : premier négatif
/*for (int j = 0; j < mat.getCol() - 1; j++) {
if (signe(mat.getData(mat.getLine() - 1, j))) return j;
}
return -1;*/
// Méthode 2 : plus petit négatif
int id = -1;
double tmpVal = 0;
double val = 0;
/*for (int j = 0; j < mat.getCol() - 1; j++) {
if (signe(mat.getData(mat.getLine() - 1, j))) return j;
}*/
for (int j = 0; j < mat.getCol() - 1; j++) {
tmpVal = mat.getData(mat.getLine() - 1, j);
if (signe(tmpVal)) {
......
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