From 5965942ff51fe6533c4bf17eec63e7fe8f9f490b Mon Sep 17 00:00:00 2001
From: "juliano.souzaluz" <juliano.souza-luz@etu.hesge.ch>
Date: Wed, 18 Jan 2023 22:17:54 +0100
Subject: [PATCH] =?UTF-8?q?m=C3=A9thode=20pivot?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/Simplex.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/Simplex.java b/src/Simplex.java
index d98829f..6cc6491 100644
--- a/src/Simplex.java
+++ b/src/Simplex.java
@@ -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)) {
-- 
GitLab