Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

EdgeVar.h
Go to the documentation of this file.
1 
34 #pragma once
35 
36 #include <ogdf/basic/Graph.h>
37 
38 #include <ogdf/external/abacus.h>
39 
40 #include <ostream>
41 
42 namespace ogdf {
43 namespace cluster_planarity {
44 
45 class EdgeVar : public abacus::Variable {
46  friend class MaxCPlanarSub;
47 
48 public:
49  enum class EdgeType { Original, Connect };
50 
51  EdgeVar(abacus::Master* master, double obj, EdgeType eType, node source, node target);
53  EdgeVar(abacus::Master* master, double obj, node source, node target);
55  EdgeVar(abacus::Master* master, double obj, double lbound, node source, node target);
56 
57  virtual ~EdgeVar();
58 
59  edge theEdge() const { return m_edge; }
60 
61  node sourceNode() const { return m_source; }
62 
63  node targetNode() const { return m_target; }
64 
65  EdgeType theEdgeType() const { return m_eType; }
66 #if 0
67  double objCoeff() const {return m_objCoeff;}
68 #endif
69 
70  virtual void printMe(std::ostream& out) {
71  out << "[Var: " << sourceNode() << "->" << targetNode() << " ("
72  << ((theEdgeType() == EdgeVar::EdgeType::Original) ? "original" : "connect")
73  << ") ZF=" << obj() << "]";
74  }
75 
76 private:
77  // The edge type of the variable
79 
80  // The corresponding nodes and edge
84 };
85 
86 }
87 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::cluster_planarity::EdgeVar::m_source
node m_source
Definition: EdgeVar.h:81
ogdf::cluster_planarity::EdgeVar::targetNode
node targetNode() const
Definition: EdgeVar.h:63
ogdf::cluster_planarity::MaxCPlanarSub
Definition: MaxCPlanarSub.h:60
abacus.h
Includes Abacus.
ogdf::cluster_planarity::EdgeVar::m_target
node m_target
Definition: EdgeVar.h:82
abacus::Variable::obj
virtual double obj() const
Returns the objective function coefficient.
Definition: variable.h:112
ogdf::cluster_planarity::EdgeVar::EdgeType
EdgeType
Definition: EdgeVar.h:49
ogdf::cluster_planarity::EdgeVar::m_edge
edge m_edge
Definition: EdgeVar.h:83
ogdf::cluster_planarity::EdgeVar::EdgeType::Connect
@ Connect
ogdf::cluster_planarity::EdgeVar::m_eType
EdgeType m_eType
Definition: EdgeVar.h:78
ogdf::cluster_planarity::EdgeVar::EdgeType::Original
@ Original
ogdf::cluster_planarity::EdgeVar::theEdge
edge theEdge() const
Definition: EdgeVar.h:59
abacus::Variable
Forms the virtual base class for all possible variables given in pool format.
Definition: variable.h:59
ogdf::cluster_planarity::EdgeVar::sourceNode
node sourceNode() const
Definition: EdgeVar.h:61
ogdf::cluster_planarity::EdgeVar::printMe
virtual void printMe(std::ostream &out)
Definition: EdgeVar.h:70
ogdf::cluster_planarity::EdgeVar::theEdgeType
EdgeType theEdgeType() const
Definition: EdgeVar.h:65
ogdf::EdgeElement
Class for the representation of edges.
Definition: Graph_d.h:363
ogdf::cluster_planarity::EdgeVar::~EdgeVar
virtual ~EdgeVar()
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::cluster_planarity::EdgeVar
Definition: EdgeVar.h:45
ogdf::cluster_planarity::EdgeVar::EdgeVar
EdgeVar(abacus::Master *master, double obj, EdgeType eType, node source, node target)
abacus::Master
The master of the optimization.
Definition: master.h:69