6 * $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
7 ***************************************************************/
10 * \brief Declaration of the variable class for the Branch&Cut algorithm
11 * for the Maximum C-Planar SubGraph problem
13 * \author Mathias Jansen
17 * This file is part of the Open Graph Drawing Framework (OGDF).
21 * See README.txt in the root directory of the OGDF installation for details.
24 * This program is free software; you can redistribute it and/or
25 * modify it under the terms of the GNU General Public License
26 * Version 2 or 3 as published by the Free Software Foundation;
27 * see the file LICENSE.txt included in the packaging of this file
31 * This program is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
37 * You should have received a copy of the GNU General Public
38 * License along with this program; if not, write to the Free
39 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
40 * Boston, MA 02110-1301, USA.
42 * \see http://www.gnu.org/copyleft/gpl.html
43 ***************************************************************/
45 #ifndef OGDF_MAX_CPLANAR_EDGE_H
46 #define OGDF_MAX_CPLANAR_EDGE_H
48 #include <ogdf/basic/Graph_d.h>
49 #include <ogdf/basic/Logger.h>
51 #include <abacus/variable.h>
56 class EdgeVar
: public ABA_VARIABLE
{
59 enum edgeType
{ORIGINAL
, CONNECT
};
61 EdgeVar(ABA_MASTER
*master
, double obj
, edgeType eType
, node source
, node target
);
62 //! Simple version for cplanarity testing (only connect edges allowed)
63 EdgeVar(ABA_MASTER
*master
, double obj
, node source
, node target
);
64 //! Simple version for cplanarity testing (only connect edges allowed, lower bound given)
65 EdgeVar(ABA_MASTER
*master
, double obj
, double lbound
, node source
, node target
);
69 edge
theEdge() const {return m_edge
;}
70 node
sourceNode() const {return m_source
;}
71 node
targetNode() const {return m_target
;}
72 edgeType
theEdgeType() const {return m_eType
;}
73 //double objCoeff() const {return m_objCoeff;}
75 virtual void printMe(ostream
& out
) {
76 out
<< "[Var: " << sourceNode() << "->" << targetNode() << " (" << ((theEdgeType()==EdgeVar::ORIGINAL
)?"original":"connect") << ") ZF=" << obj() << "]";
81 // The edge type of the variable
84 // The corresponding nodes and edge