Loading [MathJax]/extensions/tex2jax.js

Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
optsense.h
Go to the documentation of this file.
1
30#pragma once
31
33
34namespace abacus {
35
36
38
45public:
46
48 enum SENSE {
51 Unknown
52 };
53
55
58 OptSense(SENSE s = Unknown) : sense_(s) { }
59
61
70 friend OGDF_EXPORT std::ostream &operator<<(std::ostream& out, const OptSense &rhs);
71
73
76 void sense(SENSE s) { sense_ = s; }
77
78
80 SENSE sense() const { return sense_; }
81
82
84 bool min() const {
85 return (sense_ == Min);
86 }
87
88
90 bool max() const {
91 return (sense_ == Max);
92 }
93
94
96 bool unknown() const {
97 return (sense_ == Unknown);
98 }
99
100private:
101
103};
104
105
106}
Base class of all other classes of ABACUS.
Definition abacusroot.h:68
Sense of optimization.
Definition optsense.h:44
bool unknown() const
Returns true if the optimization sense is unknown,, false otherwise.
Definition optsense.h:96
SENSE sense() const
Returns the sense of the optimization.
Definition optsense.h:80
bool min() const
Returns true If it is minimization problem,, false otherwise.
Definition optsense.h:84
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:76
OptSense(SENSE s=Unknown)
Initializes the optimization sense tos.
Definition optsense.h:58
SENSE sense_
The optimization sense.
Definition optsense.h:102
SENSE
The enumeration defining the sense of optimization.
Definition optsense.h:48
@ Min
Minimization problem.
Definition optsense.h:49
@ Max
Maximization problem.
Definition optsense.h:50
bool max() const
Returns true if it is maximization problem,, false otherwise.
Definition optsense.h:90
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101