Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
lpvarstat.h
Go to the documentation of this file.
1
30#pragma once
31
33
34#pragma GCC visibility push(default)
35namespace abacus {
36
37
38class AbacusGlobal;
39
40
42
52public:
53
55 enum STATUS {
60 Eliminated,
62 Unknown
67 };
68
69
71 LPVARSTAT() : status_(Unknown) { }
72
74
77 LPVARSTAT(STATUS status) : status_(status) { }
78
80
83 LPVARSTAT(LPVARSTAT *lpVarStat) :
84 status_(lpVarStat->status_)
85 { }
86
88
98 friend OGDF_EXPORT std::ostream &operator<<(std::ostream& out, const LPVARSTAT &rhs);
99
101 STATUS status() const { return status_; }
102
104
107 void status(STATUS stat) { status_ = stat; }
108
110
113 void status(const LPVARSTAT *stat) { status_ = stat->status_; }
114
116 bool atBound() const {
117 return (status_ == AtLowerBound || status_ == AtUpperBound);
118 }
119
121 bool basic() const {
122 return (status_ == Basic);
123 }
124
125
126private:
127
130
132};
133
134}
135#pragma GCC visibility pop
Base class of all other classes of ABACUS.
Definition abacusroot.h:69
status of variables.
Definition lpvarstat.h:51
bool atBound() const
Returns true if the variable status is AtUpperBound or AtLowerBound, false otherwise.
Definition lpvarstat.h:116
void status(STATUS stat)
Sets the status to stat.
Definition lpvarstat.h:107
STATUS
The enumeration of the statuses a variable gets from the linear program solver.
Definition lpvarstat.h:55
@ NonBasicFree
The variable is unbounded and not in the basis.
Definition lpvarstat.h:59
@ Basic
The variable is in the basis.
Definition lpvarstat.h:57
@ AtUpperBound
The variable is at its upper bound , but not in the basis.
Definition lpvarstat.h:58
@ AtLowerBound
The variable is at its lower bound, but not in the basis.
Definition lpvarstat.h:56
STATUS status_
The LP-status.
Definition lpvarstat.h:129
LPVARSTAT(STATUS status)
This constructor initializes the LPVARSTAT.
Definition lpvarstat.h:77
LPVARSTAT(LPVARSTAT *lpVarStat)
This constructor make a copy of *lpVarStat.
Definition lpvarstat.h:83
void status(const LPVARSTAT *stat)
Sets the status to stat.
Definition lpvarstat.h:113
STATUS status() const
Returns the LP-status.
Definition lpvarstat.h:101
LPVARSTAT()
This constructor initializes the status as Unknown.
Definition lpvarstat.h:71
friend std::ostream & operator<<(std::ostream &out, const LPVARSTAT &rhs)
The output operator.
bool basic() const
Returns true If the status is Basic, false otherwise.
Definition lpvarstat.h:121
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Definition memory.h:85