Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
EdgeVar.h
Go to the documentation of this file.
1
34#pragma once
35
36#include <ogdf/basic/Graph.h>
37
39
40#include <ostream>
41
42namespace ogdf {
43namespace cluster_planarity {
44
45class EdgeVar : public abacus::Variable {
46 friend class MaxCPlanarSub;
47
48public:
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
76private:
77 // The edge type of the variable
79
80 // The corresponding nodes and edge
84};
85
86}
87}
Includes declaration of graph class.
Includes Abacus.
The master of the optimization.
Definition master.h:70
Forms the virtual base class for all possible variables given in pool format.
Definition variable.h:60
virtual double obj() const
Returns the objective function coefficient.
Definition variable.h:113
Class for the representation of edges.
Definition Graph_d.h:364
Class for the representation of nodes.
Definition Graph_d.h:241
EdgeVar(abacus::Master *master, double obj, node source, node target)
Simple version for cplanarity testing (only connect edges allowed)
EdgeVar(abacus::Master *master, double obj, EdgeType eType, node source, node target)
virtual void printMe(std::ostream &out)
Definition EdgeVar.h:70
EdgeVar(abacus::Master *master, double obj, double lbound, node source, node target)
Simple version for cplanarity testing (only connect edges allowed, lower bound given)
EdgeType theEdgeType() const
Definition EdgeVar.h:65
The namespace for all OGDF objects.