diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-10-29 13:13:10 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-10-29 13:13:10 +0000 |
commit | 4f2818108e5f0b295e91381b730691fcdfb3516e (patch) | |
tree | 2f6956915fe52ae931341180a23074d4e23455fd /include/simplex.h | |
parent | ef40b73392888b1bac5ab06ba3130290c3e89956 (diff) | |
download | Simplex-4f2818108e5f0b295e91381b730691fcdfb3516e.tar.gz Simplex-4f2818108e5f0b295e91381b730691fcdfb3516e.zip |
Working prototype of simplex
Diffstat (limited to 'include/simplex.h')
-rw-r--r-- | include/simplex.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/simplex.h b/include/simplex.h index e69de29..22bf1e3 100644 --- a/include/simplex.h +++ b/include/simplex.h @@ -0,0 +1,28 @@ +#ifndef SIMPLEX_H +#define SIMPLEX_H + +#include <vector> + +typedef std::vector<std::vector<double>> BasicRep; + +class Simplex +{ +public: + Simplex(int m, int n); + Simplex(BasicRep basic_rep); + + void initialize(BasicRep basic_rep); + void solve(); + double getMin() const; +private: + BasicRep basic_rep_; + + bool isDone() const; + int inputBasicVar() const; + int outputBasicVar(int column) const; + void rotate(int input, int output); +}; + +extern void printBR(const BasicRep &basic_rep); + +#endif |