Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Module.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/basic.h>
35 
36 namespace ogdf {
37 
38 
48 public:
50  enum class ReturnType {
51  Feasible,
52  Optimal,
53  NoFeasibleSolution,
54  TimeoutFeasible,
55  TimeoutInfeasible,
56  Error
57  };
58 
60  Module() { }
61 
62  virtual ~Module() { }
63 
65  static bool isSolution(ReturnType ret) {
66  return ret == ReturnType::Feasible || ret == ReturnType::Optimal
67  || ret == ReturnType::TimeoutFeasible;
68  }
69 };
70 
71 OGDF_EXPORT std::ostream& operator<<(std::ostream& os, const Module::ReturnType& r);
72 
73 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::Module::isSolution
static bool isSolution(ReturnType ret)
Returns true iff ret indicates that the module returned a feasible solution.
Definition: Module.h:65
ogdf::Module::Module
Module()
Initializes a module.
Definition: Module.h:60
r
int r[]
Definition: hierarchical-ranking.cpp:8
ogdf::Module
Base class for modules.
Definition: Module.h:47
ogdf::operator<<
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:978
ogdf::Module::~Module
virtual ~Module()
Definition: Module.h:62
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:50