Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

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,
52  };
53 
55 
58  OptSense(SENSE s = Unknown) : sense_(s) { }
59 
61 
70  friend OGDF_EXPORT ostream &operator<<(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 } //namespace abacus
SENSE sense_
The optimization sense.
Definition: optsense.h:102
Base class of all other classes of ABACUS.
Definition: abacusroot.h:64
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
void sense(SENSE s)
Sets the optimization sense to s.
Definition: optsense.h:76
Minimization problem.
Definition: optsense.h:49
bool max() const
Returns true if it is maximization problem,, false otherwise.
Definition: optsense.h:90
Sense of optimization.
Definition: optsense.h:44
OptSense(SENSE s=Unknown)
Initializes the optimization sense tos.
Definition: optsense.h:58
ostream & operator<<(ostream &out, const Active< BaseType, CoType > &rhs)
SENSE
The enumeration defining the sense of optimization.
Definition: optsense.h:48
bool min() const
Returns true If it is minimization problem,, false otherwise.
Definition: optsense.h:84
SENSE sense() const
Returns the sense of the optimization.
Definition: optsense.h:80
Maximization problem.
Definition: optsense.h:50
bool unknown() const
Returns true if the optimization sense is unknown,, false otherwise.
Definition: optsense.h:96