Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

EdgeVar.h
Go to the documentation of this file.
1 
34 #pragma once
35 
36 #include <ogdf/basic/Graph_d.h>
37 #include <ogdf/basic/Logger.h>
39 
40 namespace ogdf {
41 namespace cluster_planarity {
42 
43 class EdgeVar : public abacus::Variable {
44  friend class MaxCPlanarSub;
45 public:
46  enum class EdgeType {Original, Connect};
47 
48  EdgeVar(abacus::Master *master, double obj, EdgeType eType, node source, node target);
50  EdgeVar(abacus::Master *master, double obj, node source, node target);
52  EdgeVar(abacus::Master *master, double obj, double lbound, node source, node target);
53 
54  virtual ~EdgeVar();
55 
56  edge theEdge() const {return m_edge;}
57  node sourceNode() const {return m_source;}
58  node targetNode() const {return m_target;}
59  EdgeType theEdgeType() const {return m_eType;}
60 #if 0
61  double objCoeff() const {return m_objCoeff;}
62 #endif
63 
64  virtual void printMe(std::ostream& out) {
65  out << "[Var: " << sourceNode() << "->" << targetNode() << " (" << ((theEdgeType()==EdgeVar::EdgeType::Original)?"original":"connect") << ") ZF=" << obj() << "]";
66  }
67 
68 private:
69  // The edge type of the variable
71 
72  // The corresponding nodes and edge
76 };
77 
78 }
79 }
virtual double obj() const
Returns the objective function coefficient.
Definition: variable.h:112
EdgeType theEdgeType() const
Definition: EdgeVar.h:59
The master of the optimization.
Definition: master.h:69
Contains logging functionality.
virtual void printMe(std::ostream &out)
Definition: EdgeVar.h:64
Class for the representation of edges.
Definition: Graph_d.h:292
Class for the representation of nodes.
Definition: Graph_d.h:169
Forms the virtual base class for all possible variables given in pool format.
Definition: variable.h:59
Pure declaration header, find template implementation in Graph.h.
variable.
EdgeVar(abacus::Master *master, double obj, EdgeType eType, node source, node target)
The namespace for all OGDF objects.