|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.optimization.constrained.linearprogramming.simplex.Tableau
public class Tableau
This class implements a "tableau" and its operations used in the Simplex method when solving an LP problem.
| Nested Class Summary | |
|---|---|
static class |
Tableau.Label
|
static class |
Tableau.LabelType
|
| Field Summary | |
|---|---|
double |
epsilon
a precision parameter: when a number |x| ≤ ε, it is considered 0 |
static Tableau.Label |
UNDEFINED
|
| Constructor Summary | |
|---|---|
Tableau(Matrix T,
double epsilon)
Construct a simplex tableau, assuming the standard form. |
|
Tableau(StandardLpProblem2 problem)
Construct a simplex tableau from a standard problem. |
|
Tableau(Tableau.Label[] rowLabel,
Tableau.Label[] colLabel,
Matrix T,
double epsilon)
Construct a simplex tableau. |
|
Tableau(Tableau table)
Copy ctor. |
|
| Method Summary | |
|---|---|
static DenseMatrix |
buildTable(StandardLpProblem2 problem)
phase 1: (feasible) tableau initialization |
double |
get(int row,
int col)
Get the table entry at [row, col]. |
double |
getBCol(int row)
|
Tableau.Label |
getColLabel(int i)
|
double |
getCostRow(int col)
|
Tableau.Label |
getRowLabel(int i)
|
boolean |
isFeasible()
Check if this table is feasible. |
double |
min()
Get the minimum inferred by this table. |
ImmutableVector |
minimizer()
Get the minimizer inferred by this table. |
int |
nCols()
Get the number of non-basic variables. |
int |
nRows()
Get the number of basic variables. |
int |
problemSize()
Get the number of variables in the problem, the cost/objective function. |
void |
swap(int r,
int s)
Perform a Jordan Exchange to swap row r with column s. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Tableau.Label UNDEFINED
public final double epsilon
| Constructor Detail |
|---|
public Tableau(Tableau.Label[] rowLabel,
Tableau.Label[] colLabel,
Matrix T,
double epsilon)
rowLabel - the labeling of the basic variablescolLabel - the labeling of the non-basic variablesT - the table represented in matrix formepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
public Tableau(Matrix T,
double epsilon)
T - the table represented in matrix formepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0public Tableau(StandardLpProblem2 problem)
problem - a standard linear programming problempublic Tableau(Tableau table)
table - another Tableau| Method Detail |
|---|
public int nRows()
public int nCols()
public double get(int row,
int col)
[row, col].
row - the row indexcol - the column index
T[row, col]public double getCostRow(int col)
public double getBCol(int row)
public Tableau.Label getColLabel(int i)
public Tableau.Label getRowLabel(int i)
public boolean isFeasible()
true iff the table is feasiblepublic int problemSize()
public double min()
public ImmutableVector minimizer()
public void swap(int r,
int s)
r with column s.
r - the index to the entering variable (row)s - the index to the leaving variable (column)public static DenseMatrix buildTable(StandardLpProblem2 problem)
problem - a linear programming problem
public java.lang.String toString()
toString in class java.lang.Object
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||