Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

lpvarstat.h
Go to the documentation of this file.
1 
30 #pragma once
31 
33 
34 namespace abacus {
35 
36 
37 class AbacusGlobal;
38 
39 
41 
51 public:
52 
54  enum STATUS {
59  Eliminated,
61  Unknown
66  };
67 
68 
70  LPVARSTAT() : status_(Unknown) { }
71 
73 
76  LPVARSTAT(STATUS status) : status_(status) { }
77 
79 
82  LPVARSTAT(LPVARSTAT *lpVarStat) :
83  status_(lpVarStat->status_)
84  { }
85 
87 
97  friend OGDF_EXPORT std::ostream &operator<<(std::ostream& out, const LPVARSTAT &rhs);
98 
100  STATUS status() const { return status_; }
101 
103 
106  void status(STATUS stat) { status_ = stat; }
107 
109 
112  void status(const LPVARSTAT *stat) { status_ = stat->status_; }
113 
115  bool atBound() const {
116  return (status_ == AtLowerBound || status_ == AtUpperBound);
117  }
118 
120  bool basic() const {
121  return (status_ == Basic);
122  }
123 
124 
125 private:
126 
129 
131 };
132 
133 }
abacus::LPVARSTAT::LPVARSTAT
LPVARSTAT()
This constructor initializes the status as Unknown.
Definition: lpvarstat.h:70
abacus::LPVARSTAT::basic
bool basic() const
Returns true If the status is Basic, false otherwise.
Definition: lpvarstat.h:120
abacus::LPVARSTAT::AtLowerBound
@ AtLowerBound
The variable is at its lower bound, but not in the basis.
Definition: lpvarstat.h:55
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:56
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:54
abacus::LPVARSTAT::status
STATUS status() const
Returns the LP-status.
Definition: lpvarstat.h:100
abacus::LPVARSTAT::status
void status(STATUS stat)
Sets the status to stat.
Definition: lpvarstat.h:106
abacus::LPVARSTAT::atBound
bool atBound() const
Returns true if the variable status is AtUpperBound or AtLowerBound, false otherwise.
Definition: lpvarstat.h:115
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:68
abacus::LPVARSTAT::status
void status(const LPVARSTAT *stat)
Sets the status to stat.
Definition: lpvarstat.h:112
abacus::LPVARSTAT::LPVARSTAT
LPVARSTAT(STATUS status)
This constructor initializes the LPVARSTAT.
Definition: lpvarstat.h:76
abacus::LPVARSTAT
status of variables.
Definition: lpvarstat.h:50
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
abacus::LPVARSTAT::AtUpperBound
@ AtUpperBound
The variable is at its upper bound , but not in the basis.
Definition: lpvarstat.h:57
abacus::LPVARSTAT::status_
STATUS status_
The LP-status.
Definition: lpvarstat.h:128
abacus::LPVARSTAT::NonBasicFree
@ NonBasicFree
The variable is unbounded and not in the basis.
Definition: lpvarstat.h:58
abacus::LPVARSTAT::LPVARSTAT
LPVARSTAT(LPVARSTAT *lpVarStat)
This constructor make a copy of *lpVarStat.
Definition: lpvarstat.h:82