Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

optsense.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 
39 
46 public:
47 
49  enum SENSE {
50  Min,
51  Max,
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 
101 private:
102 
104 };
105 
106 
107 }
108 #pragma GCC visibility pop
abacus::OptSense::SENSE
SENSE
The enumeration defining the sense of optimization.
Definition: optsense.h:49
abacus::operator<<
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)
abacusroot.h
abacus::OptSense
Sense of optimization.
Definition: optsense.h:45
abacus
Definition: ILPClusterPlanarity.h:50
abacus::OptSense::Max
@ Max
Maximization problem.
Definition: optsense.h:51
abacus::OptSense::sense
SENSE sense() const
Returns the sense of the optimization.
Definition: optsense.h:81
abacus::OptSense::OptSense
OptSense(SENSE s=Unknown)
Initializes the optimization sense tos.
Definition: optsense.h:59
abacus::OptSense::min
bool min() const
Returns true If it is minimization problem,, false otherwise.
Definition: optsense.h:85
abacus::OptSense::unknown
bool unknown() const
Returns true if the optimization sense is unknown,, false otherwise.
Definition: optsense.h:97
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:69
abacus::OptSense::Min
@ Min
Minimization problem.
Definition: optsense.h:50
abacus::OptSense::max
bool max() const
Returns true if it is maximization problem,, false otherwise.
Definition: optsense.h:91
abacus::OptSense::sense
void sense(SENSE s)
Sets the optimization sense to s.
Definition: optsense.h:77
abacus::OptSense::sense_
SENSE sense_
The optimization sense.
Definition: optsense.h:103
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