Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

abacus::SlackStat Class Reference

Status of slack variables. More...

#include <ogdf/lib/abacus/slackstat.h>

+ Inheritance diagram for abacus::SlackStat:

Public Types

enum  STATUS { Basic, NonBasicZero, NonBasicNonZero, Unknown }
 The different statuses of a slack variable. More...
 

Public Member Functions

 SlackStat ()
 Initializes the status to Unknown. More...
 
 SlackStat (STATUS status)
 Initializes the status to status. More...
 
STATUS status () const
 Returns the status of the slack variable. More...
 
void status (const SlackStat *stat)
 Sets the status to the status of stat. More...
 
void status (STATUS stat)
 Sets the status of the slack variable to stat. More...
 
- Public Member Functions inherited from abacus::AbacusRoot
virtual ~AbacusRoot ()
 The destructor. More...
 

Private Attributes

STATUS status_
 The status of the slack variable. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const SlackStat &rhs)
 Output operator for slack statuses. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from abacus::AbacusRoot
static bool ascii2bool (const string &str)
 Converts the string str to a boolean value. More...
 
static bool endsWith (const string &str, const string &end)
 Returns true if str ends with end, false otherwise. More...
 
static double fracPart (double x)
 Returns the absolute value of the fractional part of x. More...
 
static const char * onOff (bool value)
 Converts a boolean variable to the strings "on" and "off". More...
 

Detailed Description

Status of slack variables.

As for the structural variables the simplex method also assigns a unique status to each slack variable. A slack variable can be a basic or a nonbasic variable. If it is a nonbasic variable, then we distinguish if the slack variable has value zero or nonzero.

Definition at line 47 of file slackstat.h.

Member Enumeration Documentation

◆ STATUS

The different statuses of a slack variable.

Enumerator
Basic 

The slack variable belongs to the basis.

NonBasicZero 

The slack variable does not belong to the basis and has value zero.

NonBasicNonZero 

The slack variable does not belong to the basis and has a nonzero value.

Unknown 

The status of the slack variable is not known since no linear program with the corresponding constraint has been solved.

Definition at line 51 of file slackstat.h.

Constructor & Destructor Documentation

◆ SlackStat() [1/2]

abacus::SlackStat::SlackStat ( )
inline

Initializes the status to Unknown.

Definition at line 64 of file slackstat.h.

◆ SlackStat() [2/2]

abacus::SlackStat::SlackStat ( STATUS  status)
inline

Initializes the status to status.

Parameters
statusThe slack variable receives the status status.

Definition at line 70 of file slackstat.h.

Member Function Documentation

◆ status() [1/3]

STATUS abacus::SlackStat::status ( ) const
inline

Returns the status of the slack variable.

Definition at line 86 of file slackstat.h.

◆ status() [2/3]

void abacus::SlackStat::status ( const SlackStat stat)
inline

Sets the status to the status of stat.

Parameters
statThe status of the slack variable is set to *stat.

Definition at line 100 of file slackstat.h.

◆ status() [3/3]

void abacus::SlackStat::status ( STATUS  stat)
inline

Sets the status of the slack variable to stat.

Parameters
statThe new status of the slack variable.

Definition at line 93 of file slackstat.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const SlackStat rhs 
)
friend

Output operator for slack statuses.

The output operator writes the status to an output stream in the format Basic, NonBasicZero, NonBasicNonZero, or Unknown.

Parameters
outThe output stream.
rhsThe status being output.
Returns
A reference to the output stream.

Member Data Documentation

◆ status_

STATUS abacus::SlackStat::status_
private

The status of the slack variable.

Definition at line 105 of file slackstat.h.


The documentation for this class was generated from the following file: