#include "general.H" #include // pour fabs // ------- La classe ---------- class Simplex { public: //hash_map > a; // La matrice des contraintes //hash_map sol; // Le tableau des solutions //hash_map db; // Un tableau //hash_map hb; // un autre tableau map > a; // La matrice des contraintes map sol; // Le tableau des solutions map db; // Un tableau map hb; // un autre tableau map::iterator it; // un itérateur sur les colonnes de a. public: Simplex() {} ~Simplex(){} private: int ads_sortant(int m,int n,int phase); int ads_entrant(int n,int l); void pivotage(int m,int n,int l,int k); int affiche(int ineq1, int ineq2, int nbeq, int nbvar); public: int simplexe_dual(int ineq1, int ineq2, int eq, int n); int solve(int ineq1, int ineq2, int eq, int n, bool debug=false); };