Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

optsense.h
Go to the documentation of this file.
1 
30 #pragma once
31 
33 
34 namespace abacus {
35 
36 
38 
45 public:
46 
48  enum SENSE {
49  Min,
50  Max,
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 
100 private:
101 
103 };
104 
105 
106 }
abacus::OptSense::SENSE
SENSE
The enumeration defining the sense of optimization.
Definition: optsense.h:48
abacus::operator<<
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)
abacusroot.h
abacus::OptSense
Sense of optimization.
Definition: optsense.h:44
abacus
Definition: ILPClusterPlanarity.h:50
abacus::OptSense::Max
@ Max
Maximization problem.
Definition: optsense.h:50
abacus::OptSense::sense
SENSE sense() const
Returns the sense of the optimization.
Definition: optsense.h:80
abacus::OptSense::OptSense
OptSense(SENSE s=Unknown)
Initializes the optimization sense tos.
Definition: optsense.h:58
abacus::OptSense::min
bool min() const
Returns true If it is minimization problem,, false otherwise.
Definition: optsense.h:84
abacus::OptSense::unknown
bool unknown() const
Returns true if the optimization sense is unknown,, false otherwise.
Definition: optsense.h:96
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:68
abacus::OptSense::Min
@ Min
Minimization problem.
Definition: optsense.h:49
abacus::OptSense::max
bool max() const
Returns true if it is maximization problem,, false otherwise.
Definition: optsense.h:90
abacus::OptSense::sense
void sense(SENSE s)
Sets the optimization sense to s.
Definition: optsense.h:76
abacus::OptSense::sense_
SENSE sense_
The optimization sense.
Definition: optsense.h:102
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101