Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
optsense.h
Go to the documentation of this file.
1
30#pragma once
31
33
34#pragma GCC visibility push(default)
35namespace abacus {
36
37
39
46public:
47
49 enum SENSE {
52 Unknown
53 };
54
56
59 OptSense(SENSE s = Unknown) : sense_(s) { }
60
62
71 friend OGDF_EXPORT std::ostream &operator<<(std::ostream& out, const OptSense &rhs);
72
74
77 void sense(SENSE s) { sense_ = s; }
78
79
81 SENSE sense() const { return sense_; }
82
83
85 bool min() const {
86 return (sense_ == Min);
87 }
88
89
91 bool max() const {
92 return (sense_ == Max);
93 }
94
95
97 bool unknown() const {
98 return (sense_ == Unknown);
99 }
100
101private:
102
104};
105
106
107}
108#pragma GCC visibility pop
Base class of all other classes of ABACUS.
Definition abacusroot.h:69
Sense of optimization.
Definition optsense.h:45
bool unknown() const
Returns true if the optimization sense is unknown,, false otherwise.
Definition optsense.h:97
SENSE sense() const
Returns the sense of the optimization.
Definition optsense.h:81
bool min() const
Returns true If it is minimization problem,, false otherwise.
Definition optsense.h:85
friend std::ostream & operator<<(std::ostream &out, const OptSense &rhs)
Output operator for optimization senses.
void sense(SENSE s)
Sets the optimization sense to s.
Definition optsense.h:77
OptSense(SENSE s=Unknown)
Initializes the optimization sense tos.
Definition optsense.h:59
SENSE sense_
The optimization sense.
Definition optsense.h:103
SENSE
The enumeration defining the sense of optimization.
Definition optsense.h:49
@ Min
Minimization problem.
Definition optsense.h:50
@ Max
Maximization problem.
Definition optsense.h:51
bool max() const
Returns true if it is maximization problem,, false otherwise.
Definition optsense.h:91
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117