Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ChunkConnection.h
Go to the documentation of this file.
1
41#pragma once
42
43#include <ogdf/basic/Array.h>
48
50
51namespace ogdf {
52namespace cluster_planarity {
53
55#ifdef OGDF_DEBUG
56 //Mainly for debugging output purposes
57 friend class MaxCPlanarMaster;
58 friend class MaxCPlanarSub;
59 friend class CPlanarMaster;
60 friend class CPlanarSub;
61#endif
62public:
65
67
68 // Computes and returns the coefficient for the given variable
69 virtual double coeff(const abacus::Variable* v) const override {
70 const EdgeVar* ev = static_cast<const EdgeVar*>(v);
71 //Safe for both clustered planarity testing and maximum c-planar subgraph
72 return (ev->theEdgeType() != EdgeVar::EdgeType::Connect)
73 ? 0.0
74 : (double)coeff(ev->sourceNode(), ev->targetNode());
75 }
76
77 inline int coeff(const NodePair& n) const override { return coeff(n.source, n.target); }
78
79 int coeff(node v1, node v2) const;
80
81 void printMe(std::ostream& out) const {
82 out << "[ChunkCon: (";
83 for (node v : m_chunk) {
84 Logger::slout() << v << ",";
85 }
86 out << "|";
87 for (node v : m_cochunk) {
88 Logger::slout() << v << ",";
89 }
90 out << ")]";
91 }
92
93private:
94 // The nodePairs corresponding to the constraint
97};
98
99}
100}
Declaration and implementation of Array class and Array algorithms.
Declaration and implementation of ArrayBuffer class.
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
Declaration of the master class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph proble...
The master of the optimization.
Definition master.h:69
Forms the virtual base class for all possible variables given in pool format.
Definition variable.h:59
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition ArrayBuffer.h:56
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:214
static std::ostream & slout(Level level=Level::Default)
stream for logging-output (global)
Definition Logger.h:167
Class for the representation of nodes.
Definition Graph_d.h:177
int coeff(const NodePair &n) const override
void printMe(std::ostream &out) const
ChunkConnection(abacus::Master *master, const ArrayBuffer< node > &chunk, const ArrayBuffer< node > &cochunk)
int coeff(node v1, node v2) const
virtual double coeff(const abacus::Variable *v) const override
Returns the coefficient of the variable v in the constraint.
constraint.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.