1.1 --- a/lemon/Makefile.am Wed Mar 01 12:46:52 2006 +0000
1.2 +++ b/lemon/Makefile.am Wed Mar 01 13:19:28 2006 +0000
1.3 @@ -45,7 +45,6 @@
1.4 graph_utils.h \
1.5 graph_to_eps.h \
1.6 hypercube_graph.h \
1.7 - invalid.h \
1.8 iterable_maps.h \
1.9 johnson.h \
1.10 kruskal.h \
1.11 @@ -74,12 +73,10 @@
1.12 sub_graph.h \
1.13 time_measure.h \
1.14 topology.h \
1.15 - traits.h \
1.16 ugraph_adaptor.h \
1.17 unionfind.h \
1.18 xy.h \
1.19 concept_check.h \
1.20 - utility.h \
1.21 lemon_reader.h \
1.22 lemon_writer.h \
1.23 graph_reader.h \
1.24 @@ -94,8 +91,11 @@
1.25 bits/graph_extender.h \
1.26 bits/graph_adaptor_extender.h \
1.27 bits/edge_set_extender.h \
1.28 + bits/invalid.h \
1.29 bits/item_reader.h \
1.30 bits/item_writer.h \
1.31 + bits/traits.h \
1.32 + bits/utility.h \
1.33 concept/bpugraph.h \
1.34 concept/graph.h \
1.35 concept/graph_component.h \
2.1 --- a/lemon/base.cc Wed Mar 01 12:46:52 2006 +0000
2.2 +++ b/lemon/base.cc Wed Mar 01 13:19:28 2006 +0000
2.3 @@ -20,7 +20,7 @@
2.4 ///\brief Some basic non inline function and static global data.
2.5
2.6 #include<lemon/tolerance.h>
2.7 -#include<lemon/invalid.h>
2.8 +#include<lemon/bits/invalid.h>
2.9 namespace lemon {
2.10
2.11 float Tolerance<float>::def_epsilon = 1e-4;
3.1 --- a/lemon/bellman_ford.h Wed Mar 01 12:46:52 2006 +0000
3.2 +++ b/lemon/bellman_ford.h Wed Mar 01 13:19:28 2006 +0000
3.3 @@ -25,7 +25,7 @@
3.4 ///
3.5
3.6 #include <lemon/list_graph.h>
3.7 -#include <lemon/invalid.h>
3.8 +#include <lemon/bits/invalid.h>
3.9 #include <lemon/error.h>
3.10 #include <lemon/maps.h>
3.11
4.1 --- a/lemon/bfs.h Wed Mar 01 12:46:52 2006 +0000
4.2 +++ b/lemon/bfs.h Wed Mar 01 13:19:28 2006 +0000
4.3 @@ -25,7 +25,7 @@
4.4
4.5 #include <lemon/list_graph.h>
4.6 #include <lemon/graph_utils.h>
4.7 -#include <lemon/invalid.h>
4.8 +#include <lemon/bits/invalid.h>
4.9 #include <lemon/error.h>
4.10 #include <lemon/maps.h>
4.11
5.1 --- a/lemon/bits/graph_extender.h Wed Mar 01 12:46:52 2006 +0000
5.2 +++ b/lemon/bits/graph_extender.h Wed Mar 01 13:19:28 2006 +0000
5.3 @@ -19,7 +19,7 @@
5.4 #ifndef LEMON_GRAPH_EXTENDER_H
5.5 #define LEMON_GRAPH_EXTENDER_H
5.6
5.7 -#include <lemon/invalid.h>
5.8 +#include <lemon/bits/invalid.h>
5.9 #include <lemon/error.h>
5.10
5.11 #include <lemon/bits/default_map.h>
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/lemon/bits/invalid.h Wed Mar 01 13:19:28 2006 +0000
6.3 @@ -0,0 +1,54 @@
6.4 +/* -*- C++ -*-
6.5 + *
6.6 + * This file is a part of LEMON, a generic C++ optimization library
6.7 + *
6.8 + * Copyright (C) 2003-2006
6.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
6.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
6.11 + *
6.12 + * Permission to use, modify and distribute this software is granted
6.13 + * provided that this copyright notice appears in all copies. For
6.14 + * precise terms see the accompanying LICENSE file.
6.15 + *
6.16 + * This software is provided "AS IS" with no warranty of any kind,
6.17 + * express or implied, and with no claim as to its suitability for any
6.18 + * purpose.
6.19 + *
6.20 + */
6.21 +
6.22 +#ifndef LEMON_BITS_INVALID_H
6.23 +#define LEMON_BITS_INVALID_H
6.24 +
6.25 +///\file
6.26 +///\brief Definition of INVALID.
6.27 +
6.28 +namespace lemon {
6.29 +
6.30 + /// Dummy type to make it easier to make invalid iterators.
6.31 +
6.32 + /// See \ref INVALID, how to use it.
6.33 +
6.34 + struct Invalid {
6.35 + public:
6.36 + bool operator==(Invalid) { return true; }
6.37 + bool operator!=(Invalid) { return false; }
6.38 + bool operator< (Invalid) { return false; }
6.39 + };
6.40 +
6.41 + /// Invalid iterators.
6.42 +
6.43 + /// \ref Invalid is a global type that converts to each iterator
6.44 + /// in such a way that the value of the target iterator will be invalid.
6.45 +
6.46 + //const Invalid &INVALID = *(Invalid *)0;
6.47 +
6.48 +#ifdef LEMON_ONLY_TEMPLATES
6.49 + const Invalid INVALID = Invalid();
6.50 +#else
6.51 + extern const Invalid INVALID;
6.52 +#endif
6.53 +
6.54 +} //namespace lemon
6.55 +
6.56 +#endif
6.57 +
7.1 --- a/lemon/bits/map_extender.h Wed Mar 01 12:46:52 2006 +0000
7.2 +++ b/lemon/bits/map_extender.h Wed Mar 01 13:19:28 2006 +0000
7.3 @@ -21,7 +21,7 @@
7.4
7.5 #include <iterator>
7.6
7.7 -#include <lemon/traits.h>
7.8 +#include <lemon/bits/traits.h>
7.9
7.10 ///\file
7.11 ///\brief Extenders for iterable maps.
8.1 --- a/lemon/bits/static_map.h Wed Mar 01 12:46:52 2006 +0000
8.2 +++ b/lemon/bits/static_map.h Wed Mar 01 13:19:28 2006 +0000
8.3 @@ -22,7 +22,7 @@
8.4 #include <algorithm>
8.5 #include <iostream>
8.6
8.7 -#include <lemon/utility.h>
8.8 +#include <lemon/bits/utility.h>
8.9 #include <lemon/bits/map_extender.h>
8.10 #include <lemon/bits/alteration_notifier.h>
8.11 #include <lemon/error.h>
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/lemon/bits/traits.h Wed Mar 01 13:19:28 2006 +0000
9.3 @@ -0,0 +1,300 @@
9.4 +/* -*- C++ -*-
9.5 + *
9.6 + * This file is a part of LEMON, a generic C++ optimization library
9.7 + *
9.8 + * Copyright (C) 2003-2006
9.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
9.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
9.11 + *
9.12 + * Permission to use, modify and distribute this software is granted
9.13 + * provided that this copyright notice appears in all copies. For
9.14 + * precise terms see the accompanying LICENSE file.
9.15 + *
9.16 + * This software is provided "AS IS" with no warranty of any kind,
9.17 + * express or implied, and with no claim as to its suitability for any
9.18 + * purpose.
9.19 + *
9.20 + */
9.21 +
9.22 +#ifndef LEMON_BITS_TRAITS_H
9.23 +#define LEMON_BITS_TRAITS_H
9.24 +
9.25 +#include <lemon/bits/utility.h>
9.26 +
9.27 +///\file
9.28 +///\brief Traits for graphs and maps
9.29 +///
9.30 +
9.31 +namespace lemon {
9.32 + template <typename _Graph, typename _Item>
9.33 + class ItemSetTraits {};
9.34 +
9.35 +
9.36 + template <typename Graph, typename Enable = void>
9.37 + struct NodeNotifierIndicator {
9.38 + typedef InvalidType Type;
9.39 + };
9.40 + template <typename Graph>
9.41 + struct NodeNotifierIndicator<
9.42 + Graph,
9.43 + typename enable_if<typename Graph::NodeNotifier::Notifier, void>::type
9.44 + > {
9.45 + typedef typename Graph::NodeNotifier Type;
9.46 + };
9.47 +
9.48 + template <typename _Graph>
9.49 + class ItemSetTraits<_Graph, typename _Graph::Node> {
9.50 + public:
9.51 +
9.52 + typedef _Graph Graph;
9.53 +
9.54 + typedef typename Graph::Node Item;
9.55 + typedef typename Graph::NodeIt ItemIt;
9.56 +
9.57 + typedef typename NodeNotifierIndicator<Graph>::Type ItemNotifier;
9.58 +
9.59 + template <typename _Value>
9.60 + class Map : public Graph::template NodeMap<_Value> {
9.61 + public:
9.62 + typedef typename Graph::template NodeMap<_Value> Parent;
9.63 + typedef typename Parent::Value Value;
9.64 +
9.65 + Map(const Graph& _graph) : Parent(_graph) {}
9.66 + Map(const Graph& _graph, const Value& _value)
9.67 + : Parent(_graph, _value) {}
9.68 +
9.69 + };
9.70 +
9.71 + };
9.72 +
9.73 + template <typename Graph, typename Enable = void>
9.74 + struct EdgeNotifierIndicator {
9.75 + typedef InvalidType Type;
9.76 + };
9.77 + template <typename Graph>
9.78 + struct EdgeNotifierIndicator<
9.79 + Graph,
9.80 + typename enable_if<typename Graph::EdgeNotifier::Notifier, void>::type
9.81 + > {
9.82 + typedef typename Graph::EdgeNotifier Type;
9.83 + };
9.84 +
9.85 + template <typename _Graph>
9.86 + class ItemSetTraits<_Graph, typename _Graph::Edge> {
9.87 + public:
9.88 +
9.89 + typedef _Graph Graph;
9.90 +
9.91 + typedef typename Graph::Edge Item;
9.92 + typedef typename Graph::EdgeIt ItemIt;
9.93 +
9.94 + typedef typename EdgeNotifierIndicator<Graph>::Type ItemNotifier;
9.95 +
9.96 + template <typename _Value>
9.97 + class Map : public Graph::template EdgeMap<_Value> {
9.98 + public:
9.99 + typedef typename Graph::template EdgeMap<_Value> Parent;
9.100 + typedef typename Parent::Value Value;
9.101 +
9.102 + Map(const Graph& _graph) : Parent(_graph) {}
9.103 + Map(const Graph& _graph, const Value& _value)
9.104 + : Parent(_graph, _value) {}
9.105 + };
9.106 +
9.107 + };
9.108 +
9.109 + template <typename Graph, typename Enable = void>
9.110 + struct UEdgeNotifierIndicator {
9.111 + typedef InvalidType Type;
9.112 + };
9.113 + template <typename Graph>
9.114 + struct UEdgeNotifierIndicator<
9.115 + Graph,
9.116 + typename enable_if<typename Graph::UEdgeNotifier::Notifier, void>::type
9.117 + > {
9.118 + typedef typename Graph::UEdgeNotifier Type;
9.119 + };
9.120 +
9.121 + template <typename _Graph>
9.122 + class ItemSetTraits<_Graph, typename _Graph::UEdge> {
9.123 + public:
9.124 +
9.125 + typedef _Graph Graph;
9.126 +
9.127 + typedef typename Graph::UEdge Item;
9.128 + typedef typename Graph::UEdgeIt ItemIt;
9.129 +
9.130 + typedef typename UEdgeNotifierIndicator<Graph>::Type ItemNotifier;
9.131 +
9.132 + template <typename _Value>
9.133 + class Map : public Graph::template UEdgeMap<_Value> {
9.134 + public:
9.135 + typedef typename Graph::template UEdgeMap<_Value> Parent;
9.136 + typedef typename Parent::Value Value;
9.137 +
9.138 + Map(const Graph& _graph) : Parent(_graph) {}
9.139 + Map(const Graph& _graph, const Value& _value)
9.140 + : Parent(_graph, _value) {}
9.141 + };
9.142 +
9.143 + };
9.144 +
9.145 + template <typename Graph, typename Enable = void>
9.146 + struct ANodeNotifierIndicator {
9.147 + typedef InvalidType Type;
9.148 + };
9.149 + template <typename Graph>
9.150 + struct ANodeNotifierIndicator<
9.151 + Graph,
9.152 + typename enable_if<typename Graph::ANodeNotifier::Notifier, void>::type
9.153 + > {
9.154 + typedef typename Graph::ANodeNotifier Type;
9.155 + };
9.156 +
9.157 + template <typename _Graph>
9.158 + class ItemSetTraits<_Graph, typename _Graph::ANode> {
9.159 + public:
9.160 +
9.161 + typedef _Graph Graph;
9.162 +
9.163 + typedef typename Graph::ANode Item;
9.164 + typedef typename Graph::ANodeIt ItemIt;
9.165 +
9.166 + typedef typename ANodeNotifierIndicator<Graph>::Type ItemNotifier;
9.167 +
9.168 + template <typename _Value>
9.169 + class Map : public Graph::template ANodeMap<_Value> {
9.170 + public:
9.171 + typedef typename Graph::template ANodeMap<_Value> Parent;
9.172 + typedef typename Parent::Value Value;
9.173 +
9.174 + Map(const Graph& _graph) : Parent(_graph) {}
9.175 + Map(const Graph& _graph, const Value& _value)
9.176 + : Parent(_graph, _value) {}
9.177 + };
9.178 +
9.179 + };
9.180 +
9.181 + template <typename Graph, typename Enable = void>
9.182 + struct BNodeNotifierIndicator {
9.183 + typedef InvalidType Type;
9.184 + };
9.185 + template <typename Graph>
9.186 + struct BNodeNotifierIndicator<
9.187 + Graph,
9.188 + typename enable_if<typename Graph::BNodeNotifier::Notifier, void>::type
9.189 + > {
9.190 + typedef typename Graph::BNodeNotifier Type;
9.191 + };
9.192 +
9.193 + template <typename _Graph>
9.194 + class ItemSetTraits<_Graph, typename _Graph::BNode> {
9.195 + public:
9.196 +
9.197 + typedef _Graph Graph;
9.198 +
9.199 + typedef typename Graph::BNode Item;
9.200 + typedef typename Graph::BNodeIt ItemIt;
9.201 +
9.202 + typedef typename BNodeNotifierIndicator<Graph>::Type ItemNotifier;
9.203 +
9.204 + template <typename _Value>
9.205 + class Map : public Graph::template BNodeMap<_Value> {
9.206 + public:
9.207 + typedef typename Graph::template BNodeMap<_Value> Parent;
9.208 + typedef typename Parent::Value Value;
9.209 +
9.210 + Map(const Graph& _graph) : Parent(_graph) {}
9.211 + Map(const Graph& _graph, const Value& _value)
9.212 + : Parent(_graph, _value) {}
9.213 + };
9.214 +
9.215 + };
9.216 +
9.217 +
9.218 + template <typename Map, typename Enable = void>
9.219 + struct MapTraits {
9.220 + typedef False ReferenceMapTag;
9.221 +
9.222 + typedef typename Map::Key Key;
9.223 + typedef typename Map::Value Value;
9.224 +
9.225 + typedef const Value ConstReturnValue;
9.226 + typedef const Value ReturnValue;
9.227 + };
9.228 +
9.229 + template <typename Map>
9.230 + struct MapTraits<
9.231 + Map, typename enable_if<typename Map::ReferenceMapTag, void>::type >
9.232 + {
9.233 + typedef True ReferenceMapTag;
9.234 +
9.235 + typedef typename Map::Key Key;
9.236 + typedef typename Map::Value Value;
9.237 +
9.238 + typedef typename Map::ConstReference ConstReturnValue;
9.239 + typedef typename Map::Reference ReturnValue;
9.240 +
9.241 + typedef typename Map::ConstReference ConstReference;
9.242 + typedef typename Map::Reference Reference;
9.243 + };
9.244 +
9.245 + // Indicators for the tags
9.246 +
9.247 + template <typename Graph, typename Enable = void>
9.248 + struct NodeNumTagIndicator {
9.249 + static const bool value = false;
9.250 + };
9.251 +
9.252 + template <typename Graph>
9.253 + struct NodeNumTagIndicator<
9.254 + Graph,
9.255 + typename enable_if<typename Graph::NodeNumTag, void>::type
9.256 + > {
9.257 + static const bool value = true;
9.258 + };
9.259 +
9.260 + template <typename Graph, typename Enable = void>
9.261 + struct EdgeNumTagIndicator {
9.262 + static const bool value = false;
9.263 + };
9.264 +
9.265 + template <typename Graph>
9.266 + struct EdgeNumTagIndicator<
9.267 + Graph,
9.268 + typename enable_if<typename Graph::EdgeNumTag, void>::type
9.269 + > {
9.270 + static const bool value = true;
9.271 + };
9.272 +
9.273 + template <typename Graph, typename Enable = void>
9.274 + struct FindEdgeTagIndicator {
9.275 + static const bool value = false;
9.276 + };
9.277 +
9.278 + template <typename Graph>
9.279 + struct FindEdgeTagIndicator<
9.280 + Graph,
9.281 + typename enable_if<typename Graph::FindEdgeTag, void>::type
9.282 + > {
9.283 + static const bool value = true;
9.284 + };
9.285 +
9.286 + template <typename Graph, typename Enable = void>
9.287 + struct UndirectedTagIndicator {
9.288 + static const bool value = false;
9.289 + };
9.290 +
9.291 + template <typename Graph>
9.292 + struct UndirectedTagIndicator<
9.293 + Graph,
9.294 + typename enable_if<typename Graph::UndirectedTag, void>::type
9.295 + > {
9.296 + static const bool value = true;
9.297 + };
9.298 +
9.299 +
9.300 +
9.301 +}
9.302 +
9.303 +#endif // LEMON_MAPS_H
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/lemon/bits/utility.h Wed Mar 01 13:19:28 2006 +0000
10.3 @@ -0,0 +1,137 @@
10.4 +/* -*- C++ -*-
10.5 + *
10.6 + * This file is a part of LEMON, a generic C++ optimization library
10.7 + *
10.8 + * Copyright (C) 2003-2006
10.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
10.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
10.11 + *
10.12 + * Permission to use, modify and distribute this software is granted
10.13 + * provided that this copyright notice appears in all copies. For
10.14 + * precise terms see the accompanying LICENSE file.
10.15 + *
10.16 + * This software is provided "AS IS" with no warranty of any kind,
10.17 + * express or implied, and with no claim as to its suitability for any
10.18 + * purpose.
10.19 + *
10.20 + */
10.21 +
10.22 +// This file contains a modified version of the enable_if library from BOOST.
10.23 +// See the appropriate copyright notice below.
10.24 +
10.25 +// Boost enable_if library
10.26 +
10.27 +// Copyright 2003 © The Trustees of Indiana University.
10.28 +
10.29 +// Use, modification, and distribution is subject to the Boost Software
10.30 +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
10.31 +// http://www.boost.org/LICENSE_1_0.txt)
10.32 +
10.33 +// Authors: Jaakko Järvi (jajarvi at osl.iu.edu)
10.34 +// Jeremiah Willcock (jewillco at osl.iu.edu)
10.35 +// Andrew Lumsdaine (lums at osl.iu.edu)
10.36 +
10.37 +
10.38 +#ifndef LEMON_BITS_UTILITY_H
10.39 +#define LEMON_BITS_UTILITY_H
10.40 +
10.41 +///\file
10.42 +///\brief Miscellaneous basic utilities
10.43 +///
10.44 +///\todo Please rethink the organisation of the basic files like this.
10.45 +///E.g. this file might be merged with invalid.h.
10.46 +
10.47 +
10.48 +namespace lemon
10.49 +{
10.50 +
10.51 + /// Basic type for defining "tags". A "YES" condition for \c enable_if.
10.52 +
10.53 + /// Basic type for defining "tags". A "YES" condition for \c enable_if.
10.54 + ///
10.55 + ///\sa False
10.56 + ///
10.57 + /// \todo This should go to a separate "basic_types.h" (or something)
10.58 + /// file.
10.59 + struct True {
10.60 + ///\e
10.61 + static const bool value = true;
10.62 + };
10.63 +
10.64 + /// Basic type for defining "tags". A "NO" condition for \c enable_if.
10.65 +
10.66 + /// Basic type for defining "tags". A "NO" condition for \c enable_if.
10.67 + ///
10.68 + ///\sa True
10.69 + struct False {
10.70 + ///\e
10.71 + static const bool value = false;
10.72 + };
10.73 +
10.74 +
10.75 + class InvalidType {
10.76 + private:
10.77 + InvalidType();
10.78 + };
10.79 +
10.80 +
10.81 + template <typename T>
10.82 + struct Wrap {
10.83 + const T &value;
10.84 + Wrap(const T &t) : value(t) {}
10.85 + };
10.86 +
10.87 + /**************** dummy class to avoid ambiguity ****************/
10.88 +
10.89 + template<int T> struct dummy { dummy(int) {} };
10.90 +
10.91 + /**************** enable_if from BOOST ****************/
10.92 +
10.93 + template <bool B, class T = void>
10.94 + struct enable_if_c {
10.95 + typedef T type;
10.96 + };
10.97 +
10.98 + template <class T>
10.99 + struct enable_if_c<false, T> {};
10.100 +
10.101 + template <class Cond, class T = void>
10.102 + struct enable_if : public enable_if_c<Cond::value, T> {};
10.103 +
10.104 + template <bool B, class T>
10.105 + struct lazy_enable_if_c {
10.106 + typedef typename T::type type;
10.107 + };
10.108 +
10.109 + template <class T>
10.110 + struct lazy_enable_if_c<false, T> {};
10.111 +
10.112 + template <class Cond, class T>
10.113 + struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
10.114 +
10.115 +
10.116 + template <bool B, class T = void>
10.117 + struct disable_if_c {
10.118 + typedef T type;
10.119 + };
10.120 +
10.121 + template <class T>
10.122 + struct disable_if_c<true, T> {};
10.123 +
10.124 + template <class Cond, class T = void>
10.125 + struct disable_if : public disable_if_c<Cond::value, T> {};
10.126 +
10.127 + template <bool B, class T>
10.128 + struct lazy_disable_if_c {
10.129 + typedef typename T::type type;
10.130 + };
10.131 +
10.132 + template <class T>
10.133 + struct lazy_disable_if_c<true, T> {};
10.134 +
10.135 + template <class Cond, class T>
10.136 + struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
10.137 +
10.138 +} // namespace lemon
10.139 +
10.140 +#endif
11.1 --- a/lemon/bits/vector_map.h Wed Mar 01 12:46:52 2006 +0000
11.2 +++ b/lemon/bits/vector_map.h Wed Mar 01 13:19:28 2006 +0000
11.3 @@ -22,7 +22,7 @@
11.4 #include <vector>
11.5 #include <algorithm>
11.6
11.7 -#include <lemon/utility.h>
11.8 +#include <lemon/bits/utility.h>
11.9 #include <lemon/bits/map_extender.h>
11.10 #include <lemon/bits/alteration_notifier.h>
11.11 #include <lemon/concept_check.h>
12.1 --- a/lemon/color.h Wed Mar 01 12:46:52 2006 +0000
12.2 +++ b/lemon/color.h Wed Mar 01 13:19:28 2006 +0000
12.3 @@ -30,7 +30,7 @@
12.4 #include <ctime>
12.5 #include <cmath>
12.6
12.7 -#include<lemon/invalid.h>
12.8 +#include<lemon/bits/invalid.h>
12.9 #include<lemon/xy.h>
12.10 #include<lemon/maps.h>
12.11 #include<lemon/bezier.h>
13.1 --- a/lemon/concept/bpugraph.h Wed Mar 01 12:46:52 2006 +0000
13.2 +++ b/lemon/concept/bpugraph.h Wed Mar 01 13:19:28 2006 +0000
13.3 @@ -29,7 +29,7 @@
13.4 #include <lemon/concept/graph.h>
13.5 #include <lemon/concept/ugraph.h>
13.6
13.7 -#include <lemon/utility.h>
13.8 +#include <lemon/bits/utility.h>
13.9
13.10 namespace lemon {
13.11 namespace concept {
14.1 --- a/lemon/concept/graph.h Wed Mar 01 12:46:52 2006 +0000
14.2 +++ b/lemon/concept/graph.h Wed Mar 01 13:19:28 2006 +0000
14.3 @@ -23,8 +23,8 @@
14.4 ///\file
14.5 ///\brief Declaration of Graph.
14.6
14.7 -#include <lemon/invalid.h>
14.8 -#include <lemon/utility.h>
14.9 +#include <lemon/bits/invalid.h>
14.10 +#include <lemon/bits/utility.h>
14.11 #include <lemon/concept/maps.h>
14.12 #include <lemon/concept_check.h>
14.13 #include <lemon/concept/graph_component.h>
15.1 --- a/lemon/concept/graph_component.h Wed Mar 01 12:46:52 2006 +0000
15.2 +++ b/lemon/concept/graph_component.h Wed Mar 01 13:19:28 2006 +0000
15.3 @@ -24,7 +24,7 @@
15.4 #ifndef LEMON_CONCEPT_GRAPH_COMPONENT_H
15.5 #define LEMON_CONCEPT_GRAPH_COMPONENT_H
15.6
15.7 -#include <lemon/invalid.h>
15.8 +#include <lemon/bits/invalid.h>
15.9 #include <lemon/concept/maps.h>
15.10
15.11 #include <lemon/bits/alteration_notifier.h>
16.1 --- a/lemon/concept/heap.h Wed Mar 01 12:46:52 2006 +0000
16.2 +++ b/lemon/concept/heap.h Wed Mar 01 13:19:28 2006 +0000
16.3 @@ -24,7 +24,7 @@
16.4 #ifndef LEMON_CONCEPT_HEAP_H
16.5 #define LEMON_CONCEPT_HEAP_H
16.6
16.7 -#include <lemon/invalid.h>
16.8 +#include <lemon/bits/invalid.h>
16.9
16.10 namespace lemon {
16.11 namespace concept {
17.1 --- a/lemon/concept/maps.h Wed Mar 01 12:46:52 2006 +0000
17.2 +++ b/lemon/concept/maps.h Wed Mar 01 13:19:28 2006 +0000
17.3 @@ -19,7 +19,7 @@
17.4 #ifndef LEMON_CONCEPT_MAPS_H
17.5 #define LEMON_CONCEPT_MAPS_H
17.6
17.7 -#include <lemon/utility.h>
17.8 +#include <lemon/bits/utility.h>
17.9 #include <lemon/concept_check.h>
17.10
17.11 ///\ingroup concept
18.1 --- a/lemon/concept/matrix_maps.h Wed Mar 01 12:46:52 2006 +0000
18.2 +++ b/lemon/concept/matrix_maps.h Wed Mar 01 13:19:28 2006 +0000
18.3 @@ -19,7 +19,7 @@
18.4 #ifndef LEMON_CONCEPT_MATRIX_MAPS_H
18.5 #define LEMON_CONCEPT_MATRIX_MAPS_H
18.6
18.7 -#include <lemon/utility.h>
18.8 +#include <lemon/bits/utility.h>
18.9 #include <lemon/concept_check.h>
18.10
18.11 ///\ingroup concept
19.1 --- a/lemon/concept/path.h Wed Mar 01 12:46:52 2006 +0000
19.2 +++ b/lemon/concept/path.h Wed Mar 01 13:19:28 2006 +0000
19.3 @@ -25,7 +25,7 @@
19.4 #ifndef LEMON_CONCEPT_PATH_H
19.5 #define LEMON_CONCEPT_PATH_H
19.6
19.7 -#include <lemon/invalid.h>
19.8 +#include <lemon/bits/invalid.h>
19.9 #include <lemon/concept_check.h>
19.10
19.11 namespace lemon {
20.1 --- a/lemon/concept/ugraph.h Wed Mar 01 12:46:52 2006 +0000
20.2 +++ b/lemon/concept/ugraph.h Wed Mar 01 13:19:28 2006 +0000
20.3 @@ -26,7 +26,7 @@
20.4
20.5 #include <lemon/concept/graph_component.h>
20.6 #include <lemon/concept/graph.h>
20.7 -#include <lemon/utility.h>
20.8 +#include <lemon/bits/utility.h>
20.9
20.10 namespace lemon {
20.11 namespace concept {
21.1 --- a/lemon/dag_shortest_path.h Wed Mar 01 12:46:52 2006 +0000
21.2 +++ b/lemon/dag_shortest_path.h Wed Mar 01 13:19:28 2006 +0000
21.3 @@ -25,7 +25,7 @@
21.4 ///
21.5
21.6 #include <lemon/list_graph.h>
21.7 -#include <lemon/invalid.h>
21.8 +#include <lemon/bits/invalid.h>
21.9 #include <lemon/error.h>
21.10 #include <lemon/maps.h>
21.11 #include <lemon/topology.h>
22.1 --- a/lemon/dfs.h Wed Mar 01 12:46:52 2006 +0000
22.2 +++ b/lemon/dfs.h Wed Mar 01 13:19:28 2006 +0000
22.3 @@ -25,7 +25,7 @@
22.4
22.5 #include <lemon/list_graph.h>
22.6 #include <lemon/graph_utils.h>
22.7 -#include <lemon/invalid.h>
22.8 +#include <lemon/bits/invalid.h>
22.9 #include <lemon/error.h>
22.10 #include <lemon/maps.h>
22.11
23.1 --- a/lemon/dijkstra.h Wed Mar 01 12:46:52 2006 +0000
23.2 +++ b/lemon/dijkstra.h Wed Mar 01 13:19:28 2006 +0000
23.3 @@ -27,7 +27,7 @@
23.4
23.5 #include <lemon/list_graph.h>
23.6 #include <lemon/bin_heap.h>
23.7 -#include <lemon/invalid.h>
23.8 +#include <lemon/bits/invalid.h>
23.9 #include <lemon/error.h>
23.10 #include <lemon/maps.h>
23.11
24.1 --- a/lemon/dimacs.h Wed Mar 01 12:46:52 2006 +0000
24.2 +++ b/lemon/dimacs.h Wed Mar 01 13:19:28 2006 +0000
24.3 @@ -23,7 +23,7 @@
24.4 #include <string>
24.5 #include <vector>
24.6 #include <lemon/maps.h>
24.7 -#include <lemon/invalid.h>
24.8 +#include <lemon/bits/invalid.h>
24.9
24.10 /// \ingroup dimacs_group
24.11 /// \file
25.1 --- a/lemon/euler.h Wed Mar 01 12:46:52 2006 +0000
25.2 +++ b/lemon/euler.h Wed Mar 01 13:19:28 2006 +0000
25.3 @@ -16,7 +16,7 @@
25.4 *
25.5 */
25.6
25.7 -#include<lemon/invalid.h>
25.8 +#include<lemon/bits/invalid.h>
25.9 #include<lemon/topology.h>
25.10 #include <list>
25.11
26.1 --- a/lemon/floyd_warshall.h Wed Mar 01 12:46:52 2006 +0000
26.2 +++ b/lemon/floyd_warshall.h Wed Mar 01 13:19:28 2006 +0000
26.3 @@ -26,7 +26,7 @@
26.4
26.5 #include <lemon/list_graph.h>
26.6 #include <lemon/graph_utils.h>
26.7 -#include <lemon/invalid.h>
26.8 +#include <lemon/bits/invalid.h>
26.9 #include <lemon/error.h>
26.10 #include <lemon/matrix_maps.h>
26.11 #include <lemon/maps.h>
27.1 --- a/lemon/fredman_tarjan.h Wed Mar 01 12:46:52 2006 +0000
27.2 +++ b/lemon/fredman_tarjan.h Wed Mar 01 13:19:28 2006 +0000
27.3 @@ -30,10 +30,10 @@
27.4 #include <lemon/smart_graph.h>
27.5 #include <lemon/fib_heap.h>
27.6 #include <lemon/radix_sort.h>
27.7 -#include <lemon/invalid.h>
27.8 +#include <lemon/bits/invalid.h>
27.9 #include <lemon/error.h>
27.10 #include <lemon/maps.h>
27.11 -#include <lemon/traits.h>
27.12 +#include <lemon/bits/traits.h>
27.13 #include <lemon/graph_utils.h>
27.14
27.15 #include <lemon/concept/ugraph.h>
28.1 --- a/lemon/full_graph.h Wed Mar 01 12:46:52 2006 +0000
28.2 +++ b/lemon/full_graph.h Wed Mar 01 13:19:28 2006 +0000
28.3 @@ -25,8 +25,8 @@
28.4 #include <lemon/bits/graph_extender.h>
28.5
28.6
28.7 -#include <lemon/invalid.h>
28.8 -#include <lemon/utility.h>
28.9 +#include <lemon/bits/invalid.h>
28.10 +#include <lemon/bits/utility.h>
28.11
28.12
28.13 ///\ingroup graphs
29.1 --- a/lemon/graph_adaptor.h Wed Mar 01 12:46:52 2006 +0000
29.2 +++ b/lemon/graph_adaptor.h Wed Mar 01 13:19:28 2006 +0000
29.3 @@ -27,7 +27,7 @@
29.4 ///
29.5 ///\author Marton Makai
29.6
29.7 -#include <lemon/invalid.h>
29.8 +#include <lemon/bits/invalid.h>
29.9 #include <lemon/maps.h>
29.10
29.11 #include <lemon/bits/graph_adaptor_extender.h>
30.1 --- a/lemon/graph_to_eps.h Wed Mar 01 12:46:52 2006 +0000
30.2 +++ b/lemon/graph_to_eps.h Wed Mar 01 13:19:28 2006 +0000
30.3 @@ -30,7 +30,7 @@
30.4 #include <ctime>
30.5 #include <cmath>
30.6
30.7 -#include<lemon/invalid.h>
30.8 +#include<lemon/bits/invalid.h>
30.9 #include<lemon/xy.h>
30.10 #include<lemon/maps.h>
30.11 #include<lemon/color.h>
31.1 --- a/lemon/graph_utils.h Wed Mar 01 12:46:52 2006 +0000
31.2 +++ b/lemon/graph_utils.h Wed Mar 01 13:19:28 2006 +0000
31.3 @@ -24,10 +24,10 @@
31.4 #include <map>
31.5 #include <cmath>
31.6
31.7 -#include <lemon/invalid.h>
31.8 -#include <lemon/utility.h>
31.9 +#include <lemon/bits/invalid.h>
31.10 +#include <lemon/bits/utility.h>
31.11 #include <lemon/maps.h>
31.12 -#include <lemon/traits.h>
31.13 +#include <lemon/bits/traits.h>
31.14
31.15 #include <lemon/bits/alteration_notifier.h>
31.16 #include <lemon/bits/default_map.h>
32.1 --- a/lemon/grid_ugraph.h Wed Mar 01 12:46:52 2006 +0000
32.2 +++ b/lemon/grid_ugraph.h Wed Mar 01 13:19:28 2006 +0000
32.3 @@ -20,8 +20,8 @@
32.4 #define GRID_UGRAPH_H
32.5
32.6 #include <iostream>
32.7 -#include <lemon/invalid.h>
32.8 -#include <lemon/utility.h>
32.9 +#include <lemon/bits/invalid.h>
32.10 +#include <lemon/bits/utility.h>
32.11
32.12 #include <lemon/bits/graph_extender.h>
32.13
33.1 --- a/lemon/hypercube_graph.h Wed Mar 01 12:46:52 2006 +0000
33.2 +++ b/lemon/hypercube_graph.h Wed Mar 01 13:19:28 2006 +0000
33.3 @@ -21,8 +21,8 @@
33.4
33.5 #include <iostream>
33.6 #include <vector>
33.7 -#include <lemon/invalid.h>
33.8 -#include <lemon/utility.h>
33.9 +#include <lemon/bits/invalid.h>
33.10 +#include <lemon/bits/utility.h>
33.11 #include <lemon/error.h>
33.12
33.13 #include <lemon/bits/graph_extender.h>
34.1 --- a/lemon/invalid.h Wed Mar 01 12:46:52 2006 +0000
34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
34.3 @@ -1,54 +0,0 @@
34.4 -/* -*- C++ -*-
34.5 - *
34.6 - * This file is a part of LEMON, a generic C++ optimization library
34.7 - *
34.8 - * Copyright (C) 2003-2006
34.9 - * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
34.10 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
34.11 - *
34.12 - * Permission to use, modify and distribute this software is granted
34.13 - * provided that this copyright notice appears in all copies. For
34.14 - * precise terms see the accompanying LICENSE file.
34.15 - *
34.16 - * This software is provided "AS IS" with no warranty of any kind,
34.17 - * express or implied, and with no claim as to its suitability for any
34.18 - * purpose.
34.19 - *
34.20 - */
34.21 -
34.22 -#ifndef LEMON_INVALID_H
34.23 -#define LEMON_INVALID_H
34.24 -
34.25 -///\file
34.26 -///\brief Definition of INVALID.
34.27 -
34.28 -namespace lemon {
34.29 -
34.30 - /// Dummy type to make it easier to make invalid iterators.
34.31 -
34.32 - /// See \ref INVALID, how to use it.
34.33 -
34.34 - struct Invalid {
34.35 - public:
34.36 - bool operator==(Invalid) { return true; }
34.37 - bool operator!=(Invalid) { return false; }
34.38 - bool operator< (Invalid) { return false; }
34.39 - };
34.40 -
34.41 - /// Invalid iterators.
34.42 -
34.43 - /// \ref Invalid is a global type that converts to each iterator
34.44 - /// in such a way that the value of the target iterator will be invalid.
34.45 -
34.46 - //const Invalid &INVALID = *(Invalid *)0;
34.47 -
34.48 -#ifdef LEMON_ONLY_TEMPLATES
34.49 - const Invalid INVALID = Invalid();
34.50 -#else
34.51 - extern const Invalid INVALID;
34.52 -#endif
34.53 -
34.54 -} //namespace lemon
34.55 -
34.56 -#endif
34.57 -
35.1 --- a/lemon/iterable_maps.h Wed Mar 01 12:46:52 2006 +0000
35.2 +++ b/lemon/iterable_maps.h Wed Mar 01 13:19:28 2006 +0000
35.3 @@ -16,8 +16,8 @@
35.4 *
35.5 */
35.6
35.7 -#include <lemon/traits.h>
35.8 -#include <lemon/invalid.h>
35.9 +#include <lemon/bits/traits.h>
35.10 +#include <lemon/bits/invalid.h>
35.11
35.12 #include <lemon/bits/default_map.h>
35.13
36.1 --- a/lemon/johnson.h Wed Mar 01 12:46:52 2006 +0000
36.2 +++ b/lemon/johnson.h Wed Mar 01 13:19:28 2006 +0000
36.3 @@ -28,7 +28,7 @@
36.4 #include <lemon/graph_utils.h>
36.5 #include <lemon/dijkstra.h>
36.6 #include <lemon/bellman_ford.h>
36.7 -#include <lemon/invalid.h>
36.8 +#include <lemon/bits/invalid.h>
36.9 #include <lemon/error.h>
36.10 #include <lemon/maps.h>
36.11 #include <lemon/matrix_maps.h>
37.1 --- a/lemon/kruskal.h Wed Mar 01 12:46:52 2006 +0000
37.2 +++ b/lemon/kruskal.h Wed Mar 01 13:19:28 2006 +0000
37.3 @@ -22,8 +22,8 @@
37.4 #include <algorithm>
37.5 #include <vector>
37.6 #include <lemon/unionfind.h>
37.7 -#include <lemon/utility.h>
37.8 -#include <lemon/traits.h>
37.9 +#include <lemon/bits/utility.h>
37.10 +#include <lemon/bits/traits.h>
37.11
37.12 /**
37.13 @defgroup spantree Minimum Cost Spanning Tree Algorithms
38.1 --- a/lemon/lemon_reader.h Wed Mar 01 12:46:52 2006 +0000
38.2 +++ b/lemon/lemon_reader.h Wed Mar 01 13:19:28 2006 +0000
38.3 @@ -35,7 +35,7 @@
38.4
38.5 #include <lemon/error.h>
38.6 #include <lemon/graph_utils.h>
38.7 -#include <lemon/utility.h>
38.8 +#include <lemon/bits/utility.h>
38.9 #include <lemon/bits/item_reader.h>
38.10
38.11 #include <lemon/xy.h>
39.1 --- a/lemon/lemon_writer.h Wed Mar 01 12:46:52 2006 +0000
39.2 +++ b/lemon/lemon_writer.h Wed Mar 01 13:19:28 2006 +0000
39.3 @@ -32,10 +32,10 @@
39.4 #include <memory>
39.5
39.6 #include <lemon/error.h>
39.7 -#include <lemon/invalid.h>
39.8 +#include <lemon/bits/invalid.h>
39.9 #include <lemon/graph_utils.h>
39.10 #include <lemon/bits/item_writer.h>
39.11 -#include <lemon/utility.h>
39.12 +#include <lemon/bits/utility.h>
39.13 #include <lemon/maps.h>
39.14 #include <lemon/xy.h>
39.15
40.1 --- a/lemon/lp_base.h Wed Mar 01 12:46:52 2006 +0000
40.2 +++ b/lemon/lp_base.h Wed Mar 01 13:19:28 2006 +0000
40.3 @@ -24,9 +24,9 @@
40.4 #include<limits>
40.5 #include<cmath>
40.6
40.7 -#include<lemon/utility.h>
40.8 +#include<lemon/bits/utility.h>
40.9 #include<lemon/error.h>
40.10 -#include<lemon/invalid.h>
40.11 +#include<lemon/bits/invalid.h>
40.12
40.13 ///\file
40.14 ///\brief The interface of the LP solver interface.
41.1 --- a/lemon/map_iterator.h Wed Mar 01 12:46:52 2006 +0000
41.2 +++ b/lemon/map_iterator.h Wed Mar 01 13:19:28 2006 +0000
41.3 @@ -19,8 +19,8 @@
41.4 #ifndef LEMON_MAP_ITERATOR_H
41.5 #define LEMON_MAP_ITERATOR_H
41.6
41.7 -#include <lemon/traits.h>
41.8 -#include <lemon/utility.h>
41.9 +#include <lemon/bits/traits.h>
41.10 +#include <lemon/bits/utility.h>
41.11
41.12 /// \ingroup gutils
41.13 /// \file
42.1 --- a/lemon/maps.h Wed Mar 01 12:46:52 2006 +0000
42.2 +++ b/lemon/maps.h Wed Mar 01 13:19:28 2006 +0000
42.3 @@ -21,8 +21,8 @@
42.4
42.5 #include <iterator>
42.6
42.7 -#include <lemon/utility.h>
42.8 -#include <lemon/traits.h>
42.9 +#include <lemon/bits/utility.h>
42.10 +#include <lemon/bits/traits.h>
42.11
42.12 ///\file
42.13 ///\ingroup maps
43.1 --- a/lemon/matrix_maps.h Wed Mar 01 12:46:52 2006 +0000
43.2 +++ b/lemon/matrix_maps.h Wed Mar 01 13:19:28 2006 +0000
43.3 @@ -21,7 +21,7 @@
43.4
43.5
43.6 #include <vector>
43.7 -#include <lemon/utility.h>
43.8 +#include <lemon/bits/utility.h>
43.9 #include <lemon/maps.h>
43.10
43.11
44.1 --- a/lemon/max_matching.h Wed Mar 01 12:46:52 2006 +0000
44.2 +++ b/lemon/max_matching.h Wed Mar 01 13:19:28 2006 +0000
44.3 @@ -20,7 +20,7 @@
44.4 #define LEMON_MAX_MATCHING_H
44.5
44.6 #include <queue>
44.7 -#include <lemon/invalid.h>
44.8 +#include <lemon/bits/invalid.h>
44.9 #include <lemon/unionfind.h>
44.10 #include <lemon/graph_utils.h>
44.11
45.1 --- a/lemon/min_cut.h Wed Mar 01 12:46:52 2006 +0000
45.2 +++ b/lemon/min_cut.h Wed Mar 01 13:19:28 2006 +0000
45.3 @@ -26,7 +26,7 @@
45.4 #include <lemon/bin_heap.h>
45.5 #include <lemon/linear_heap.h>
45.6
45.7 -#include <lemon/invalid.h>
45.8 +#include <lemon/bits/invalid.h>
45.9 #include <lemon/error.h>
45.10 #include <lemon/maps.h>
45.11
46.1 --- a/lemon/path.h Wed Mar 01 12:46:52 2006 +0000
46.2 +++ b/lemon/path.h Wed Mar 01 13:19:28 2006 +0000
46.3 @@ -45,7 +45,7 @@
46.4 #include <vector>
46.5 #include <algorithm>
46.6
46.7 -#include <lemon/invalid.h>
46.8 +#include <lemon/bits/invalid.h>
46.9
46.10 namespace lemon {
46.11
47.1 --- a/lemon/preflow.h Wed Mar 01 12:46:52 2006 +0000
47.2 +++ b/lemon/preflow.h Wed Mar 01 13:19:28 2006 +0000
47.3 @@ -23,7 +23,7 @@
47.4 #include <queue>
47.5
47.6 #include <lemon/error.h>
47.7 -#include <lemon/invalid.h>
47.8 +#include <lemon/bits/invalid.h>
47.9 #include <lemon/tolerance.h>
47.10 #include <lemon/maps.h>
47.11 #include <lemon/graph_utils.h>
48.1 --- a/lemon/prim.h Wed Mar 01 12:46:52 2006 +0000
48.2 +++ b/lemon/prim.h Wed Mar 01 13:19:28 2006 +0000
48.3 @@ -25,10 +25,10 @@
48.4
48.5 #include <lemon/list_graph.h>
48.6 #include <lemon/bin_heap.h>
48.7 -#include <lemon/invalid.h>
48.8 +#include <lemon/bits/invalid.h>
48.9 #include <lemon/error.h>
48.10 #include <lemon/maps.h>
48.11 -#include <lemon/traits.h>
48.12 +#include <lemon/bits/traits.h>
48.13
48.14 #include <lemon/concept/ugraph.h>
48.15
49.1 --- a/lemon/smart_graph.h Wed Mar 01 12:46:52 2006 +0000
49.2 +++ b/lemon/smart_graph.h Wed Mar 01 13:19:28 2006 +0000
49.3 @@ -25,11 +25,11 @@
49.4
49.5 #include <vector>
49.6
49.7 -#include <lemon/invalid.h>
49.8 +#include <lemon/bits/invalid.h>
49.9
49.10 #include <lemon/bits/graph_extender.h>
49.11
49.12 -#include <lemon/utility.h>
49.13 +#include <lemon/bits/utility.h>
49.14 #include <lemon/error.h>
49.15
49.16 #include <lemon/bits/graph_extender.h>
50.1 --- a/lemon/traits.h Wed Mar 01 12:46:52 2006 +0000
50.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
50.3 @@ -1,300 +0,0 @@
50.4 -/* -*- C++ -*-
50.5 - *
50.6 - * This file is a part of LEMON, a generic C++ optimization library
50.7 - *
50.8 - * Copyright (C) 2003-2006
50.9 - * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
50.10 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
50.11 - *
50.12 - * Permission to use, modify and distribute this software is granted
50.13 - * provided that this copyright notice appears in all copies. For
50.14 - * precise terms see the accompanying LICENSE file.
50.15 - *
50.16 - * This software is provided "AS IS" with no warranty of any kind,
50.17 - * express or implied, and with no claim as to its suitability for any
50.18 - * purpose.
50.19 - *
50.20 - */
50.21 -
50.22 -#ifndef LEMON_TRAITS_H
50.23 -#define LEMON_TRAITS_H
50.24 -
50.25 -#include <lemon/utility.h>
50.26 -
50.27 -///\file
50.28 -///\brief Traits for graphs and maps
50.29 -///
50.30 -
50.31 -namespace lemon {
50.32 - template <typename _Graph, typename _Item>
50.33 - class ItemSetTraits {};
50.34 -
50.35 -
50.36 - template <typename Graph, typename Enable = void>
50.37 - struct NodeNotifierIndicator {
50.38 - typedef InvalidType Type;
50.39 - };
50.40 - template <typename Graph>
50.41 - struct NodeNotifierIndicator<
50.42 - Graph,
50.43 - typename enable_if<typename Graph::NodeNotifier::Notifier, void>::type
50.44 - > {
50.45 - typedef typename Graph::NodeNotifier Type;
50.46 - };
50.47 -
50.48 - template <typename _Graph>
50.49 - class ItemSetTraits<_Graph, typename _Graph::Node> {
50.50 - public:
50.51 -
50.52 - typedef _Graph Graph;
50.53 -
50.54 - typedef typename Graph::Node Item;
50.55 - typedef typename Graph::NodeIt ItemIt;
50.56 -
50.57 - typedef typename NodeNotifierIndicator<Graph>::Type ItemNotifier;
50.58 -
50.59 - template <typename _Value>
50.60 - class Map : public Graph::template NodeMap<_Value> {
50.61 - public:
50.62 - typedef typename Graph::template NodeMap<_Value> Parent;
50.63 - typedef typename Parent::Value Value;
50.64 -
50.65 - Map(const Graph& _graph) : Parent(_graph) {}
50.66 - Map(const Graph& _graph, const Value& _value)
50.67 - : Parent(_graph, _value) {}
50.68 -
50.69 - };
50.70 -
50.71 - };
50.72 -
50.73 - template <typename Graph, typename Enable = void>
50.74 - struct EdgeNotifierIndicator {
50.75 - typedef InvalidType Type;
50.76 - };
50.77 - template <typename Graph>
50.78 - struct EdgeNotifierIndicator<
50.79 - Graph,
50.80 - typename enable_if<typename Graph::EdgeNotifier::Notifier, void>::type
50.81 - > {
50.82 - typedef typename Graph::EdgeNotifier Type;
50.83 - };
50.84 -
50.85 - template <typename _Graph>
50.86 - class ItemSetTraits<_Graph, typename _Graph::Edge> {
50.87 - public:
50.88 -
50.89 - typedef _Graph Graph;
50.90 -
50.91 - typedef typename Graph::Edge Item;
50.92 - typedef typename Graph::EdgeIt ItemIt;
50.93 -
50.94 - typedef typename EdgeNotifierIndicator<Graph>::Type ItemNotifier;
50.95 -
50.96 - template <typename _Value>
50.97 - class Map : public Graph::template EdgeMap<_Value> {
50.98 - public:
50.99 - typedef typename Graph::template EdgeMap<_Value> Parent;
50.100 - typedef typename Parent::Value Value;
50.101 -
50.102 - Map(const Graph& _graph) : Parent(_graph) {}
50.103 - Map(const Graph& _graph, const Value& _value)
50.104 - : Parent(_graph, _value) {}
50.105 - };
50.106 -
50.107 - };
50.108 -
50.109 - template <typename Graph, typename Enable = void>
50.110 - struct UEdgeNotifierIndicator {
50.111 - typedef InvalidType Type;
50.112 - };
50.113 - template <typename Graph>
50.114 - struct UEdgeNotifierIndicator<
50.115 - Graph,
50.116 - typename enable_if<typename Graph::UEdgeNotifier::Notifier, void>::type
50.117 - > {
50.118 - typedef typename Graph::UEdgeNotifier Type;
50.119 - };
50.120 -
50.121 - template <typename _Graph>
50.122 - class ItemSetTraits<_Graph, typename _Graph::UEdge> {
50.123 - public:
50.124 -
50.125 - typedef _Graph Graph;
50.126 -
50.127 - typedef typename Graph::UEdge Item;
50.128 - typedef typename Graph::UEdgeIt ItemIt;
50.129 -
50.130 - typedef typename UEdgeNotifierIndicator<Graph>::Type ItemNotifier;
50.131 -
50.132 - template <typename _Value>
50.133 - class Map : public Graph::template UEdgeMap<_Value> {
50.134 - public:
50.135 - typedef typename Graph::template UEdgeMap<_Value> Parent;
50.136 - typedef typename Parent::Value Value;
50.137 -
50.138 - Map(const Graph& _graph) : Parent(_graph) {}
50.139 - Map(const Graph& _graph, const Value& _value)
50.140 - : Parent(_graph, _value) {}
50.141 - };
50.142 -
50.143 - };
50.144 -
50.145 - template <typename Graph, typename Enable = void>
50.146 - struct ANodeNotifierIndicator {
50.147 - typedef InvalidType Type;
50.148 - };
50.149 - template <typename Graph>
50.150 - struct ANodeNotifierIndicator<
50.151 - Graph,
50.152 - typename enable_if<typename Graph::ANodeNotifier::Notifier, void>::type
50.153 - > {
50.154 - typedef typename Graph::ANodeNotifier Type;
50.155 - };
50.156 -
50.157 - template <typename _Graph>
50.158 - class ItemSetTraits<_Graph, typename _Graph::ANode> {
50.159 - public:
50.160 -
50.161 - typedef _Graph Graph;
50.162 -
50.163 - typedef typename Graph::ANode Item;
50.164 - typedef typename Graph::ANodeIt ItemIt;
50.165 -
50.166 - typedef typename ANodeNotifierIndicator<Graph>::Type ItemNotifier;
50.167 -
50.168 - template <typename _Value>
50.169 - class Map : public Graph::template ANodeMap<_Value> {
50.170 - public:
50.171 - typedef typename Graph::template ANodeMap<_Value> Parent;
50.172 - typedef typename Parent::Value Value;
50.173 -
50.174 - Map(const Graph& _graph) : Parent(_graph) {}
50.175 - Map(const Graph& _graph, const Value& _value)
50.176 - : Parent(_graph, _value) {}
50.177 - };
50.178 -
50.179 - };
50.180 -
50.181 - template <typename Graph, typename Enable = void>
50.182 - struct BNodeNotifierIndicator {
50.183 - typedef InvalidType Type;
50.184 - };
50.185 - template <typename Graph>
50.186 - struct BNodeNotifierIndicator<
50.187 - Graph,
50.188 - typename enable_if<typename Graph::BNodeNotifier::Notifier, void>::type
50.189 - > {
50.190 - typedef typename Graph::BNodeNotifier Type;
50.191 - };
50.192 -
50.193 - template <typename _Graph>
50.194 - class ItemSetTraits<_Graph, typename _Graph::BNode> {
50.195 - public:
50.196 -
50.197 - typedef _Graph Graph;
50.198 -
50.199 - typedef typename Graph::BNode Item;
50.200 - typedef typename Graph::BNodeIt ItemIt;
50.201 -
50.202 - typedef typename BNodeNotifierIndicator<Graph>::Type ItemNotifier;
50.203 -
50.204 - template <typename _Value>
50.205 - class Map : public Graph::template BNodeMap<_Value> {
50.206 - public:
50.207 - typedef typename Graph::template BNodeMap<_Value> Parent;
50.208 - typedef typename Parent::Value Value;
50.209 -
50.210 - Map(const Graph& _graph) : Parent(_graph) {}
50.211 - Map(const Graph& _graph, const Value& _value)
50.212 - : Parent(_graph, _value) {}
50.213 - };
50.214 -
50.215 - };
50.216 -
50.217 -
50.218 - template <typename Map, typename Enable = void>
50.219 - struct MapTraits {
50.220 - typedef False ReferenceMapTag;
50.221 -
50.222 - typedef typename Map::Key Key;
50.223 - typedef typename Map::Value Value;
50.224 -
50.225 - typedef const Value ConstReturnValue;
50.226 - typedef const Value ReturnValue;
50.227 - };
50.228 -
50.229 - template <typename Map>
50.230 - struct MapTraits<
50.231 - Map, typename enable_if<typename Map::ReferenceMapTag, void>::type >
50.232 - {
50.233 - typedef True ReferenceMapTag;
50.234 -
50.235 - typedef typename Map::Key Key;
50.236 - typedef typename Map::Value Value;
50.237 -
50.238 - typedef typename Map::ConstReference ConstReturnValue;
50.239 - typedef typename Map::Reference ReturnValue;
50.240 -
50.241 - typedef typename Map::ConstReference ConstReference;
50.242 - typedef typename Map::Reference Reference;
50.243 - };
50.244 -
50.245 - // Indicators for the tags
50.246 -
50.247 - template <typename Graph, typename Enable = void>
50.248 - struct NodeNumTagIndicator {
50.249 - static const bool value = false;
50.250 - };
50.251 -
50.252 - template <typename Graph>
50.253 - struct NodeNumTagIndicator<
50.254 - Graph,
50.255 - typename enable_if<typename Graph::NodeNumTag, void>::type
50.256 - > {
50.257 - static const bool value = true;
50.258 - };
50.259 -
50.260 - template <typename Graph, typename Enable = void>
50.261 - struct EdgeNumTagIndicator {
50.262 - static const bool value = false;
50.263 - };
50.264 -
50.265 - template <typename Graph>
50.266 - struct EdgeNumTagIndicator<
50.267 - Graph,
50.268 - typename enable_if<typename Graph::EdgeNumTag, void>::type
50.269 - > {
50.270 - static const bool value = true;
50.271 - };
50.272 -
50.273 - template <typename Graph, typename Enable = void>
50.274 - struct FindEdgeTagIndicator {
50.275 - static const bool value = false;
50.276 - };
50.277 -
50.278 - template <typename Graph>
50.279 - struct FindEdgeTagIndicator<
50.280 - Graph,
50.281 - typename enable_if<typename Graph::FindEdgeTag, void>::type
50.282 - > {
50.283 - static const bool value = true;
50.284 - };
50.285 -
50.286 - template <typename Graph, typename Enable = void>
50.287 - struct UndirectedTagIndicator {
50.288 - static const bool value = false;
50.289 - };
50.290 -
50.291 - template <typename Graph>
50.292 - struct UndirectedTagIndicator<
50.293 - Graph,
50.294 - typename enable_if<typename Graph::UndirectedTag, void>::type
50.295 - > {
50.296 - static const bool value = true;
50.297 - };
50.298 -
50.299 -
50.300 -
50.301 -}
50.302 -
50.303 -#endif // LEMON_MAPS_H
51.1 --- a/lemon/ugraph_adaptor.h Wed Mar 01 12:46:52 2006 +0000
51.2 +++ b/lemon/ugraph_adaptor.h Wed Mar 01 13:19:28 2006 +0000
51.3 @@ -27,12 +27,12 @@
51.4 ///
51.5 ///\author Balazs Dezso
51.6
51.7 -#include <lemon/invalid.h>
51.8 +#include <lemon/bits/invalid.h>
51.9 #include <lemon/maps.h>
51.10
51.11 #include <lemon/bits/graph_adaptor_extender.h>
51.12
51.13 -#include <lemon/traits.h>
51.14 +#include <lemon/bits/traits.h>
51.15
51.16 #include <iostream>
51.17
52.1 --- a/lemon/unionfind.h Wed Mar 01 12:46:52 2006 +0000
52.2 +++ b/lemon/unionfind.h Wed Mar 01 13:19:28 2006 +0000
52.3 @@ -29,7 +29,7 @@
52.4 #include <utility>
52.5 #include <algorithm>
52.6
52.7 -#include <lemon/invalid.h>
52.8 +#include <lemon/bits/invalid.h>
52.9
52.10 namespace lemon {
52.11
53.1 --- a/lemon/utility.h Wed Mar 01 12:46:52 2006 +0000
53.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
53.3 @@ -1,137 +0,0 @@
53.4 -/* -*- C++ -*-
53.5 - *
53.6 - * This file is a part of LEMON, a generic C++ optimization library
53.7 - *
53.8 - * Copyright (C) 2003-2006
53.9 - * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
53.10 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
53.11 - *
53.12 - * Permission to use, modify and distribute this software is granted
53.13 - * provided that this copyright notice appears in all copies. For
53.14 - * precise terms see the accompanying LICENSE file.
53.15 - *
53.16 - * This software is provided "AS IS" with no warranty of any kind,
53.17 - * express or implied, and with no claim as to its suitability for any
53.18 - * purpose.
53.19 - *
53.20 - */
53.21 -
53.22 -// This file contains a modified version of the enable_if library from BOOST.
53.23 -// See the appropriate copyright notice below.
53.24 -
53.25 -// Boost enable_if library
53.26 -
53.27 -// Copyright 2003 © The Trustees of Indiana University.
53.28 -
53.29 -// Use, modification, and distribution is subject to the Boost Software
53.30 -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
53.31 -// http://www.boost.org/LICENSE_1_0.txt)
53.32 -
53.33 -// Authors: Jaakko Järvi (jajarvi at osl.iu.edu)
53.34 -// Jeremiah Willcock (jewillco at osl.iu.edu)
53.35 -// Andrew Lumsdaine (lums at osl.iu.edu)
53.36 -
53.37 -
53.38 -#ifndef LEMON_UTILITY_H
53.39 -#define LEMON_UTILITY_H
53.40 -
53.41 -///\file
53.42 -///\brief Miscellaneous basic utilities
53.43 -///
53.44 -///\todo Please rethink the organisation of the basic files like this.
53.45 -///E.g. this file might be merged with invalid.h.
53.46 -
53.47 -
53.48 -namespace lemon
53.49 -{
53.50 -
53.51 - /// Basic type for defining "tags". A "YES" condition for \c enable_if.
53.52 -
53.53 - /// Basic type for defining "tags". A "YES" condition for \c enable_if.
53.54 - ///
53.55 - ///\sa False
53.56 - ///
53.57 - /// \todo This should go to a separate "basic_types.h" (or something)
53.58 - /// file.
53.59 - struct True {
53.60 - ///\e
53.61 - static const bool value = true;
53.62 - };
53.63 -
53.64 - /// Basic type for defining "tags". A "NO" condition for \c enable_if.
53.65 -
53.66 - /// Basic type for defining "tags". A "NO" condition for \c enable_if.
53.67 - ///
53.68 - ///\sa True
53.69 - struct False {
53.70 - ///\e
53.71 - static const bool value = false;
53.72 - };
53.73 -
53.74 -
53.75 - class InvalidType {
53.76 - private:
53.77 - InvalidType();
53.78 - };
53.79 -
53.80 -
53.81 - template <typename T>
53.82 - struct Wrap {
53.83 - const T &value;
53.84 - Wrap(const T &t) : value(t) {}
53.85 - };
53.86 -
53.87 - /**************** dummy class to avoid ambiguity ****************/
53.88 -
53.89 - template<int T> struct dummy { dummy(int) {} };
53.90 -
53.91 - /**************** enable_if from BOOST ****************/
53.92 -
53.93 - template <bool B, class T = void>
53.94 - struct enable_if_c {
53.95 - typedef T type;
53.96 - };
53.97 -
53.98 - template <class T>
53.99 - struct enable_if_c<false, T> {};
53.100 -
53.101 - template <class Cond, class T = void>
53.102 - struct enable_if : public enable_if_c<Cond::value, T> {};
53.103 -
53.104 - template <bool B, class T>
53.105 - struct lazy_enable_if_c {
53.106 - typedef typename T::type type;
53.107 - };
53.108 -
53.109 - template <class T>
53.110 - struct lazy_enable_if_c<false, T> {};
53.111 -
53.112 - template <class Cond, class T>
53.113 - struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {};
53.114 -
53.115 -
53.116 - template <bool B, class T = void>
53.117 - struct disable_if_c {
53.118 - typedef T type;
53.119 - };
53.120 -
53.121 - template <class T>
53.122 - struct disable_if_c<true, T> {};
53.123 -
53.124 - template <class Cond, class T = void>
53.125 - struct disable_if : public disable_if_c<Cond::value, T> {};
53.126 -
53.127 - template <bool B, class T>
53.128 - struct lazy_disable_if_c {
53.129 - typedef typename T::type type;
53.130 - };
53.131 -
53.132 - template <class T>
53.133 - struct lazy_disable_if_c<true, T> {};
53.134 -
53.135 - template <class Cond, class T>
53.136 - struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {};
53.137 -
53.138 -} // namespace lemon
53.139 -
53.140 -#endif
54.1 --- a/lemon/xy.h Wed Mar 01 12:46:52 2006 +0000
54.2 +++ b/lemon/xy.h Wed Mar 01 13:19:28 2006 +0000
54.3 @@ -20,7 +20,7 @@
54.4 #define LEMON_XY_H
54.5
54.6 #include <iostream>
54.7 -#include <lemon/utility.h>
54.8 +#include <lemon/bits/utility.h>
54.9
54.10 ///\ingroup misc
54.11 ///\file
55.1 --- a/test/max_matching_test.cc Wed Mar 01 12:46:52 2006 +0000
55.2 +++ b/test/max_matching_test.cc Wed Mar 01 13:19:28 2006 +0000
55.3 @@ -23,7 +23,6 @@
55.4 #include <cstdlib>
55.5
55.6 #include "test_tools.h"
55.7 -#include <lemon/invalid.h>
55.8 #include <lemon/list_graph.h>
55.9 #include <lemon/max_matching.h>
55.10
56.1 --- a/test/test_tools.h Wed Mar 01 12:46:52 2006 +0000
56.2 +++ b/test/test_tools.h Wed Mar 01 13:19:28 2006 +0000
56.3 @@ -25,8 +25,8 @@
56.4 #include <cstdlib>
56.5 #include <ctime>
56.6
56.7 -#include <lemon/invalid.h>
56.8 #include <lemon/concept_check.h>
56.9 +#include <lemon/concept/graph.h>
56.10
56.11 using namespace lemon;
56.12