Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

lpvarstat.h
Go to the documentation of this file.
1 
30 #pragma once
31 
33 
34 #pragma GCC visibility push(default)
35 namespace abacus {
36 
37 
38 class AbacusGlobal;
39 
40 
42 
52 public:
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 
126 private:
127 
130 
132 };
133 
134 }
135 #pragma GCC visibility pop
abacus::LPVARSTAT::LPVARSTAT
LPVARSTAT()
This constructor initializes the status as Unknown.
Definition: lpvarstat.h:71
abacus::LPVARSTAT::basic
bool basic() const
Returns true If the status is Basic, false otherwise.
Definition: lpvarstat.h:121
abacus::LPVARSTAT::AtLowerBound
@ AtLowerBound
The variable is at its lower bound, but not in the basis.
Definition: lpvarstat.h:56
abacus::operator<<
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)
abacusroot.h
abacus::LPVARSTAT::Basic
@ Basic
The variable is in the basis.
Definition: lpvarstat.h:57
abacus
Definition: ILPClusterPlanarity.h:50
abacus::LPVARSTAT::STATUS
STATUS
The enumeration of the statuses a variable gets from the linear program solver.
Definition: lpvarstat.h:55
abacus::LPVARSTAT::status
STATUS status() const
Returns the LP-status.
Definition: lpvarstat.h:101
abacus::LPVARSTAT::status
void status(STATUS stat)
Sets the status to stat.
Definition: lpvarstat.h:107
abacus::LPVARSTAT::atBound
bool atBound() const
Returns true if the variable status is AtUpperBound or AtLowerBound, false otherwise.
Definition: lpvarstat.h:116
OGDF_NEW_DELETE
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Definition: memory.h:85
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:69
abacus::LPVARSTAT::status
void status(const LPVARSTAT *stat)
Sets the status to stat.
Definition: lpvarstat.h:113
abacus::LPVARSTAT::LPVARSTAT
LPVARSTAT(STATUS status)
This constructor initializes the LPVARSTAT.
Definition: lpvarstat.h:77
abacus::LPVARSTAT
status of variables.
Definition: lpvarstat.h:51
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition: config.h:117
abacus::LPVARSTAT::AtUpperBound
@ AtUpperBound
The variable is at its upper bound , but not in the basis.
Definition: lpvarstat.h:58
abacus::LPVARSTAT::status_
STATUS status_
The LP-status.
Definition: lpvarstat.h:129
abacus::LPVARSTAT::NonBasicFree
@ NonBasicFree
The variable is unbounded and not in the basis.
Definition: lpvarstat.h:59
abacus::LPVARSTAT::LPVARSTAT
LPVARSTAT(LPVARSTAT *lpVarStat)
This constructor make a copy of *lpVarStat.
Definition: lpvarstat.h:83