Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

CutConstraint.h
Go to the documentation of this file.
1 
37 #pragma once
38 
41 
43 
44 namespace ogdf {
45 namespace cluster_planarity {
46 
47 class CutConstraint : public BaseConstraint {
48 public:
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  inline int coeff(const NodePair& n) const override { return coeff(n.source,n.target); }
59  int coeff(node n1, node n2) const;
60 
61  void printMe(ostream& out) const {
62  out << "[CutCon: ";
63  for(const NodePair &p : m_cutEdges) {
64  out << p << ",";
65  }
66  out << "]";
67  }
68 
69 private:
70  // The list containing the node pairs corresponding to the cut edges
72 
73 };
74 
75 }
76 }
int coeff(const NodePair &n) const override
Definition: CutConstraint.h:58
The master of the optimization.
Definition: master.h:69
CutConstraint(abacus::Master *master, abacus::Sub *sub, List< NodePair > &edges)
The subproblem.
Definition: sub.h:68
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
virtual double coeff(const abacus::Variable *v) const override
Returns the coefficient of the variable v in the constraint.
Definition: CutConstraint.h:54
Basic constraint type.
Definition: basics.h:59
Doubly linked lists (maintaining the length of the list).
Definition: List.h:39
constraint.
Class for the representation of nodes.
Definition: Graph_d.h:167
Forms the virtual base class for all possible variables given in pool format.
Definition: variable.h:59
The namespace for all OGDF objects.
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
void printMe(ostream &out) const
Definition: CutConstraint.h:61