Don't import ogdf namespace
[TortoiseGit.git] / ext / OGDF / ogdf / internal / cluster / basics.h
blobf03f613c925cb5093e4be238956d2e1d3f4665ce
1 /*
2 * $Revision: 2555 $
4 * last checkin:
5 * $Author: gutwenger $
6 * $Date: 2012-07-06 12:12:10 +0200 (Fr, 06. Jul 2012) $
7 ***************************************************************/
9 /** \file
10 * \brief Declaration of the master class for the Branch&Cut algorithm
11 * for the Maximum C-Planar SubGraph problem.
13 * Basic classes for c-planarity computation.
15 * \author Karsten Klein
17 * \par License:
18 * This file is part of the Open Graph Drawing Framework (OGDF).
20 * \par
21 * Copyright (C)<br>
22 * See README.txt in the root directory of the OGDF installation for details.
24 * \par
25 * This program is free software; you can redistribute it and/or
26 * modify it under the terms of the GNU General Public License
27 * Version 2 or 3 as published by the Free Software Foundation;
28 * see the file LICENSE.txt included in the packaging of this file
29 * for details.
31 * \par
32 * This program is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 * GNU General Public License for more details.
37 * \par
38 * You should have received a copy of the GNU General Public
39 * License along with this program; if not, write to the Free
40 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
41 * Boston, MA 02110-1301, USA.
43 * \see http://www.gnu.org/copyleft/gpl.html
44 ***************************************************************/
46 #ifndef OGDF_CPLANAR_BASICS_H
47 #define OGDF_CPLANAR_BASICS_H
49 #include <abacus/master.h>
50 #include <ogdf/basic/Graph_d.h>
51 #include <ogdf/cluster/ClusterGraph.h>
52 #include <ogdf/cluster/ClusterGraphAttributes.h>
54 namespace ogdf {
55 class ChunkConnection;
57 //! Struct for storing the two corresponding nodes of an edge.
58 struct nodePair {
59 node v1;
60 node v2;
61 nodePair() {}
62 nodePair(node u1, node u2) : v1(u1), v2(u2) {}
63 void printMe(ostream& out) const { out << "("<<v1<<","<<v2<<")"; }
65 std::ostream &operator<<(std::ostream &os, const nodePair& v);
68 //! Struct for attaching the current lp-value to the corresponding edge.
69 //! Used in the primal heuristic.
70 struct edgeValue {
71 node src;
72 node trg;
73 double lpValue;
74 bool original;
75 edge e;
78 //! Basic constraint type
79 class BaseConstraint : public ABA_CONSTRAINT {
81 public:
82 BaseConstraint(ABA_MASTER *master, const ABA_SUB *sub, ABA_CSENSE::SENSE sense, double rhs, bool dynamic, bool local, bool liftable) :
83 ABA_CONSTRAINT(master, sub, sense, rhs, dynamic, local, liftable) { }
85 virtual ~BaseConstraint() { }
87 virtual int coeff(const nodePair& n) = 0;
89 }//end namespace ogdf
91 #endif