1 /*!\file
2 * \author Matthias Elf
3 *
4 * \par License:
5 * This file is part of ABACUS - A Branch And CUt System
6 * Copyright (C) 1995 - 2003
7 * University of Cologne, Germany
8 *
9 * \par
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * \par
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * \par
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * \see http://www.gnu.org/copyleft/gpl.html
27 */
28
29 #include <ogdf/lib/abacus/convar.h>
30 #include <ogdf/lib/abacus/master.h>
31
32 namespace abacus {
33
34
_expand() const35 void ConVar::_expand() const
36 {
37 if(expanded_) {
38 Logger::ifout() << "WARNING: ConVar::_expand(): ";
39 Logger::ifout() << "constraint already expanded" << std::endl;
40 return;
41 }
42 expand();
43 expanded_ = true;
44 }
45
46
_compress() const47 void ConVar::_compress() const
48 {
49 if(!expanded_) {
50 Logger::ifout() << "WARNING: ConVar::_compress(): ";
51 Logger::ifout() << "constraint already compressed" << std::endl;
52 return;
53 }
54 compress();
55 expanded_ = false;
56 }
57
58
print(std::ostream & out) const59 void ConVar::print(std::ostream &out) const
60 {
61 out << "ConVar::print() is only a dummy." << std::endl;
62 }
63
64
hashKey() const65 unsigned ConVar::hashKey() const
66 {
67 Logger::ifout() << "ConVar::hashKey() must be defined in derived class.\n";
68 OGDF_THROW_PARAM(AlgorithmFailureException, ogdf::AlgorithmFailureCode::Convar);
69 }
70
71
name() const72 const char *ConVar::name() const
73 {
74 Logger::ifout() << "ConVar::name() must be defined in derived class.\n";
75 OGDF_THROW_PARAM(AlgorithmFailureException, ogdf::AlgorithmFailureCode::Convar);
76 }
77
78
equal(const ConVar *) const79 bool ConVar::equal(const ConVar * /* cv */) const
80 {
81 Logger::ifout() << "ConVar::equal() must be defined in derived class.\n";
82 OGDF_THROW_PARAM(AlgorithmFailureException, ogdf::AlgorithmFailureCode::Convar);
83 }
84 }
85