Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSimplexConstraint Struct Reference

#include <qsimplex_p.h>

+ Collaboration diagram for QSimplexConstraint:

Public Types

enum  Ratio { LessOrEqual = 0 , Equal , MoreOrEqual }
 

Public Member Functions

 QSimplexConstraint ()
 
void invert ()
 
bool isSatisfied ()
 

Public Attributes

QHash< QSimplexVariable *, qrealvariables
 
qreal constant
 
Ratio ratio
 
QPair< QSimplexVariable *, qrealhelper
 
QSimplexVariableartificial
 

Detailed Description

Representation of a LP constraint like:

(c1 * X1) + (c2 * X2) + ... = K or <= K or >= K

Where (ci, Xi) are the pairs in "variables" and K the real "constant".

Definition at line 47 of file qsimplex_p.h.

Member Enumeration Documentation

◆ Ratio

Enumerator
LessOrEqual 
Equal 
MoreOrEqual 

Definition at line 51 of file qsimplex_p.h.

Constructor & Destructor Documentation

◆ QSimplexConstraint()

QSimplexConstraint::QSimplexConstraint ( )
inline

Definition at line 49 of file qsimplex_p.h.

Member Function Documentation

◆ invert()

void QSimplexConstraint::invert ( )

Definition at line 628 of file qsimplex_p.cpp.

References QHash< Key, T >::begin(), constant, QHash< Key, T >::end(), iter, ratio, and variables.

+ Here is the call graph for this function:

◆ isSatisfied()

bool QSimplexConstraint::isSatisfied ( )
inline

Definition at line 66 of file qsimplex_p.h.

References constant, QHash< Key, T >::constBegin(), QHash< Key, T >::constEnd(), iter, LessOrEqual, MoreOrEqual, Q_ASSERT, qAbs(), qFuzzyCompare(), ratio, and variables.

+ Here is the call graph for this function:

Member Data Documentation

◆ artificial

QSimplexVariable* QSimplexConstraint::artificial

Definition at line 62 of file qsimplex_p.h.

◆ constant

qreal QSimplexConstraint::constant

◆ helper

QPair<QSimplexVariable *, qreal> QSimplexConstraint::helper

Definition at line 61 of file qsimplex_p.h.

◆ ratio

Ratio QSimplexConstraint::ratio

Definition at line 59 of file qsimplex_p.h.

Referenced by invert(), and isSatisfied().

◆ variables


The documentation for this struct was generated from the following files: