56 #include <QtCore/qhash.h> 57 #include <QtCore/qpair.h> 101 qreal leftHandSide(0);
110 if ((leftHandSide == constant) ||
qAbs(leftHandSide - constant) < 0.0000001)
115 return leftHandSide < constant;
117 return leftHandSide > constant;
165 qreal valueAt(
int row,
int column);
166 void setValueAt(
int row,
int column,
qreal value);
167 void clearRow(
int rowIndex);
168 void clearColumns(
int first,
int last);
169 void combineRows(
int toIndex,
int fromIndex,
qreal factor);
173 int findPivotColumn();
174 int pivotRowForColumn(
int column);
175 void reducedRowEchelon();
179 void clearDataStructures();
180 void solveMaxHelper();
183 void collectResults();
198 return matrix[rowIndex * columns + columnIndex];
203 matrix[rowIndex * columns + columnIndex] = value;
208 #endif // QSIMPLEX_P_H
QIntegerForSizeof< void * >::Unsigned quintptr
#define QT_END_NAMESPACE
This macro expands to.
static QString fromAscii(const char *, int size=-1)
Returns a QString initialized with the first size characters from the string str. ...
QPair< QSimplexVariable *, qreal > helper
QSimplexVariable * artificial
QList< QSimplexConstraint * > constraints
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
The QString class provides a Unicode character string.
Q_DECL_CONSTEXPR T qAbs(const T &t)
QSimplexConstraint * objective
QHash< QSimplexVariable *, qreal > variables
const T value(const Key &key) const
Returns the value associated with the key.
#define QT_BEGIN_NAMESPACE
This macro expands to.
qreal valueAt(int row, int column)
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the hash.
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the hash...
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
const Key key(const T &value) const
Returns the first key mapped to value.
QList< QSimplexVariable * > variables
void setValueAt(int row, int column, qreal value)
The QSimplex class is a Linear Programming problem solver based on the two-phase simplex method...
The QList class is a template class that provides lists.