Open
Graph Drawing
Framework

 v.2012.07
 

Cluster_CutConstraint.h
Go to the documentation of this file.
1 /*
2  * $Revision: 2523 $
3  *
4  * last checkin:
5  * $Author: gutwenger $
6  * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7  ***************************************************************/
8 
48 #ifndef OGDF_CLUSTER_CUT_CONSTRAINT_H
49 #define OGDF_CLUSTER_CUT_CONSTRAINT_H
50 
53 
54 #include <abacus/constraint.h>
55 
56 namespace ogdf {
57 
58 class CutConstraint : public BaseConstraint {
59 
60 public:
61 
62  CutConstraint(ABA_MASTER *master, ABA_SUB *sub, List<nodePair> &edges);
63 
64  virtual ~CutConstraint();
65 
66  // Computes and returns the coefficient for the given variable
67  virtual double coeff(ABA_VARIABLE *v) { EdgeVar *ev = (EdgeVar *)v; return (double)coeff(ev->sourceNode(), ev->targetNode()); }
68  inline int coeff(const nodePair& n) { return coeff(n.v1,n.v2); }
69  int coeff(node n1, node n2);
70 
71  void printMe(ostream& out) const {
72  out << "[CutCon: ";
74  (*it).printMe(out);
75  out << ",";
76  }
77  out << "]";
78  }
79 
80 private:
81 
82  // The list containing the node pairs corresponding to the cut edges
84 
85 };
86 
87 }
88 
89 #endif