Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
CutConstraint.h
Go to the documentation of this file.
1
37#pragma once
38
41
43
44namespace ogdf {
45namespace cluster_planarity {
46
48public:
50
51 virtual ~CutConstraint();
52
53 // Computes and returns the coefficient for the given variable
54 virtual double coeff(const abacus::Variable* v) const override {
55 const EdgeVar* ev = static_cast<const EdgeVar*>(v);
56 return static_cast<double>(coeff(ev->sourceNode(), ev->targetNode()));
57 }
58
59 inline int coeff(const NodePair& n) const override { return coeff(n.source, n.target); }
60
61 int coeff(node n1, node n2) const;
62
63 void printMe(std::ostream& out) const {
64 out << "[CutCon: ";
65 for (const NodePair& p : m_cutEdges) {
66 out << p << ",";
67 }
68 out << "]";
69 }
70
71private:
72 // The list containing the node pairs corresponding to the cut edges
74};
75
76}
77}
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...
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
Definition convar.h:199
The master of the optimization.
Definition master.h:69
The subproblem.
Definition sub.h:68
Forms the virtual base class for all possible variables given in pool format.
Definition variable.h:59
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
Class for the representation of nodes.
Definition Graph_d.h:177
int coeff(const NodePair &n) const override
int coeff(node n1, node n2) const
void printMe(std::ostream &out) const
CutConstraint(abacus::Master *master, abacus::Sub *sub, List< NodePair > &edges)
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.