Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

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 {
49 public:
51  enum class ReturnType {
52  Feasible,
53  Optimal,
54  NoFeasibleSolution,
55  TimeoutFeasible,
56  TimeoutInfeasible,
57  Error
58  };
59 
61  Module() { }
62 
63  virtual ~Module() { }
64 
66  static bool isSolution(ReturnType ret) {
67  return ret == ReturnType::Feasible || ret == ReturnType::Optimal || 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:66
ogdf::Module::Module
Module()
Initializes a module.
Definition: Module.h:61
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:949
ogdf::Module::~Module
virtual ~Module()
Definition: Module.h:63
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:99
ogdf::Module::ReturnType
ReturnType
The return type of a module.
Definition: Module.h:51