Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp-math
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Math
2e-annee
tp-math
Commits
30c5b718
Commit
30c5b718
authored
2 years ago
by
juliano.souzaluz
Browse files
Options
Downloads
Patches
Plain Diff
network1 ok
parent
fc94c856
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/Equation.java
+3
-3
3 additions, 3 deletions
src/Equation.java
src/Main.java
+6
-7
6 additions, 7 deletions
src/Main.java
src/Matrix.java
+30
-48
30 additions, 48 deletions
src/Matrix.java
src/Simplex.java
+60
-59
60 additions, 59 deletions
src/Simplex.java
with
99 additions
and
117 deletions
src/Equation.java
+
3
−
3
View file @
30c5b718
...
...
@@ -122,7 +122,7 @@ public class Equation {
else
this
.
rightVec
.
add
(-
res
);
// Matrice
this
.
mat
.
matrixRealloc
(
this
.
mat
.
get
X
()
+
1
,
this
.
mat
.
get
Y
());
this
.
mat
.
matrixRealloc
(
this
.
mat
.
get
Line
()
+
1
,
this
.
mat
.
get
Col
());
for
(
int
i
=
0
;
i
<
this
.
nbContraintes
;
i
++)
{
double
tmp
=
Double
.
parseDouble
(
elements
[
i
]);
this
.
mat
.
setData
(
line
,
i
,
tmp
);
...
...
@@ -167,8 +167,8 @@ public class Equation {
System
.
out
.
println
(
"Vecteur membre de droite: "
+
getRightVec
());
System
.
out
.
println
(
"Matrice Amxn:"
);
for
(
int
i
=
0
;
i
<
this
.
mat
.
get
X
();
i
++)
{
for
(
int
j
=
0
;
j
<
this
.
mat
.
get
Y
();
j
++)
{
for
(
int
i
=
0
;
i
<
this
.
mat
.
get
Line
();
i
++)
{
for
(
int
j
=
0
;
j
<
this
.
mat
.
get
Col
();
j
++)
{
if
(
this
.
mat
.
getData
(
i
,
j
)
<
0.0
)
System
.
out
.
print
(
this
.
mat
.
getData
(
i
,
j
)
+
" "
);
else
...
...
This diff is collapsed.
Click to expand it.
src/Main.java
+
6
−
7
View file @
30c5b718
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.util.Arrays
;
import
java.util.Scanner
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -43,7 +42,7 @@ public class Main {
Scanner
readFile
=
new
Scanner
(
System
.
in
);
System
.
out
.
println
(
"Entrez le nom du fichier à tester, il doit se situer dans le dossier src."
);
//String nameFile = readFile.nextLine();
String
nameFile
=
"network
1
.txt"
;
String
nameFile
=
"network
2
.txt"
;
//String nameFile = "input.txt";
File
f
=
new
File
(
"src/"
+
nameFile
);
Scanner
sc
=
new
Scanner
(
f
);
...
...
@@ -79,16 +78,16 @@ public class Main {
eq
.
printEq
();
// Tableau initial
Simplex
spx
=
new
Simplex
(
eq
.
getMat
().
get
X
(),
eq
.
getMat
().
get
X
()
+
eq
.
getMat
().
get
Y
()
+
1
,
line
,
contraintes
);
Simplex
spx
=
new
Simplex
(
eq
.
getMat
().
get
Line
(),
eq
.
getMat
().
get
Line
()
+
eq
.
getMat
().
get
Col
()
+
1
,
line
,
contraintes
);
spx
.
createSimplex
(
eq
,
contraintes
);
spx
.
printSimplex
(
spx
.
getMatEcart
(),
"Tableau initial"
,
0
);
spx
.
printSimplex
(
spx
.
getMatEcart
(),
"Tableau initial"
);
// true = phase 1 membres de droite pas admissible | false = phase 2 membres de droite admissible
if
(
spx
.
which_phase
())
{
spx
.
tabAux
(
0
);
// TODO changer ça
spx
.
tabAux
();
}
else
{
spx
.
pivot
(
spx
.
getMatEcart
());
spx
.
printSimplex
(
spx
.
getMatEcart
(),
"Résultat"
,
3
);
spx
.
pivot
(
spx
.
getMatEcart
()
,
false
);
spx
.
printSimplex
(
spx
.
getMatEcart
(),
"Résultat"
);
System
.
out
.
println
(
"Nombre de pivot: "
+
spx
.
getNbPivot
());
}
...
...
This diff is collapsed.
Click to expand it.
src/Matrix.java
+
30
−
48
View file @
30c5b718
public
class
Matrix
{
private
int
x
;
private
int
y
;
private
int
line
;
// Lignes
private
int
col
;
// Colonnes
private
double
[][]
data
;
public
int
get
X
()
{
return
x
;
public
int
get
Line
()
{
return
line
;
}
public
void
setX
(
int
x
)
{
this
.
x
=
x
;
public
int
getCol
(
)
{
return
col
;
}
public
int
getY
()
{
return
y
;
}
public
void
setY
(
int
y
)
{
this
.
y
=
y
;
}
public
double
getData
(
int
x
,
int
y
)
{
return
data
[
x
][
y
];
public
double
getData
(
int
line
,
int
col
)
{
return
data
[
line
][
col
];
}
public
double
[][]
getDatas
()
{
return
data
;
}
public
void
setData
(
int
x
,
int
y
,
double
d
)
{
this
.
data
[
x
][
y
]
=
d
;
public
void
setData
(
int
line
,
int
col
,
double
d
)
{
this
.
data
[
line
][
col
]
=
d
;
}
public
Matrix
(
int
x
,
int
y
)
{
this
.
x
=
x
;
this
.
y
=
y
;
this
.
data
=
new
double
[
x
][
y
];
public
Matrix
(
int
line
,
int
col
)
{
this
.
line
=
line
;
this
.
col
=
col
;
this
.
data
=
new
double
[
line
][
col
];
}
public
void
matrixFill
(
int
x
,
int
y
,
double
[][]
tab
)
throws
IndexOutOfBoundsException
{
for
(
int
i
=
0
;
i
<
x
;
i
++)
{
for
(
int
j
=
0
;
j
<
y
;
j
++)
{
public
void
matrixFill
(
int
line
,
int
col
,
double
[][]
tab
)
throws
IndexOutOfBoundsException
{
for
(
int
i
=
0
;
i
<
line
;
i
++)
{
for
(
int
j
=
0
;
j
<
col
;
j
++)
{
if
(
i
<
tab
.
length
&&
j
<
tab
[
i
].
length
)
this
.
data
[
i
][
j
]
=
tab
[
i
][
j
];
}
}
}
public
void
matrixInitFromArray
(
double
[]
tab
)
throws
IndexOutOfBoundsException
{
int
id
=
0
;
for
(
int
i
=
0
;
i
<
x
;
i
++)
{
for
(
int
j
=
0
;
j
<
y
;
j
++)
{
this
.
data
[
i
][
j
]
=
tab
[
id
];
id
++;
}
}
}
public
void
matrixRealloc
(
int
x
,
int
y
)
{
public
void
matrixRealloc
(
int
line
,
int
col
)
{
double
[][]
tmp
=
this
.
data
;
this
.
x
=
x
;
this
.
y
=
y
;
this
.
data
=
new
double
[
x
][
y
];
matrixFill
(
x
,
y
,
tmp
);
this
.
line
=
line
;
this
.
col
=
col
;
this
.
data
=
new
double
[
line
][
col
];
matrixFill
(
line
,
col
,
tmp
);
}
public
void
matrixPrint
(
String
s
,
int
precision
)
{
public
void
matrixPrint
(
String
s
)
{
System
.
out
.
println
();
System
.
out
.
println
(
s
+
": "
);
for
(
int
i
=
0
;
i
<
x
;
i
++)
{
for
(
int
j
=
0
;
j
<
y
;
j
++)
{
for
(
int
i
=
0
;
i
<
line
;
i
++)
{
for
(
int
j
=
0
;
j
<
col
;
j
++)
{
System
.
out
.
format
(
"%10.2f"
,
this
.
data
[
i
][
j
]);
}
System
.
out
.
println
();
...
...
@@ -91,7 +73,7 @@ public class Matrix {
System
.
out
.
format
(
"Z[%d] "
,
i
);
}
System
.
out
.
format
(
"S[%d] "
,
this
.
y
/
2
);
System
.
out
.
format
(
"S[%d] "
,
this
.
col
/
2
);
for
(
int
i
=
0
;
i
<
nbAux
;
i
++)
{
if
(
i
<
10
)
...
...
@@ -101,16 +83,16 @@ public class Matrix {
}
System
.
out
.
println
();
for
(
int
i
=
0
;
i
<
this
.
x
;
i
++)
{
if
(
i
<
this
.
x
-
2
)
for
(
int
i
=
0
;
i
<
this
.
line
;
i
++)
{
if
(
i
<
this
.
line
-
2
)
if
(
i
<
10
)
System
.
out
.
print
(
"AUX_"
+
i
+
" | "
);
else
System
.
out
.
print
(
"AUX_"
+
i
+
" | "
);
else
if
(
i
==
this
.
x
-
2
)
else
if
(
i
==
this
.
line
-
2
)
System
.
out
.
print
(
"OBJ. Init | "
);
else
System
.
out
.
print
(
"OBJ. | "
);
for
(
int
j
=
0
;
j
<
this
.
y
;
j
++)
{
for
(
int
j
=
0
;
j
<
this
.
col
;
j
++)
{
System
.
out
.
format
(
"%10.3f"
,
this
.
data
[
i
][
j
]);
}
System
.
out
.
println
();
...
...
This diff is collapsed.
Click to expand it.
src/Simplex.java
+
60
−
59
View file @
30c5b718
...
...
@@ -4,16 +4,12 @@ public class Simplex {
private
Matrix
matEcart
;
private
Matrix
tabAux
;
private
int
nbSousCondition
;
private
int
x
;
private
int
y
;
private
int
ligne
;
// Ligne
private
int
colonne
;
// Colonne
private
int
nbPivot
;
private
static
double
EPSILON
=
0
E
-
7
;
private
int
nbContraintes
;
public
Matrix
getTabAux
()
{
return
tabAux
;
}
public
Matrix
getMatEcart
()
{
return
matEcart
;
}
...
...
@@ -22,20 +18,20 @@ public class Simplex {
return
nbPivot
;
}
public
Simplex
(
int
x
,
int
y
,
int
nbSousCondition
,
int
nbContraintes
)
{
this
.
x
=
x
;
this
.
y
=
y
;
this
.
matEcart
=
new
Matrix
(
x
,
y
);
public
Simplex
(
int
ligne
,
int
colonne
,
int
nbSousCondition
,
int
nbContraintes
)
{
this
.
ligne
=
ligne
;
this
.
colonne
=
colonne
;
this
.
matEcart
=
new
Matrix
(
ligne
,
colonne
);
this
.
nbSousCondition
=
nbSousCondition
;
this
.
tabAux
=
new
Matrix
(
x
+
2
,
y
+
nbSousCondition
+
1
);
this
.
tabAux
=
new
Matrix
(
ligne
+
2
,
colonne
+
nbSousCondition
+
1
);
this
.
nbPivot
=
0
;
this
.
nbContraintes
=
nbContraintes
;
}
void
createSimplex
(
Equation
eq
,
int
nbContraintes
)
{
// Matrice Amxn
for
(
int
i
=
0
;
i
<
this
.
x
;
i
++)
{
for
(
int
j
=
0
;
j
<
this
.
y
;
j
++)
{
for
(
int
i
=
0
;
i
<
this
.
ligne
;
i
++)
{
for
(
int
j
=
0
;
j
<
this
.
colonne
;
j
++)
{
if
(
j
<
nbContraintes
)
{
this
.
matEcart
.
setData
(
i
,
j
,
eq
.
getMatAtId
(
i
,
j
));
}
else
{
...
...
@@ -45,13 +41,13 @@ public class Simplex {
}
// Membre de droite
for
(
int
i
=
0
;
i
<=
this
.
x
-
1
;
i
++)
this
.
matEcart
.
setData
(
i
,
this
.
y
-
1
,
eq
.
getRightVec
().
get
(
i
));
for
(
int
i
=
0
;
i
<=
this
.
ligne
-
1
;
i
++)
this
.
matEcart
.
setData
(
i
,
this
.
colonne
-
1
,
eq
.
getRightVec
().
get
(
i
));
// Fonction obj
this
.
matEcart
.
matrixRealloc
(
this
.
matEcart
.
get
X
()
+
1
,
this
.
matEcart
.
get
Y
());
this
.
matEcart
.
matrixRealloc
(
this
.
matEcart
.
get
Line
()
+
1
,
this
.
matEcart
.
get
Col
());
for
(
int
i
=
0
;
i
<
nbContraintes
;
i
++)
this
.
matEcart
.
setData
(
this
.
x
,
i
,
eq
.
getFuncObj
().
get
(
i
));
this
.
matEcart
.
setData
(
this
.
ligne
,
i
,
eq
.
getFuncObj
().
get
(
i
));
}
/**
...
...
@@ -60,28 +56,28 @@ public class Simplex {
* @return true = phase 1 | false = phase 2
*/
boolean
which_phase
()
{
for
(
int
i
=
0
;
i
<
this
.
x
;
i
++)
{
if
(
signe
(
this
.
matEcart
.
getData
(
i
,
this
.
y
-
1
)))
return
true
;
for
(
int
i
=
0
;
i
<
this
.
ligne
;
i
++)
{
if
(
signe
(
this
.
matEcart
.
getData
(
i
,
this
.
colonne
-
1
)))
return
true
;
}
return
false
;
}
void
tabAux
(
int
line
)
{
System
.
out
.
println
(
""
);
double
[]
tabRes
=
new
double
[
this
.
y
+
this
.
nbSousCondition
+
1
];
void
tabAux
()
{
System
.
out
.
println
();
double
[]
tabRes
=
new
double
[
this
.
colonne
+
this
.
nbSousCondition
+
1
];
Arrays
.
fill
(
tabRes
,
1.0
);
for
(
int
i
=
0
;
i
<
this
.
y
;
i
++)
{
for
(
int
j
=
0
;
j
<
this
.
x
;
j
++)
{
if
(
this
.
matEcart
.
getData
(
j
,
this
.
y
-
1
)
<
0
)
{
for
(
int
i
=
0
;
i
<
this
.
colonne
;
i
++)
{
for
(
int
j
=
0
;
j
<
this
.
ligne
;
j
++)
{
if
(
this
.
matEcart
.
getData
(
j
,
this
.
colonne
-
1
)
<
0
)
{
if
(
this
.
matEcart
.
getData
(
j
,
i
)
!=
0
)
{
this
.
matEcart
.
setData
(
j
,
i
,
-
this
.
matEcart
.
getData
(
j
,
i
));
}
}
}
}
for
(
int
j
=
0
;
j
<
this
.
y
;
j
++)
{
for
(
int
j
=
0
;
j
<
this
.
colonne
;
j
++)
{
double
tmpSum
=
0
;
for
(
int
i
=
0
;
i
<
this
.
x
;
i
++)
{
for
(
int
i
=
0
;
i
<
this
.
ligne
;
i
++)
{
tmpSum
+=
-
1
*
this
.
matEcart
.
getData
(
i
,
j
);
}
tabRes
[
j
]
=
tmpSum
;
...
...
@@ -90,88 +86,93 @@ public class Simplex {
// -2 car => tabRes[(tabRes.length-1) - (this.nbSousCondition - 1)];
tabRes
[
tabRes
.
length
-
1
]
=
tabRes
[
tabRes
.
length
-
this
.
nbSousCondition
-
2
];
tabRes
[
tabRes
.
length
-
this
.
nbSousCondition
-
2
]
=
0
;
for
(
int
i
=
0
;
i
<
this
.
tabAux
.
get
X
();
i
++)
{
for
(
int
j
=
0
;
j
<
this
.
tabAux
.
get
Y
();
j
++)
{
if
(
i
<
this
.
matEcart
.
get
X
()
&&
j
<
this
.
matEcart
.
get
Y
())
{
for
(
int
i
=
0
;
i
<
this
.
tabAux
.
get
Line
();
i
++)
{
for
(
int
j
=
0
;
j
<
this
.
tabAux
.
get
Col
();
j
++)
{
if
(
i
<
this
.
matEcart
.
get
Line
()
&&
j
<
this
.
matEcart
.
get
Col
())
{
this
.
tabAux
.
setData
(
i
,
j
,
this
.
matEcart
.
getData
(
i
,
j
));
}
else
if
(
i
==
this
.
tabAux
.
get
X
()
-
1
)
{
}
else
if
(
i
==
this
.
tabAux
.
get
Line
()
-
1
)
{
this
.
tabAux
.
setData
(
i
,
j
,
tabRes
[
j
]);
}
else
// membre de droite à la fin du tab
{
this
.
tabAux
.
setData
(
i
,
j
,
this
.
matEcart
.
getData
(
i
,
j
-
this
.
matEcart
.
get
X
()));
this
.
tabAux
.
setData
(
i
,
j
,
this
.
matEcart
.
getData
(
i
,
j
-
this
.
matEcart
.
get
Line
()));
}
}
}
this
.
tabAux
.
printTabAux
(
"Tableau auxiliaire"
,
this
.
nbContraintes
,
this
.
nbSousCondition
,
this
.
tabAux
.
get
Y
()
-
this
.
matEcart
.
get
Y
()
-
1
);
pivot
(
this
.
tabAux
);
double
solutionOptimale
=
this
.
tabAux
.
getData
(
this
.
tabAux
.
get
X
()
-
1
,
this
.
tabAux
.
get
Y
()
-
1
);
this
.
tabAux
.
printTabAux
(
"Tableau auxiliaire"
,
this
.
nbContraintes
,
this
.
nbSousCondition
,
this
.
tabAux
.
get
Col
()
-
this
.
matEcart
.
get
Col
()
-
1
);
pivot
(
this
.
tabAux
,
true
);
double
solutionOptimale
=
this
.
tabAux
.
getData
(
this
.
tabAux
.
get
Line
()
-
1
,
this
.
tabAux
.
get
Col
()
-
1
);
if
(
solutionOptimale
>
0
+
EPSILON
)
{
System
.
out
.
println
(
"Il n'y a pas de solutions admissibles pour ce problème."
);
}
if
(
Math
.
abs
(
solutionOptimale
)
<
EPSILON
||
solutionOptimale
==
0
)
{
// Il y a une solution optimale
// Il faut enlever les variables auxilaires
Matrix
res
=
new
Matrix
(
matEcart
.
get
X
(),
matEcart
.
get
Y
());
res
.
matrixFill
(
res
.
get
X
(),
res
.
get
Y
(),
tabAux
.
getDatas
());
res
.
matrixPrint
(
"Petit tableau"
,
2
);
Matrix
res
=
new
Matrix
(
matEcart
.
get
Line
(),
matEcart
.
get
Col
());
res
.
matrixFill
(
res
.
get
Line
(),
res
.
get
Col
(),
tabAux
.
getDatas
());
res
.
matrixPrint
(
"Petit tableau"
);
nbPivot
=
0
;
pivot
(
res
);
res
.
matrixPrint
(
"Résultat "
,
3
);
pivot
(
res
,
true
);
res
.
matrixPrint
(
"Résultat "
);
System
.
out
.
println
(
"Nombre de pivot : "
+
nbPivot
);
}
}
int
getFirstNeg
(
Matrix
mat
)
{
for
(
int
j
=
0
;
j
<
mat
.
get
Y
()
-
1
;
j
++)
{
if
(
signe
(
mat
.
getData
(
mat
.
get
X
()
-
1
,
j
)))
return
j
;
for
(
int
j
=
0
;
j
<
mat
.
get
Col
()
-
1
;
j
++)
{
if
(
signe
(
mat
.
getData
(
mat
.
get
Line
()
-
1
,
j
)))
return
j
;
}
return
-
1
;
}
void
pivot
(
Matrix
mat
)
{
/**
* @param mat
* @param phase true => phase 1 | false => phase 2
*/
void
pivot
(
Matrix
mat
,
boolean
phase
)
{
this
.
nbPivot
+=
1
;
int
firstNeg
=
getFirstNeg
(
mat
);
if
(
firstNeg
==
-
1
)
return
;
// si pas de négatif
boolean
has_neg
=
false
;
int
id
=
ligneSortante
(
mat
,
firstNeg
);
int
id
=
ligneSortante
(
mat
,
firstNeg
,
phase
);
double
val_pivot
=
mat
.
getData
(
id
,
firstNeg
);
for
(
int
i
=
0
;
i
<
mat
.
getY
();
i
++)
{
for
(
int
i
=
0
;
i
<
mat
.
getCol
();
i
++)
{
mat
.
setData
(
id
,
i
,
mat
.
getData
(
id
,
i
)
/
val_pivot
);
}
for
(
int
i
=
0
;
i
<
mat
.
get
X
();
i
++)
{
for
(
int
i
=
0
;
i
<
mat
.
get
Line
();
i
++)
{
val_pivot
=
mat
.
getData
(
i
,
firstNeg
);
for
(
int
j
=
0
;
j
<
mat
.
get
Y
();
j
++)
{
for
(
int
j
=
0
;
j
<
mat
.
get
Col
();
j
++)
{
if
(
i
!=
id
)
{
mat
.
setData
(
i
,
j
,
mat
.
getData
(
i
,
j
)
-
val_pivot
*
mat
.
getData
(
id
,
j
));
}
}
}
mat
.
matrixPrint
(
"Pivot numéro "
+
this
.
nbPivot
,
2
);
mat
.
matrixPrint
(
"Pivot numéro "
+
this
.
nbPivot
);
System
.
out
.
println
(
"colonne du pivot: "
+
firstNeg
);
System
.
out
.
println
(
"ligne du pivot: "
+
id
);
System
.
out
.
println
(
"Valeur du pivot: "
+
val_pivot
);
for
(
int
j
=
0
;
j
<
mat
.
get
Y
();
j
++)
if
(
signe
(
mat
.
getData
(
mat
.
get
X
()
-
1
,
j
)))
{
for
(
int
j
=
0
;
j
<
mat
.
get
Col
();
j
++)
if
(
signe
(
mat
.
getData
(
mat
.
get
Line
()
-
1
,
j
)))
{
has_neg
=
true
;
break
;
}
if
(
has_neg
)
pivot
(
mat
);
pivot
(
mat
,
phase
);
}
// TODO : A REFAIRE POUR SWITCH DE Y AU CAS OU
int
ligneSortante
(
Matrix
mat
,
int
y
)
{
int
ligneSortante
(
Matrix
mat
,
int
y
,
boolean
phase
)
{
int
depth
=
phase
?
mat
.
getLine
()
-
2
:
mat
.
getLine
()
-
1
;
int
id
=
0
;
while
(!(
mat
.
getData
(
id
,
y
)
>
0
))
{
while
(!(
mat
.
getData
(
id
,
y
)
>
0
)
&&
mat
.
getData
(
id
,
depth
)
>=
0
)
{
id
++;
}
double
tmp
=
mat
.
getData
(
id
,
mat
.
get
Y
()
-
1
)
/
mat
.
getData
(
id
,
y
);
double
tmp
=
mat
.
getData
(
id
,
mat
.
get
Col
()
-
1
)
/
mat
.
getData
(
id
,
y
);
double
tmp_s
;
for
(
int
i
=
1
;
i
<
mat
.
getX
()
-
1
;
i
++)
{
for
(
int
i
=
1
;
i
<
depth
;
i
++)
{
if
(
mat
.
getData
(
i
,
y
)
>
0
)
{
tmp_s
=
mat
.
getData
(
i
,
mat
.
get
Y
()
-
1
)
/
mat
.
getData
(
i
,
y
);
tmp_s
=
mat
.
getData
(
i
,
mat
.
get
Col
()
-
1
)
/
mat
.
getData
(
i
,
y
);
if
(
tmp_s
<
tmp
)
{
id
=
i
;
tmp
=
tmp_s
;
...
...
@@ -181,8 +182,8 @@ public class Simplex {
return
id
;
}
public
void
printSimplex
(
Matrix
mat
,
String
s
,
int
precision
)
{
mat
.
matrixPrint
(
s
,
precision
);
public
void
printSimplex
(
Matrix
mat
,
String
s
)
{
mat
.
matrixPrint
(
s
);
}
boolean
signe
(
Double
x
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment