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>
44#include <ogdf/basic/Graph.h>
45#include <ogdf/basic/Logger.h>
48
49#include <ostream>
50
51namespace abacus {
52class Master;
53class Variable;
54} // namespace abacus
55
56namespace ogdf {
57template<class E, class INDEX>
58class ArrayBuffer;
59
60namespace cluster_planarity {
61
63#ifdef OGDF_DEBUG
64 //Mainly for debugging output purposes
65 friend class MaxCPlanarMaster;
66 friend class MaxCPlanarSub;
67 friend class CPlanarMaster;
68 friend class CPlanarSub;
69#endif
70public:
72 const ArrayBuffer<node>& cochunk);
73
75
76 // Computes and returns the coefficient for the given variable
77 virtual double coeff(const abacus::Variable* v) const override {
78 const EdgeVar* ev = static_cast<const EdgeVar*>(v);
79 //Safe for both clustered planarity testing and maximum c-planar subgraph
81 ? 0.0
82 : (double)coeff(ev->sourceNode(), ev->targetNode());
83 }
84
85 inline int coeff(const NodePair& n) const override { return coeff(n.source, n.target); }
86
87 int coeff(node v1, node v2) const;
88
89 void printMe(std::ostream& out) const {
90 out << "[ChunkCon: (";
91 for (node v : m_chunk) {
92 Logger::slout() << v << ",";
93 }
94 out << "|";
95 for (node v : m_cochunk) {
96 Logger::slout() << v << ",";
97 }
98 out << ")]";
99 }
100
101private:
102 // The nodePairs corresponding to the constraint
105};
106
107}
108}
Declaration and implementation of Array class and Array algorithms.
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
Includes declaration of graph class.
Contains logging functionality.
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:70
Forms the virtual base class for all possible variables given in pool format.
Definition variable.h:60
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition ArrayBuffer.h:64
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
static std::ostream & slout(Level level=Level::Default)
stream for logging-output (global)
Definition Logger.h:193
Class for the representation of nodes.
Definition Graph_d.h:241
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.
EdgeType theEdgeType() const
Definition EdgeVar.h:65
The namespace for all OGDF objects.