1.1 --- a/demo/topology_demo.cc Thu Jan 26 15:42:13 2006 +0000
1.2 +++ b/demo/topology_demo.cc Thu Jan 26 16:24:40 2006 +0000
1.3 @@ -59,7 +59,7 @@
1.4 Graph::NodeMap<int> compMap(graph);
1.5 connectedComponents(graph, compMap);
1.6
1.7 - graphToEps(graph, "connected_components.eps").u().
1.8 + graphToEps(graph, "connected_components.eps").undirected().
1.9 coords(coords).scaleToA4().enableParallel().
1.10 parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
1.11 nodeColors(composeMap(colorSet, compMap)).run();
1.12 @@ -115,7 +115,8 @@
1.13 Graph::NodeMap<bool> cutMap(graph);
1.14 biNodeConnectedComponents(graph, compMap);
1.15 biNodeConnectedCutNodes(graph, cutMap);
1.16 - graphToEps(graph, "bi_node_connected_components.eps").u().
1.17 +
1.18 + graphToEps(graph, "bi_node_connected_components.eps").undirected().
1.19 coords(coords).scaleToA4().enableParallel().
1.20 parEdgeDist(20.0).edgeWidthScale(5.0).nodeScale(20.0).
1.21 edgeColors(composeMap(colorSet, compMap)).
1.22 @@ -145,7 +146,7 @@
1.23 biEdgeConnectedComponents(graph, compMap);
1.24 biEdgeConnectedCutEdges(graph, cutMap);
1.25
1.26 - graphToEps(graph, "bi_edge_connected_components.eps").u().
1.27 + graphToEps(graph, "bi_edge_connected_components.eps").undirected().
1.28 coords(coords).scaleToA4().enableParallel().
1.29 parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
1.30 nodeColors(composeMap(colorSet, compMap)).
1.31 @@ -172,7 +173,7 @@
1.32 Graph::NodeMap<bool> partMap(graph);
1.33 bipartitePartitions(graph, partMap);
1.34
1.35 - graphToEps(graph, "bipartite_partitions.eps").u().
1.36 + graphToEps(graph, "bipartite_partitions.eps").undirected().
1.37 coords(coords).scaleToA4().enableParallel().
1.38 parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
1.39 nodeColors(composeMap(functorMap(&color), partMap)).run();
2.1 --- a/lemon/Makefile.am Thu Jan 26 15:42:13 2006 +0000
2.2 +++ b/lemon/Makefile.am Thu Jan 26 16:24:40 2006 +0000
2.3 @@ -88,6 +88,7 @@
2.4 bits/static_map.h \
2.5 bits/item_reader.h \
2.6 bits/item_writer.h \
2.7 + concept/bpugraph.h \
2.8 concept/graph.h \
2.9 concept/graph_component.h \
2.10 concept/ugraph.h \
3.1 --- a/lemon/bits/alteration_notifier.h Thu Jan 26 15:42:13 2006 +0000
3.2 +++ b/lemon/bits/alteration_notifier.h Thu Jan 26 16:24:40 2006 +0000
3.3 @@ -2,7 +2,7 @@
3.4 * lemon/notifier.h - Part of LEMON, a generic C++ optimization library
3.5 *
3.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
3.7 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
3.8 + * (Egervary Research Groin on Combinatorial Optimization, EGRES).
3.9 *
3.10 * Permission to use, modify and distribute this software is granted
3.11 * provided that this copyright notice appears in all copies. For
3.12 @@ -20,13 +20,13 @@
3.13 #include <vector>
3.14 #include <algorithm>
3.15
3.16 -///\ingroup graphmapfactory
3.17 +///\ingroin graphmapfactory
3.18 ///\file
3.19 ///\brief Observer registry for graph alteration observers.
3.20
3.21 namespace lemon {
3.22
3.23 - /// \addtogroup graphmapfactory
3.24 + /// \addtogroin graphmapfactory
3.25 /// @{
3.26
3.27 /// \brief Registry class to register objects observes alterations in
3.28 @@ -501,30 +501,30 @@
3.29
3.30
3.31 template <typename _Base>
3.32 - class AlterableUBipartiteGraphExtender : public _Base {
3.33 + class AlterableBpUGraphExtender : public _Base {
3.34 public:
3.35
3.36 typedef _Base Parent;
3.37 - typedef AlterableUBipartiteGraphExtender Graph;
3.38 + typedef AlterableBpUGraphExtender Graph;
3.39
3.40 typedef typename Parent::Node Node;
3.41 - typedef typename Parent::LowerNode LowerNode;
3.42 - typedef typename Parent::UpperNode UpperNode;
3.43 + typedef typename Parent::BNode BNode;
3.44 + typedef typename Parent::ANode ANode;
3.45 typedef typename Parent::Edge Edge;
3.46 typedef typename Parent::UEdge UEdge;
3.47
3.48
3.49 typedef AlterationNotifier<Node> NodeNotifier;
3.50 - typedef AlterationNotifier<LowerNode> LowerNodeNotifier;
3.51 - typedef AlterationNotifier<UpperNode> UpperNodeNotifier;
3.52 + typedef AlterationNotifier<BNode> BNodeNotifier;
3.53 + typedef AlterationNotifier<ANode> ANodeNotifier;
3.54 typedef AlterationNotifier<Edge> EdgeNotifier;
3.55 typedef AlterationNotifier<UEdge> UEdgeNotifier;
3.56
3.57 protected:
3.58
3.59 mutable NodeNotifier nodeNotifier;
3.60 - mutable LowerNodeNotifier lowerNodeNotifier;
3.61 - mutable UpperNodeNotifier upperNodeNotifier;
3.62 + mutable BNodeNotifier bNodeNotifier;
3.63 + mutable ANodeNotifier aNodeNotifier;
3.64 mutable EdgeNotifier edgeNotifier;
3.65 mutable UEdgeNotifier uEdgeNotifier;
3.66
3.67 @@ -534,12 +534,12 @@
3.68 return nodeNotifier;
3.69 }
3.70
3.71 - LowerNodeNotifier& getNotifier(LowerNode) const {
3.72 - return lowerNodeNotifier;
3.73 + BNodeNotifier& getNotifier(BNode) const {
3.74 + return bNodeNotifier;
3.75 }
3.76
3.77 - UpperNodeNotifier& getNotifier(UpperNode) const {
3.78 - return upperNodeNotifier;
3.79 + ANodeNotifier& getNotifier(ANode) const {
3.80 + return aNodeNotifier;
3.81 }
3.82
3.83 EdgeNotifier& getNotifier(Edge) const {
3.84 @@ -550,10 +550,10 @@
3.85 return uEdgeNotifier;
3.86 }
3.87
3.88 - ~AlterableUBipartiteGraphExtender() {
3.89 + ~AlterableBpUGraphExtender() {
3.90 nodeNotifier.clear();
3.91 - lowerNodeNotifier.clear();
3.92 - upperNodeNotifier.clear();
3.93 + bNodeNotifier.clear();
3.94 + aNodeNotifier.clear();
3.95 edgeNotifier.clear();
3.96 uEdgeNotifier.clear();
3.97 }
4.1 --- a/lemon/bits/array_map.h Thu Jan 26 15:42:13 2006 +0000
4.2 +++ b/lemon/bits/array_map.h Thu Jan 26 16:24:40 2006 +0000
4.3 @@ -2,7 +2,7 @@
4.4 * lemon/bits/array_map.h - Part of LEMON, a generic C++ optimization library
4.5 *
4.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
4.7 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
4.8 + * (Egervary Research Groin on Combinatorial Optimization, EGRES).
4.9 *
4.10 * Permission to use, modify and distribute this software is granted
4.11 * provided that this copyright notice appears in all copies. For
4.12 @@ -23,19 +23,19 @@
4.13 #include <lemon/concept_check.h>
4.14 #include <lemon/concept/maps.h>
4.15
4.16 -/// \ingroup graphmapfactory
4.17 +/// \ingroin graphmapfactory
4.18 /// \file
4.19 /// \brief Graph maps that construct and destruct
4.20 /// their elements dynamically.
4.21
4.22 namespace lemon {
4.23
4.24 - /// \ingroup graphmapfactory
4.25 + /// \ingroin graphmapfactory
4.26 ///
4.27 /// \brief Graph map based on the array storage.
4.28 ///
4.29 /// The ArrayMap template class is graph map structure what
4.30 - /// automatically updates the map when a key is added to or erased from
4.31 + /// automatically indates the map when a key is added to or erased from
4.32 /// the map. This map uses the allocators to implement
4.33 /// the container functionality.
4.34 ///
5.1 --- a/lemon/bits/clearable_graph_extender.h Thu Jan 26 15:42:13 2006 +0000
5.2 +++ b/lemon/bits/clearable_graph_extender.h Thu Jan 26 16:24:40 2006 +0000
5.3 @@ -79,15 +79,15 @@
5.4
5.5
5.6 template <typename _Base>
5.7 - class ClearableUBipartiteGraphExtender : public _Base {
5.8 + class ClearableBpUGraphExtender : public _Base {
5.9 public:
5.10
5.11 typedef _Base Parent;
5.12 - typedef ClearableUBipartiteGraphExtender Graph;
5.13 + typedef ClearableBpUGraphExtender Graph;
5.14
5.15 typedef typename Parent::Node Node;
5.16 - typedef typename Parent::LowerNode LowerNode;
5.17 - typedef typename Parent::UpperNode UpperNode;
5.18 + typedef typename Parent::BNode BNode;
5.19 + typedef typename Parent::ANode ANode;
5.20 typedef typename Parent::Edge Edge;
5.21 typedef typename Parent::UEdge UEdge;
5.22
5.23 @@ -95,8 +95,8 @@
5.24 Parent::getNotifier(Edge()).clear();
5.25 Parent::getNotifier(UEdge()).clear();
5.26 Parent::getNotifier(Node()).clear();
5.27 - Parent::getNotifier(LowerNode()).clear();
5.28 - Parent::getNotifier(UpperNode()).clear();
5.29 + Parent::getNotifier(BNode()).clear();
5.30 + Parent::getNotifier(ANode()).clear();
5.31 Parent::clear();
5.32 }
5.33
6.1 --- a/lemon/bits/default_map.h Thu Jan 26 15:42:13 2006 +0000
6.2 +++ b/lemon/bits/default_map.h Thu Jan 26 16:24:40 2006 +0000
6.3 @@ -2,7 +2,7 @@
6.4 * lemon/default_map.h - Part of LEMON, a generic C++ optimization library
6.5 *
6.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
6.7 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
6.8 + * (Egervary Research Groin on Combinatorial Optimization, EGRES).
6.9 *
6.10 * Permission to use, modify and distribute this software is granted
6.11 * provided that this copyright notice appears in all copies. For
6.12 @@ -21,7 +21,7 @@
6.13 #include <lemon/bits/array_map.h>
6.14 #include <lemon/bits/vector_map.h>
6.15
6.16 -///\ingroup graphmapfactory
6.17 +///\ingroin graphmapfactory
6.18 ///\file
6.19 ///\brief Graph maps that construct and destruct
6.20 ///their elements dynamically.
6.21 @@ -352,33 +352,33 @@
6.22
6.23
6.24 template <typename _Base>
6.25 - class MappableUBipartiteGraphExtender : public _Base {
6.26 + class MappableBpUGraphExtender : public _Base {
6.27 public:
6.28
6.29 typedef _Base Parent;
6.30 - typedef MappableUBipartiteGraphExtender Graph;
6.31 + typedef MappableBpUGraphExtender Graph;
6.32
6.33 typedef typename Parent::Node Node;
6.34 - typedef typename Parent::UpperNode UpperNode;
6.35 - typedef typename Parent::LowerNode LowerNode;
6.36 + typedef typename Parent::ANode ANode;
6.37 + typedef typename Parent::BNode BNode;
6.38 typedef typename Parent::Edge Edge;
6.39 typedef typename Parent::UEdge UEdge;
6.40
6.41 template <typename _Value>
6.42 - class UpperNodeMap
6.43 - : public IterableMapExtender<DefaultMap<Graph, UpperNode, _Value> > {
6.44 + class ANodeMap
6.45 + : public IterableMapExtender<DefaultMap<Graph, ANode, _Value> > {
6.46 public:
6.47 - typedef MappableUBipartiteGraphExtender Graph;
6.48 - typedef IterableMapExtender<DefaultMap<Graph, UpperNode, _Value> >
6.49 + typedef MappableBpUGraphExtender Graph;
6.50 + typedef IterableMapExtender<DefaultMap<Graph, ANode, _Value> >
6.51 Parent;
6.52
6.53 - UpperNodeMap(const Graph& _g)
6.54 + ANodeMap(const Graph& _g)
6.55 : Parent(_g) {}
6.56 - UpperNodeMap(const Graph& _g, const _Value& _v)
6.57 + ANodeMap(const Graph& _g, const _Value& _v)
6.58 : Parent(_g, _v) {}
6.59
6.60 - UpperNodeMap& operator=(const UpperNodeMap& cmap) {
6.61 - return operator=<UpperNodeMap>(cmap);
6.62 + ANodeMap& operator=(const ANodeMap& cmap) {
6.63 + return operator=<ANodeMap>(cmap);
6.64 }
6.65
6.66
6.67 @@ -386,13 +386,13 @@
6.68 ///
6.69 /// The given parameter should be conform to the ReadMap
6.70 /// concept and could be indiced by the current item set of
6.71 - /// the UpperNodeMap. In this case the value for each item
6.72 + /// the ANodeMap. In this case the value for each item
6.73 /// is assigned by the value of the given ReadMap.
6.74 template <typename CMap>
6.75 - UpperNodeMap& operator=(const CMap& cmap) {
6.76 - checkConcept<concept::ReadMap<UpperNode, _Value>, CMap>();
6.77 + ANodeMap& operator=(const CMap& cmap) {
6.78 + checkConcept<concept::ReadMap<ANode, _Value>, CMap>();
6.79 const typename Parent::Graph* graph = Parent::getGraph();
6.80 - UpperNode it;
6.81 + ANode it;
6.82 for (graph->first(it); it != INVALID; graph->next(it)) {
6.83 Parent::set(it, cmap[it]);
6.84 }
6.85 @@ -402,20 +402,20 @@
6.86 };
6.87
6.88 template <typename _Value>
6.89 - class LowerNodeMap
6.90 - : public IterableMapExtender<DefaultMap<Graph, LowerNode, _Value> > {
6.91 + class BNodeMap
6.92 + : public IterableMapExtender<DefaultMap<Graph, BNode, _Value> > {
6.93 public:
6.94 - typedef MappableUBipartiteGraphExtender Graph;
6.95 - typedef IterableMapExtender<DefaultMap<Graph, LowerNode, _Value> >
6.96 + typedef MappableBpUGraphExtender Graph;
6.97 + typedef IterableMapExtender<DefaultMap<Graph, BNode, _Value> >
6.98 Parent;
6.99
6.100 - LowerNodeMap(const Graph& _g)
6.101 + BNodeMap(const Graph& _g)
6.102 : Parent(_g) {}
6.103 - LowerNodeMap(const Graph& _g, const _Value& _v)
6.104 + BNodeMap(const Graph& _g, const _Value& _v)
6.105 : Parent(_g, _v) {}
6.106
6.107 - LowerNodeMap& operator=(const LowerNodeMap& cmap) {
6.108 - return operator=<LowerNodeMap>(cmap);
6.109 + BNodeMap& operator=(const BNodeMap& cmap) {
6.110 + return operator=<BNodeMap>(cmap);
6.111 }
6.112
6.113
6.114 @@ -423,13 +423,13 @@
6.115 ///
6.116 /// The given parameter should be conform to the ReadMap
6.117 /// concept and could be indiced by the current item set of
6.118 - /// the LowerNodeMap. In this case the value for each item
6.119 + /// the BNodeMap. In this case the value for each item
6.120 /// is assigned by the value of the given ReadMap.
6.121 template <typename CMap>
6.122 - LowerNodeMap& operator=(const CMap& cmap) {
6.123 - checkConcept<concept::ReadMap<LowerNode, _Value>, CMap>();
6.124 + BNodeMap& operator=(const CMap& cmap) {
6.125 + checkConcept<concept::ReadMap<BNode, _Value>, CMap>();
6.126 const typename Parent::Graph* graph = Parent::getGraph();
6.127 - LowerNode it;
6.128 + BNode it;
6.129 for (graph->first(it); it != INVALID; graph->next(it)) {
6.130 Parent::set(it, cmap[it]);
6.131 }
6.132 @@ -443,32 +443,32 @@
6.133 template <typename _Value>
6.134 class NodeMapBase : public Parent::NodeNotifier::ObserverBase {
6.135 public:
6.136 - typedef MappableUBipartiteGraphExtender Graph;
6.137 + typedef MappableBpUGraphExtender Graph;
6.138
6.139 typedef Node Key;
6.140 typedef _Value Value;
6.141
6.142 /// The reference type of the map;
6.143 - typedef typename LowerNodeMap<_Value>::Reference Reference;
6.144 + typedef typename BNodeMap<_Value>::Reference Reference;
6.145 /// The pointer type of the map;
6.146 - typedef typename LowerNodeMap<_Value>::Pointer Pointer;
6.147 + typedef typename BNodeMap<_Value>::Pointer Pointer;
6.148
6.149 /// The const value type of the map.
6.150 typedef const Value ConstValue;
6.151 /// The const reference type of the map;
6.152 - typedef typename LowerNodeMap<_Value>::ConstReference ConstReference;
6.153 + typedef typename BNodeMap<_Value>::ConstReference ConstReference;
6.154 /// The pointer type of the map;
6.155 - typedef typename LowerNodeMap<_Value>::ConstPointer ConstPointer;
6.156 + typedef typename BNodeMap<_Value>::ConstPointer ConstPointer;
6.157
6.158 typedef True ReferenceMapTag;
6.159
6.160 NodeMapBase(const Graph& _g)
6.161 - : graph(&_g), lowerMap(_g), upperMap(_g) {
6.162 + : graph(&_g), bNodeMap(_g), aNodeMap(_g) {
6.163 Parent::NodeNotifier::ObserverBase::attach(_g.getNotifier(Node()));
6.164 }
6.165 NodeMapBase(const Graph& _g, const _Value& _v)
6.166 - : graph(&_g), lowerMap(_g, _v),
6.167 - upperMap(_g, _v) {
6.168 + : graph(&_g), bNodeMap(_g, _v),
6.169 + aNodeMap(_g, _v) {
6.170 Parent::NodeNotifier::ObserverBase::attach(_g.getNotifier(Node()));
6.171 }
6.172
6.173 @@ -479,26 +479,26 @@
6.174 }
6.175
6.176 ConstReference operator[](const Key& node) const {
6.177 - if (Parent::upper(node)) {
6.178 - return upperMap[node];
6.179 + if (Parent::aNode(node)) {
6.180 + return aNodeMap[node];
6.181 } else {
6.182 - return lowerMap[node];
6.183 + return bNodeMap[node];
6.184 }
6.185 }
6.186
6.187 Reference operator[](const Key& node) {
6.188 - if (Parent::upper(node)) {
6.189 - return upperMap[node];
6.190 + if (Parent::aNode(node)) {
6.191 + return aNodeMap[node];
6.192 } else {
6.193 - return lowerMap[node];
6.194 + return bNodeMap[node];
6.195 }
6.196 }
6.197
6.198 void set(const Key& node, const Value& value) {
6.199 - if (Parent::upper(node)) {
6.200 - upperMap.set(node, value);
6.201 + if (Parent::aNode(node)) {
6.202 + aNodeMap.set(node, value);
6.203 } else {
6.204 - lowerMap.set(node, value);
6.205 + bNodeMap.set(node, value);
6.206 }
6.207 }
6.208
6.209 @@ -513,8 +513,8 @@
6.210
6.211 private:
6.212 const Graph* graph;
6.213 - LowerNodeMap<_Value> lowerMap;
6.214 - UpperNodeMap<_Value> upperMap;
6.215 + BNodeMap<_Value> bNodeMap;
6.216 + ANodeMap<_Value> aNodeMap;
6.217 };
6.218
6.219 public:
6.220 @@ -523,7 +523,7 @@
6.221 class NodeMap
6.222 : public IterableMapExtender<NodeMapBase<_Value> > {
6.223 public:
6.224 - typedef MappableUBipartiteGraphExtender Graph;
6.225 + typedef MappableBpUGraphExtender Graph;
6.226 typedef IterableMapExtender< NodeMapBase<_Value> > Parent;
6.227
6.228 NodeMap(const Graph& _g)
6.229 @@ -561,7 +561,7 @@
6.230 class EdgeMap
6.231 : public IterableMapExtender<DefaultMap<Graph, Edge, _Value> > {
6.232 public:
6.233 - typedef MappableUBipartiteGraphExtender Graph;
6.234 + typedef MappableBpUGraphExtender Graph;
6.235 typedef IterableMapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
6.236
6.237 EdgeMap(const Graph& _g)
6.238 @@ -589,7 +589,7 @@
6.239 class UEdgeMap
6.240 : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
6.241 public:
6.242 - typedef MappableUBipartiteGraphExtender Graph;
6.243 + typedef MappableBpUGraphExtender Graph;
6.244 typedef IterableMapExtender<DefaultMap<Graph, UEdge, _Value> >
6.245 Parent;
6.246
7.1 --- a/lemon/bits/extendable_graph_extender.h Thu Jan 26 15:42:13 2006 +0000
7.2 +++ b/lemon/bits/extendable_graph_extender.h Thu Jan 26 16:24:40 2006 +0000
7.3 @@ -105,28 +105,28 @@
7.4
7.5
7.6 template <typename _Base>
7.7 - class ExtendableUBipartiteGraphExtender : public _Base {
7.8 + class ExtendableBpUGraphExtender : public _Base {
7.9 public:
7.10
7.11 typedef _Base Parent;
7.12 - typedef ExtendableUBipartiteGraphExtender Graph;
7.13 + typedef ExtendableBpUGraphExtender Graph;
7.14
7.15 typedef typename Parent::Node Node;
7.16 - typedef typename Parent::LowerNode LowerNode;
7.17 - typedef typename Parent::UpperNode UpperNode;
7.18 + typedef typename Parent::BNode BNode;
7.19 + typedef typename Parent::ANode ANode;
7.20 typedef typename Parent::Edge Edge;
7.21 typedef typename Parent::UEdge UEdge;
7.22
7.23 - Node addUpperNode() {
7.24 - Node node = Parent::addUpperNode();
7.25 - Parent::getNotifier(UpperNode()).add(node);
7.26 + Node addANode() {
7.27 + Node node = Parent::addANode();
7.28 + Parent::getNotifier(ANode()).add(node);
7.29 Parent::getNotifier(Node()).add(node);
7.30 return node;
7.31 }
7.32
7.33 - Node addLowerNode() {
7.34 - Node node = Parent::addLowerNode();
7.35 - Parent::getNotifier(LowerNode()).add(node);
7.36 + Node addBNode() {
7.37 + Node node = Parent::addBNode();
7.38 + Parent::getNotifier(BNode()).add(node);
7.39 Parent::getNotifier(Node()).add(node);
7.40 return node;
7.41 }
8.1 --- a/lemon/bits/graph_extender.h Thu Jan 26 15:42:13 2006 +0000
8.2 +++ b/lemon/bits/graph_extender.h Thu Jan 26 16:24:40 2006 +0000
8.3 @@ -2,7 +2,7 @@
8.4 * lemon/graph_extender.h - Part of LEMON, a generic C++ optimization library
8.5 *
8.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi
8.7 - * Kutatocsoport (Egervary Research Group on Combinatorial Optimization,
8.8 + * Kutatocsoport (Egervary Research Groin on Combinatorial Optimization,
8.9 * EGRES).
8.10 *
8.11 * Permission to use, modify and distribute this software is granted
8.12 @@ -379,10 +379,10 @@
8.13
8.14
8.15 template <typename _Base>
8.16 - class UBipartiteGraphExtender : public _Base {
8.17 + class BpUGraphExtender : public _Base {
8.18 public:
8.19 typedef _Base Parent;
8.20 - typedef UBipartiteGraphExtender Graph;
8.21 + typedef BpUGraphExtender Graph;
8.22
8.23 typedef typename Parent::Node Node;
8.24 typedef typename Parent::Edge UEdge;
8.25 @@ -393,26 +393,26 @@
8.26 using Parent::id;
8.27
8.28 Node source(const UEdge& edge) const {
8.29 - return upperNode(edge);
8.30 + return aNode(edge);
8.31 }
8.32 Node target(const UEdge& edge) const {
8.33 - return lowerNode(edge);
8.34 + return bNode(edge);
8.35 }
8.36
8.37 void firstInc(UEdge& edge, bool& direction, const Node& node) const {
8.38 - if (Parent::upper(node)) {
8.39 - Parent::firstDown(edge, node);
8.40 + if (Parent::aNode(node)) {
8.41 + Parent::firstOut(edge, node);
8.42 direction = true;
8.43 } else {
8.44 - Parent::firstUp(edge, node);
8.45 + Parent::firstIn(edge, node);
8.46 direction = static_cast<UEdge&>(edge) == INVALID;
8.47 }
8.48 }
8.49 void nextInc(UEdge& edge, bool& direction) const {
8.50 if (direction) {
8.51 - Parent::nextDown(edge);
8.52 + Parent::nextOut(edge);
8.53 } else {
8.54 - Parent::nextUp(edge);
8.55 + Parent::nextIn(edge);
8.56 if (edge == INVALID) direction = true;
8.57 }
8.58 }
8.59 @@ -426,7 +426,7 @@
8.60 }
8.61
8.62 class Edge : public UEdge {
8.63 - friend class UBipartiteGraphExtender;
8.64 + friend class BpUGraphExtender;
8.65 protected:
8.66 bool forward;
8.67
8.68 @@ -461,46 +461,46 @@
8.69 }
8.70
8.71 void firstOut(Edge& edge, const Node& node) const {
8.72 - if (Parent::upper(node)) {
8.73 - Parent::firstDown(edge, node);
8.74 + if (Parent::aNode(node)) {
8.75 + Parent::firstOut(edge, node);
8.76 edge.forward = true;
8.77 } else {
8.78 - Parent::firstUp(edge, node);
8.79 + Parent::firstIn(edge, node);
8.80 edge.forward = static_cast<UEdge&>(edge) == INVALID;
8.81 }
8.82 }
8.83 void nextOut(Edge& edge) const {
8.84 if (edge.forward) {
8.85 - Parent::nextDown(edge);
8.86 + Parent::nextOut(edge);
8.87 } else {
8.88 - Parent::nextUp(edge);
8.89 + Parent::nextIn(edge);
8.90 edge.forward = static_cast<UEdge&>(edge) == INVALID;
8.91 }
8.92 }
8.93
8.94 void firstIn(Edge& edge, const Node& node) const {
8.95 - if (Parent::lower(node)) {
8.96 - Parent::firstUp(edge, node);
8.97 + if (Parent::bNode(node)) {
8.98 + Parent::firstIn(edge, node);
8.99 edge.forward = true;
8.100 } else {
8.101 - Parent::firstDown(edge, node);
8.102 + Parent::firstOut(edge, node);
8.103 edge.forward = static_cast<UEdge&>(edge) == INVALID;
8.104 }
8.105 }
8.106 void nextIn(Edge& edge) const {
8.107 if (edge.forward) {
8.108 - Parent::nextUp(edge);
8.109 + Parent::nextIn(edge);
8.110 } else {
8.111 - Parent::nextDown(edge);
8.112 + Parent::nextOut(edge);
8.113 edge.forward = static_cast<UEdge&>(edge) == INVALID;
8.114 }
8.115 }
8.116
8.117 Node source(const Edge& edge) const {
8.118 - return edge.forward ? Parent::upperNode(edge) : Parent::lowerNode(edge);
8.119 + return edge.forward ? Parent::aNode(edge) : Parent::bNode(edge);
8.120 }
8.121 Node target(const Edge& edge) const {
8.122 - return edge.forward ? Parent::lowerNode(edge) : Parent::upperNode(edge);
8.123 + return edge.forward ? Parent::bNode(edge) : Parent::aNode(edge);
8.124 }
8.125
8.126 bool direction(const Edge& edge) const {
8.127 @@ -534,48 +534,48 @@
8.128 return (Parent::maxId(UEdge()) << 1) + 1;
8.129 }
8.130
8.131 - class UpperNode : public Node {
8.132 - friend class UBipartiteGraphExtender;
8.133 + class ANode : public Node {
8.134 + friend class BpUGraphExtender;
8.135 public:
8.136 - UpperNode() {}
8.137 - UpperNode(const Node& node) : Node(node) {
8.138 - LEMON_ASSERT(Parent::upper(node) || node == INVALID,
8.139 + ANode() {}
8.140 + ANode(const Node& node) : Node(node) {
8.141 + LEMON_ASSERT(Parent::aNode(node) || node == INVALID,
8.142 typename Parent::NodeSetError());
8.143 }
8.144 - UpperNode(Invalid) : Node(INVALID) {}
8.145 + ANode(Invalid) : Node(INVALID) {}
8.146 };
8.147
8.148 - void first(UpperNode& node) const {
8.149 - Parent::firstUpper(static_cast<Node&>(node));
8.150 + void first(ANode& node) const {
8.151 + Parent::firstANode(static_cast<Node&>(node));
8.152 }
8.153 - void next(UpperNode& node) const {
8.154 - Parent::nextUpper(static_cast<Node&>(node));
8.155 + void next(ANode& node) const {
8.156 + Parent::nextANode(static_cast<Node&>(node));
8.157 }
8.158
8.159 - int id(const UpperNode& node) const {
8.160 - return Parent::upperId(node);
8.161 + int id(const ANode& node) const {
8.162 + return Parent::aNodeId(node);
8.163 }
8.164
8.165 - class LowerNode : public Node {
8.166 - friend class UBipartiteGraphExtender;
8.167 + class BNode : public Node {
8.168 + friend class BpUGraphExtender;
8.169 public:
8.170 - LowerNode() {}
8.171 - LowerNode(const Node& node) : Node(node) {
8.172 - LEMON_ASSERT(Parent::lower(node) || node == INVALID,
8.173 + BNode() {}
8.174 + BNode(const Node& node) : Node(node) {
8.175 + LEMON_ASSERT(Parent::bNode(node) || node == INVALID,
8.176 typename Parent::NodeSetError());
8.177 }
8.178 - LowerNode(Invalid) : Node(INVALID) {}
8.179 + BNode(Invalid) : Node(INVALID) {}
8.180 };
8.181
8.182 - void first(LowerNode& node) const {
8.183 - Parent::firstLower(static_cast<Node&>(node));
8.184 + void first(BNode& node) const {
8.185 + Parent::firstBNode(static_cast<Node&>(node));
8.186 }
8.187 - void next(LowerNode& node) const {
8.188 - Parent::nextLower(static_cast<Node&>(node));
8.189 + void next(BNode& node) const {
8.190 + Parent::nextBNode(static_cast<Node&>(node));
8.191 }
8.192
8.193 - int id(const LowerNode& node) const {
8.194 - return Parent::upperId(node);
8.195 + int id(const BNode& node) const {
8.196 + return Parent::aNodeId(node);
8.197 }
8.198
8.199
8.200 @@ -583,11 +583,11 @@
8.201 int maxId(Node) const {
8.202 return Parent::maxNodeId();
8.203 }
8.204 - int maxId(LowerNode) const {
8.205 - return Parent::maxLowerId();
8.206 + int maxId(BNode) const {
8.207 + return Parent::maxBNodeId();
8.208 }
8.209 - int maxId(UpperNode) const {
8.210 - return Parent::maxUpperId();
8.211 + int maxId(ANode) const {
8.212 + return Parent::maxANodeId();
8.213 }
8.214 int maxId(Edge) const {
8.215 return maxEdgeId();
8.216 @@ -600,11 +600,11 @@
8.217 Node fromId(int id, Node) const {
8.218 return Parent::nodeFromId(id);
8.219 }
8.220 - UpperNode fromId(int id, UpperNode) const {
8.221 - return Parent::fromUpperId(id);
8.222 + ANode fromId(int id, ANode) const {
8.223 + return Parent::fromANodeId(id);
8.224 }
8.225 - LowerNode fromId(int id, LowerNode) const {
8.226 - return Parent::fromLowerId(id);
8.227 + BNode fromId(int id, BNode) const {
8.228 + return Parent::fromBNodeId(id);
8.229 }
8.230 Edge fromId(int id, Edge) const {
8.231 return edgeFromId(id);
9.1 --- a/lemon/bits/item_reader.h Thu Jan 26 15:42:13 2006 +0000
9.2 +++ b/lemon/bits/item_reader.h Thu Jan 26 16:24:40 2006 +0000
9.3 @@ -2,7 +2,7 @@
9.4 * lemon/bits/item_reader.h - Part of LEMON, a generic C++ optimization library
9.5 *
9.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
9.7 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
9.8 + * (Egervary Research Groin on Combinatorial Optimization, EGRES).
9.9 *
9.10 * Permission to use, modify and distribute this software is granted
9.11 * provided that this copyright notice appears in all copies. For
9.12 @@ -14,15 +14,15 @@
9.13 *
9.14 */
9.15
9.16 -/// @defgroup item_io Item Readers and Writers
9.17 -/// @ingroup io_group
9.18 +/// @defgroin item_io Item Readers and Writers
9.19 +/// @ingroin io_groin
9.20 /// \brief Item Readers and Writers
9.21 ///
9.22 /// The Input-Output classes can handle more data type by example
9.23 /// as map or attribute value. Each of these should be written and
9.24 /// read some way. The module make possible to do this.
9.25
9.26 -/// \ingroup item_io
9.27 +/// \ingroin item_io
9.28 /// \file
9.29 /// \brief Item reader bits for lemon input.
9.30
9.31 @@ -42,7 +42,7 @@
9.32 template <typename Value>
9.33 class DefaultReader;
9.34
9.35 - /// \ingroup item_io
9.36 + /// \ingroin item_io
9.37 ///
9.38 /// \brief Reader class for quoted strings.
9.39 ///
9.40 @@ -157,7 +157,7 @@
9.41 bool escaped;
9.42 };
9.43
9.44 - /// \ingroup item_io
9.45 + /// \ingroin item_io
9.46 /// \brief Reader for standard containers.
9.47 ///
9.48 /// Reader for back insertable standard containers. The representation
9.49 @@ -204,7 +204,7 @@
9.50
9.51 };
9.52
9.53 - /// \ingroup item_io
9.54 + /// \ingroin item_io
9.55 ///
9.56 /// \brief Reader for standard containers.
9.57 ///
9.58 @@ -252,7 +252,7 @@
9.59
9.60 };
9.61
9.62 - /// \ingroup item_io
9.63 + /// \ingroin item_io
9.64 /// \brief Reader for parsed string.
9.65 ///
9.66 /// Reader for parsed strings. You can define the open and close
9.67 @@ -300,7 +300,7 @@
9.68
9.69 };
9.70
9.71 - /// \ingroup item_io
9.72 + /// \ingroin item_io
9.73 /// \brief Reader for read the whole line.
9.74 ///
9.75 /// Reader for read the whole line.
9.76 @@ -330,7 +330,7 @@
9.77 bool skipSpaces;
9.78 };
9.79
9.80 - /// \ingroup item_io
9.81 + /// \ingroin item_io
9.82 /// \brief Reader for std::pair.
9.83 ///
9.84 /// Reader for std::pair.
9.85 @@ -384,7 +384,7 @@
9.86 }
9.87 };
9.88
9.89 - /// \ingroup item_io
9.90 + /// \ingroin item_io
9.91 ///
9.92 /// \brief The default item reader template class.
9.93 ///
9.94 @@ -471,7 +471,7 @@
9.95 class DefaultReader<std::pair<First, Second> >
9.96 : public PairReader<std::pair<First, Second> > {};
9.97
9.98 - /// \ingroup item_io
9.99 + /// \ingroin item_io
9.100 ///
9.101 /// \brief The default item reader for skipping a value in the stream.
9.102 ///
9.103 @@ -480,7 +480,7 @@
9.104 /// \author Balazs Dezso
9.105 class DefaultSkipper : public DefaultReader<std::string> {};
9.106
9.107 - /// \ingroup item_io
9.108 + /// \ingroin item_io
9.109 /// \brief Standard ReaderTraits for the GraphReader class.
9.110 ///
9.111 /// Standard ReaderTraits for the GraphReader class.
10.1 --- a/lemon/bits/item_writer.h Thu Jan 26 15:42:13 2006 +0000
10.2 +++ b/lemon/bits/item_writer.h Thu Jan 26 16:24:40 2006 +0000
10.3 @@ -2,7 +2,7 @@
10.4 * lemon/bits/item_reader.h - Part of LEMON, a generic C++ optimization library
10.5 *
10.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
10.7 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
10.8 + * (Egervary Research Groin on Combinatorial Optimization, EGRES).
10.9 *
10.10 * Permission to use, modify and distribute this software is granted
10.11 * provided that this copyright notice appears in all copies. For
10.12 @@ -14,7 +14,7 @@
10.13 *
10.14 */
10.15
10.16 -/// \ingroup item_io
10.17 +/// \ingroin item_io
10.18 /// \file
10.19 /// \brief Item writer bits for lemon output.
10.20
10.21 @@ -34,7 +34,7 @@
10.22 template <typename Value>
10.23 class DefaultWriter;
10.24
10.25 - /// \ingroup item_io
10.26 + /// \ingroin item_io
10.27 /// \brief Writer class for quoted strings.
10.28 ///
10.29 /// Writer class for quoted strings. It can process the escape
10.30 @@ -117,7 +117,7 @@
10.31 bool escaped;
10.32 };
10.33
10.34 - /// \ingroup item_io
10.35 + /// \ingroin item_io
10.36 /// \brief Writer class for quoted char array.
10.37 ///
10.38 /// Writer class for quoted char array. It can process the escape
10.39 @@ -145,7 +145,7 @@
10.40 };
10.41
10.42
10.43 - /// \ingroup item_io
10.44 + /// \ingroin item_io
10.45 ///
10.46 /// \brief Writer for standard containers.
10.47 ///
10.48 @@ -187,7 +187,7 @@
10.49
10.50 };
10.51
10.52 - /// \ingroup item_io
10.53 + /// \ingroin item_io
10.54 ///
10.55 /// \brief Writer for standard pairs.
10.56 ///
10.57 @@ -234,7 +234,7 @@
10.58
10.59 };
10.60
10.61 - /// \ingroup item_io
10.62 + /// \ingroin item_io
10.63 ///
10.64 /// \brief The default item writer template class.
10.65 ///
10.66 @@ -307,7 +307,7 @@
10.67 class DefaultWriter<std::pair<First, Second> >
10.68 : public PairWriter<std::pair<First, Second> > {};
10.69
10.70 - /// \ingroup item_io
10.71 + /// \ingroin item_io
10.72 /// \brief Standard WriterTraits for the section writers.
10.73 ///
10.74 /// Standard WriterTraits for the section writers.
11.1 --- a/lemon/bits/iterable_graph_extender.h Thu Jan 26 15:42:13 2006 +0000
11.2 +++ b/lemon/bits/iterable_graph_extender.h Thu Jan 26 16:24:40 2006 +0000
11.3 @@ -270,14 +270,14 @@
11.4
11.5
11.6 template <typename _Base>
11.7 - class IterableUBipartiteGraphExtender : public _Base {
11.8 + class IterableBpUGraphExtender : public _Base {
11.9 public:
11.10 typedef _Base Parent;
11.11 - typedef IterableUBipartiteGraphExtender Graph;
11.12 + typedef IterableBpUGraphExtender Graph;
11.13
11.14 typedef typename Parent::Node Node;
11.15 - typedef typename Parent::UpperNode UpperNode;
11.16 - typedef typename Parent::LowerNode LowerNode;
11.17 + typedef typename Parent::ANode ANode;
11.18 + typedef typename Parent::BNode BNode;
11.19 typedef typename Parent::Edge Edge;
11.20 typedef typename Parent::UEdge UEdge;
11.21
11.22 @@ -303,52 +303,52 @@
11.23
11.24 };
11.25
11.26 - class UpperNodeIt : public Node {
11.27 - friend class IterableUBipartiteGraphExtender;
11.28 + class ANodeIt : public Node {
11.29 + friend class IterableBpUGraphExtender;
11.30 const Graph* graph;
11.31 public:
11.32
11.33 - UpperNodeIt() { }
11.34 + ANodeIt() { }
11.35
11.36 - UpperNodeIt(Invalid i) : Node(INVALID) { }
11.37 + ANodeIt(Invalid i) : Node(INVALID) { }
11.38
11.39 - explicit UpperNodeIt(const Graph& _graph) : graph(&_graph) {
11.40 - graph->firstUpper(static_cast<Node&>(*this));
11.41 + explicit ANodeIt(const Graph& _graph) : graph(&_graph) {
11.42 + graph->firstANode(static_cast<Node&>(*this));
11.43 }
11.44
11.45 - UpperNodeIt(const Graph& _graph, const Node& node)
11.46 + ANodeIt(const Graph& _graph, const Node& node)
11.47 : Node(node), graph(&_graph) {}
11.48
11.49 - UpperNodeIt& operator++() {
11.50 - graph->nextUpper(*this);
11.51 + ANodeIt& operator++() {
11.52 + graph->nextANode(*this);
11.53 return *this;
11.54 }
11.55 };
11.56
11.57 - class LowerNodeIt : public Node {
11.58 - friend class IterableUBipartiteGraphExtender;
11.59 + class BNodeIt : public Node {
11.60 + friend class IterableBpUGraphExtender;
11.61 const Graph* graph;
11.62 public:
11.63
11.64 - LowerNodeIt() { }
11.65 + BNodeIt() { }
11.66
11.67 - LowerNodeIt(Invalid i) : Node(INVALID) { }
11.68 + BNodeIt(Invalid i) : Node(INVALID) { }
11.69
11.70 - explicit LowerNodeIt(const Graph& _graph) : graph(&_graph) {
11.71 - graph->firstLower(static_cast<Node&>(*this));
11.72 + explicit BNodeIt(const Graph& _graph) : graph(&_graph) {
11.73 + graph->firstBNode(static_cast<Node&>(*this));
11.74 }
11.75
11.76 - LowerNodeIt(const Graph& _graph, const Node& node)
11.77 + BNodeIt(const Graph& _graph, const Node& node)
11.78 : Node(node), graph(&_graph) {}
11.79
11.80 - LowerNodeIt& operator++() {
11.81 - graph->nextLower(*this);
11.82 + BNodeIt& operator++() {
11.83 + graph->nextBNode(*this);
11.84 return *this;
11.85 }
11.86 };
11.87
11.88 class EdgeIt : public Edge {
11.89 - friend class IterableUBipartiteGraphExtender;
11.90 + friend class IterableBpUGraphExtender;
11.91 const Graph* graph;
11.92 public:
11.93
11.94 @@ -371,7 +371,7 @@
11.95 };
11.96
11.97 class UEdgeIt : public UEdge {
11.98 - friend class IterableUBipartiteGraphExtender;
11.99 + friend class IterableBpUGraphExtender;
11.100 const Graph* graph;
11.101 public:
11.102
11.103 @@ -393,7 +393,7 @@
11.104 };
11.105
11.106 class OutEdgeIt : public Edge {
11.107 - friend class IterableUBipartiteGraphExtender;
11.108 + friend class IterableBpUGraphExtender;
11.109 const Graph* graph;
11.110 public:
11.111
11.112 @@ -418,7 +418,7 @@
11.113
11.114
11.115 class InEdgeIt : public Edge {
11.116 - friend class IterableUBipartiteGraphExtender;
11.117 + friend class IterableBpUGraphExtender;
11.118 const Graph* graph;
11.119 public:
11.120
11.121 @@ -470,7 +470,7 @@
11.122 }
11.123
11.124 class IncEdgeIt : public Parent::UEdge {
11.125 - friend class IterableUBipartiteGraphExtender;
11.126 + friend class IterableBpUGraphExtender;
11.127 const Graph* graph;
11.128 bool direction;
11.129 public:
12.1 --- a/lemon/bits/map_extender.h Thu Jan 26 15:42:13 2006 +0000
12.2 +++ b/lemon/bits/map_extender.h Thu Jan 26 16:24:40 2006 +0000
12.3 @@ -2,7 +2,7 @@
12.4 * lemon/map_extender.h - Part of LEMON, a generic C++ optimization library
12.5 *
12.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
12.7 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
12.8 + * (Egervary Research Groin on Combinatorial Optimization, EGRES).
12.9 *
12.10 * Permission to use, modify and distribute this software is granted
12.11 * provided that this copyright notice appears in all copies. For
13.1 --- a/lemon/bits/static_map.h Thu Jan 26 15:42:13 2006 +0000
13.2 +++ b/lemon/bits/static_map.h Thu Jan 26 16:24:40 2006 +0000
13.3 @@ -2,7 +2,7 @@
13.4 * lemon/static_map.h - Part of LEMON, a generic C++ optimization library
13.5 *
13.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
13.7 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
13.8 + * (Egervary Research Groin on Combinatorial Optimization, EGRES).
13.9 *
13.10 * Permission to use, modify and distribute this software is granted
13.11 * provided that this copyright notice appears in all copies. For
13.12 @@ -27,19 +27,19 @@
13.13 #include <lemon/concept_check.h>
13.14 #include <lemon/concept/maps.h>
13.15
13.16 -/// \ingroup graphmaps
13.17 +/// \ingroin graphmaps
13.18 ///
13.19 ///\file
13.20 ///\brief Static sized graph maps.
13.21
13.22 namespace lemon {
13.23
13.24 - /// \ingroup graphmaps
13.25 + /// \ingroin graphmaps
13.26 ///
13.27 /// \brief Graph map with static sized storage.
13.28 ///
13.29 /// The StaticMap template class is graph map structure what
13.30 - /// does not update automatically the map when a key is added to or
13.31 + /// does not indate automatically the map when a key is added to or
13.32 /// erased from the map rather it throws an exception. This map factory
13.33 /// uses the allocators to implement the container functionality.
13.34 ///
13.35 @@ -54,11 +54,11 @@
13.36 class StaticMap : public AlterationNotifier<_Item>::ObserverBase {
13.37 public:
13.38
13.39 - /// \brief Exception class for unsupported exceptions.
13.40 - class UnsupportedOperation : public lemon::LogicError {
13.41 + /// \brief Exception class for unsinported exceptions.
13.42 + class UnsinportedOperation : public lemon::LogicError {
13.43 public:
13.44 virtual const char* exceptionName() const {
13.45 - return "lemon::StaticMap::UnsupportedOperation";
13.46 + return "lemon::StaticMap::UnsinportedOperation";
13.47 }
13.48 };
13.49
13.50 @@ -185,7 +185,7 @@
13.51 /// and it overrides the add() member function of the observer base.
13.52
13.53 void add(const Key&) {
13.54 - throw UnsupportedOperation();
13.55 + throw UnsinportedOperation();
13.56 }
13.57
13.58 /// \brief Erases a key from the map.
13.59 @@ -193,7 +193,7 @@
13.60 /// Erase a key from the map. It called by the observer registry
13.61 /// and it overrides the erase() member function of the observer base.
13.62 void erase(const Key&) {
13.63 - throw UnsupportedOperation();
13.64 + throw UnsinportedOperation();
13.65 }
13.66
13.67 /// Buildes the map.
13.68 @@ -346,33 +346,33 @@
13.69 };
13.70
13.71 template <typename _Base>
13.72 - class StaticMappableUBipartiteGraphExtender : public _Base {
13.73 + class StaticMappableBpUGraphExtender : public _Base {
13.74 public:
13.75
13.76 typedef _Base Parent;
13.77 - typedef StaticMappableUBipartiteGraphExtender Graph;
13.78 + typedef StaticMappableBpUGraphExtender Graph;
13.79
13.80 typedef typename Parent::Node Node;
13.81 - typedef typename Parent::UpperNode UpperNode;
13.82 - typedef typename Parent::LowerNode LowerNode;
13.83 + typedef typename Parent::ANode ANode;
13.84 + typedef typename Parent::BNode BNode;
13.85 typedef typename Parent::Edge Edge;
13.86 typedef typename Parent::UEdge UEdge;
13.87
13.88 template <typename _Value>
13.89 - class UpperNodeMap
13.90 - : public IterableMapExtender<StaticMap<Graph, UpperNode, _Value> > {
13.91 + class ANodeMap
13.92 + : public IterableMapExtender<StaticMap<Graph, ANode, _Value> > {
13.93 public:
13.94 - typedef StaticMappableUBipartiteGraphExtender Graph;
13.95 - typedef IterableMapExtender<StaticMap<Graph, UpperNode, _Value> >
13.96 + typedef StaticMappableBpUGraphExtender Graph;
13.97 + typedef IterableMapExtender<StaticMap<Graph, ANode, _Value> >
13.98 Parent;
13.99
13.100 - UpperNodeMap(const Graph& _g)
13.101 + ANodeMap(const Graph& _g)
13.102 : Parent(_g) {}
13.103 - UpperNodeMap(const Graph& _g, const _Value& _v)
13.104 + ANodeMap(const Graph& _g, const _Value& _v)
13.105 : Parent(_g, _v) {}
13.106
13.107 - UpperNodeMap& operator=(const UpperNodeMap& cmap) {
13.108 - return operator=<UpperNodeMap>(cmap);
13.109 + ANodeMap& operator=(const ANodeMap& cmap) {
13.110 + return operator=<ANodeMap>(cmap);
13.111 }
13.112
13.113
13.114 @@ -380,13 +380,13 @@
13.115 ///
13.116 /// The given parameter should be conform to the ReadMap
13.117 /// concept and could be indiced by the current item set of
13.118 - /// the UpperNodeMap. In this case the value for each item
13.119 + /// the ANodeMap. In this case the value for each item
13.120 /// is assigned by the value of the given ReadMap.
13.121 template <typename CMap>
13.122 - UpperNodeMap& operator=(const CMap& cmap) {
13.123 - checkConcept<concept::ReadMap<UpperNode, _Value>, CMap>();
13.124 + ANodeMap& operator=(const CMap& cmap) {
13.125 + checkConcept<concept::ReadMap<ANode, _Value>, CMap>();
13.126 const typename Parent::Graph* graph = Parent::getGraph();
13.127 - UpperNode it;
13.128 + ANode it;
13.129 for (graph->first(it); it != INVALID; graph->next(it)) {
13.130 Parent::set(it, cmap[it]);
13.131 }
13.132 @@ -396,20 +396,20 @@
13.133 };
13.134
13.135 template <typename _Value>
13.136 - class LowerNodeMap
13.137 - : public IterableMapExtender<StaticMap<Graph, LowerNode, _Value> > {
13.138 + class BNodeMap
13.139 + : public IterableMapExtender<StaticMap<Graph, BNode, _Value> > {
13.140 public:
13.141 - typedef StaticMappableUBipartiteGraphExtender Graph;
13.142 - typedef IterableMapExtender<StaticMap<Graph, LowerNode, _Value> >
13.143 + typedef StaticMappableBpUGraphExtender Graph;
13.144 + typedef IterableMapExtender<StaticMap<Graph, BNode, _Value> >
13.145 Parent;
13.146
13.147 - LowerNodeMap(const Graph& _g)
13.148 + BNodeMap(const Graph& _g)
13.149 : Parent(_g) {}
13.150 - LowerNodeMap(const Graph& _g, const _Value& _v)
13.151 + BNodeMap(const Graph& _g, const _Value& _v)
13.152 : Parent(_g, _v) {}
13.153
13.154 - LowerNodeMap& operator=(const LowerNodeMap& cmap) {
13.155 - return operator=<LowerNodeMap>(cmap);
13.156 + BNodeMap& operator=(const BNodeMap& cmap) {
13.157 + return operator=<BNodeMap>(cmap);
13.158 }
13.159
13.160
13.161 @@ -417,13 +417,13 @@
13.162 ///
13.163 /// The given parameter should be conform to the ReadMap
13.164 /// concept and could be indiced by the current item set of
13.165 - /// the LowerNodeMap. In this case the value for each item
13.166 + /// the BNodeMap. In this case the value for each item
13.167 /// is assigned by the value of the given ReadMap.
13.168 template <typename CMap>
13.169 - LowerNodeMap& operator=(const CMap& cmap) {
13.170 - checkConcept<concept::ReadMap<LowerNode, _Value>, CMap>();
13.171 + BNodeMap& operator=(const CMap& cmap) {
13.172 + checkConcept<concept::ReadMap<BNode, _Value>, CMap>();
13.173 const typename Parent::Graph* graph = Parent::getGraph();
13.174 - LowerNode it;
13.175 + BNode it;
13.176 for (graph->first(it); it != INVALID; graph->next(it)) {
13.177 Parent::set(it, cmap[it]);
13.178 }
13.179 @@ -437,32 +437,32 @@
13.180 template <typename _Value>
13.181 class NodeMapBase : public Parent::NodeNotifier::ObserverBase {
13.182 public:
13.183 - typedef StaticMappableUBipartiteGraphExtender Graph;
13.184 + typedef StaticMappableBpUGraphExtender Graph;
13.185
13.186 typedef Node Key;
13.187 typedef _Value Value;
13.188
13.189 /// The reference type of the map;
13.190 - typedef typename LowerNodeMap<_Value>::Reference Reference;
13.191 + typedef typename BNodeMap<_Value>::Reference Reference;
13.192 /// The pointer type of the map;
13.193 - typedef typename LowerNodeMap<_Value>::Pointer Pointer;
13.194 + typedef typename BNodeMap<_Value>::Pointer Pointer;
13.195
13.196 /// The const value type of the map.
13.197 typedef const Value ConstValue;
13.198 /// The const reference type of the map;
13.199 - typedef typename LowerNodeMap<_Value>::ConstReference ConstReference;
13.200 + typedef typename BNodeMap<_Value>::ConstReference ConstReference;
13.201 /// The pointer type of the map;
13.202 - typedef typename LowerNodeMap<_Value>::ConstPointer ConstPointer;
13.203 + typedef typename BNodeMap<_Value>::ConstPointer ConstPointer;
13.204
13.205 typedef True ReferenceMapTag;
13.206
13.207 NodeMapBase(const Graph& _g)
13.208 - : graph(&_g), lowerMap(_g), upperMap(_g) {
13.209 + : graph(&_g), bNodeMap(_g), aNodeMap(_g) {
13.210 Parent::NodeNotifier::ObserverBase::attach(_g.getNotifier(Node()));
13.211 }
13.212 NodeMapBase(const Graph& _g, const _Value& _v)
13.213 - : graph(&_g), lowerMap(_g, _v),
13.214 - upperMap(_g, _v) {
13.215 + : graph(&_g), bNodeMap(_g, _v),
13.216 + aNodeMap(_g, _v) {
13.217 Parent::NodeNotifier::ObserverBase::attach(_g.getNotifier(Node()));
13.218 }
13.219
13.220 @@ -473,26 +473,26 @@
13.221 }
13.222
13.223 ConstReference operator[](const Key& node) const {
13.224 - if (Parent::upper(node)) {
13.225 - return upperMap[node];
13.226 + if (Parent::aNode(node)) {
13.227 + return aNodeMap[node];
13.228 } else {
13.229 - return lowerMap[node];
13.230 + return bNodeMap[node];
13.231 }
13.232 }
13.233
13.234 Reference operator[](const Key& node) {
13.235 - if (Parent::upper(node)) {
13.236 - return upperMap[node];
13.237 + if (Parent::aNode(node)) {
13.238 + return aNodeMap[node];
13.239 } else {
13.240 - return lowerMap[node];
13.241 + return bNodeMap[node];
13.242 }
13.243 }
13.244
13.245 void set(const Key& node, const Value& value) {
13.246 - if (Parent::upper(node)) {
13.247 - upperMap.set(node, value);
13.248 + if (Parent::aNode(node)) {
13.249 + aNodeMap.set(node, value);
13.250 } else {
13.251 - lowerMap.set(node, value);
13.252 + bNodeMap.set(node, value);
13.253 }
13.254 }
13.255
13.256 @@ -507,8 +507,8 @@
13.257
13.258 private:
13.259 const Graph* graph;
13.260 - LowerNodeMap<_Value> lowerMap;
13.261 - UpperNodeMap<_Value> upperMap;
13.262 + BNodeMap<_Value> bNodeMap;
13.263 + ANodeMap<_Value> aNodeMap;
13.264 };
13.265
13.266 public:
13.267 @@ -517,7 +517,7 @@
13.268 class NodeMap
13.269 : public IterableMapExtender<NodeMapBase<_Value> > {
13.270 public:
13.271 - typedef StaticMappableUBipartiteGraphExtender Graph;
13.272 + typedef StaticMappableBpUGraphExtender Graph;
13.273 typedef IterableMapExtender< NodeMapBase<_Value> > Parent;
13.274
13.275 NodeMap(const Graph& _g)
13.276 @@ -555,7 +555,7 @@
13.277 class EdgeMap
13.278 : public IterableMapExtender<StaticMap<Graph, Edge, _Value> > {
13.279 public:
13.280 - typedef StaticMappableUBipartiteGraphExtender Graph;
13.281 + typedef StaticMappableBpUGraphExtender Graph;
13.282 typedef IterableMapExtender<StaticMap<Graph, Edge, _Value> > Parent;
13.283
13.284 EdgeMap(const Graph& _g)
13.285 @@ -583,7 +583,7 @@
13.286 class UEdgeMap
13.287 : public IterableMapExtender<StaticMap<Graph, UEdge, _Value> > {
13.288 public:
13.289 - typedef StaticMappableUBipartiteGraphExtender Graph;
13.290 + typedef StaticMappableBpUGraphExtender Graph;
13.291 typedef IterableMapExtender<StaticMap<Graph, UEdge, _Value> >
13.292 Parent;
13.293
14.1 --- a/lemon/bits/vector_map.h Thu Jan 26 15:42:13 2006 +0000
14.2 +++ b/lemon/bits/vector_map.h Thu Jan 26 16:24:40 2006 +0000
14.3 @@ -2,7 +2,7 @@
14.4 * lemon/vector_map.h - Part of LEMON, a generic C++ optimization library
14.5 *
14.6 * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
14.7 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
14.8 + * (Egervary Research Groin on Combinatorial Optimization, EGRES).
14.9 *
14.10 * Permission to use, modify and distribute this software is granted
14.11 * provided that this copyright notice appears in all copies. For
14.12 @@ -26,19 +26,19 @@
14.13 #include <lemon/concept_check.h>
14.14 #include <lemon/concept/maps.h>
14.15
14.16 -/// \ingroup graphmapfactory
14.17 +/// \ingroin graphmapfactory
14.18 ///
14.19 ///\file
14.20 ///\brief Vector based graph maps.
14.21
14.22 namespace lemon {
14.23
14.24 - /// \ingroup graphmapfactory
14.25 + /// \ingroin graphmapfactory
14.26 ///
14.27 /// \brief Graph map based on the std::vector storage.
14.28 ///
14.29 /// The VectorMap template class is graph map structure what
14.30 - /// automatically updates the map when a key is added to or erased from
14.31 + /// automatically indates the map when a key is added to or erased from
14.32 /// the map. This map factory uses the allocators to implement
14.33 /// the container functionality. This map factory
14.34 /// uses the std::vector to implement the container function.
15.1 --- a/lemon/concept/ugraph.h Thu Jan 26 15:42:13 2006 +0000
15.2 +++ b/lemon/concept/ugraph.h Thu Jan 26 16:24:40 2006 +0000
15.3 @@ -22,8 +22,8 @@
15.4 ///\brief Undirected graphs and components of.
15.5
15.6
15.7 -#ifndef LEMON_CONCEPT_UNDIR_GRAPH_H
15.8 -#define LEMON_CONCEPT_UNDIR_GRAPH_H
15.9 +#ifndef LEMON_CONCEPT_UGRAPH_H
15.10 +#define LEMON_CONCEPT_UGRAPH_H
15.11
15.12 #include <lemon/concept/graph_component.h>
15.13 #include <lemon/concept/graph.h>
16.1 --- a/lemon/full_graph.h Thu Jan 26 15:42:13 2006 +0000
16.2 +++ b/lemon/full_graph.h Thu Jan 26 16:24:40 2006 +0000
16.3 @@ -403,11 +403,11 @@
16.4 };
16.5
16.6
16.7 - class FullUBipartiteGraphBase {
16.8 + class FullBpUGraphBase {
16.9 protected:
16.10
16.11 - int _upperNodeNum;
16.12 - int _lowerNodeNum;
16.13 + int _aNodeNum;
16.14 + int _bNodeNum;
16.15
16.16 int _edgeNum;
16.17
16.18 @@ -415,12 +415,12 @@
16.19
16.20 class NodeSetError : public LogicError {
16.21 virtual const char* exceptionName() const {
16.22 - return "lemon::FullUBipartiteGraph::NodeSetError";
16.23 + return "lemon::FullBpUGraph::NodeSetError";
16.24 }
16.25 };
16.26
16.27 class Node {
16.28 - friend class FullUBipartiteGraphBase;
16.29 + friend class FullBpUGraphBase;
16.30 protected:
16.31 int id;
16.32
16.33 @@ -434,7 +434,7 @@
16.34 };
16.35
16.36 class Edge {
16.37 - friend class FullUBipartiteGraphBase;
16.38 + friend class FullBpUGraphBase;
16.39 protected:
16.40 int id;
16.41
16.42 @@ -447,39 +447,39 @@
16.43 bool operator<(const Edge i) const {return id<i.id;}
16.44 };
16.45
16.46 - void construct(int upperNodeNum, int lowerNodeNum) {
16.47 - _upperNodeNum = upperNodeNum;
16.48 - _lowerNodeNum = lowerNodeNum;
16.49 - _edgeNum = upperNodeNum * lowerNodeNum;
16.50 + void construct(int aNodeNum, int bNodeNum) {
16.51 + _aNodeNum = aNodeNum;
16.52 + _bNodeNum = bNodeNum;
16.53 + _edgeNum = aNodeNum * bNodeNum;
16.54 }
16.55
16.56 - void firstUpper(Node& node) const {
16.57 - node.id = 2 * _upperNodeNum - 2;
16.58 + void firstANode(Node& node) const {
16.59 + node.id = 2 * _aNodeNum - 2;
16.60 if (node.id < 0) node.id = -1;
16.61 }
16.62 - void nextUpper(Node& node) const {
16.63 + void nextANode(Node& node) const {
16.64 node.id -= 2;
16.65 if (node.id < 0) node.id = -1;
16.66 }
16.67
16.68 - void firstLower(Node& node) const {
16.69 - node.id = 2 * _lowerNodeNum - 1;
16.70 + void firstBNode(Node& node) const {
16.71 + node.id = 2 * _bNodeNum - 1;
16.72 }
16.73 - void nextLower(Node& node) const {
16.74 + void nextBNode(Node& node) const {
16.75 node.id -= 2;
16.76 }
16.77
16.78 void first(Node& node) const {
16.79 - if (_upperNodeNum > 0) {
16.80 - node.id = 2 * _upperNodeNum - 2;
16.81 + if (_aNodeNum > 0) {
16.82 + node.id = 2 * _aNodeNum - 2;
16.83 } else {
16.84 - node.id = 2 * _lowerNodeNum - 1;
16.85 + node.id = 2 * _bNodeNum - 1;
16.86 }
16.87 }
16.88 void next(Node& node) const {
16.89 node.id -= 2;
16.90 if (node.id == -2) {
16.91 - node.id = 2 * _lowerNodeNum - 1;
16.92 + node.id = 2 * _bNodeNum - 1;
16.93 }
16.94 }
16.95
16.96 @@ -490,21 +490,21 @@
16.97 --edge.id;
16.98 }
16.99
16.100 - void firstDown(Edge& edge, const Node& node) const {
16.101 + void firstOut(Edge& edge, const Node& node) const {
16.102 LEMON_ASSERT((node.id & 1) == 0, NodeSetError());
16.103 - edge.id = (node.id >> 1) * _lowerNodeNum;
16.104 + edge.id = (node.id >> 1) * _bNodeNum;
16.105 }
16.106 - void nextDown(Edge& edge) const {
16.107 + void nextOut(Edge& edge) const {
16.108 ++(edge.id);
16.109 - if (edge.id % _lowerNodeNum == 0) edge.id = -1;
16.110 + if (edge.id % _bNodeNum == 0) edge.id = -1;
16.111 }
16.112
16.113 - void firstUp(Edge& edge, const Node& node) const {
16.114 + void firstIn(Edge& edge, const Node& node) const {
16.115 LEMON_ASSERT((node.id & 1) == 1, NodeSetError());
16.116 edge.id = (node.id >> 1);
16.117 }
16.118 - void nextUp(Edge& edge) const {
16.119 - edge.id += _lowerNodeNum;
16.120 + void nextIn(Edge& edge) const {
16.121 + edge.id += _bNodeNum;
16.122 if (edge.id >= _edgeNum) edge.id = -1;
16.123 }
16.124
16.125 @@ -515,8 +515,8 @@
16.126 return Node(id);
16.127 }
16.128 int maxNodeId() const {
16.129 - return _upperNodeNum > _lowerNodeNum ?
16.130 - _upperNodeNum * 2 - 2 : _lowerNodeNum * 2 - 1;
16.131 + return _aNodeNum > _bNodeNum ?
16.132 + _aNodeNum * 2 - 2 : _bNodeNum * 2 - 1;
16.133 }
16.134
16.135 static int id(const Edge& edge) {
16.136 @@ -529,66 +529,77 @@
16.137 return _edgeNum - 1;
16.138 }
16.139
16.140 - static int upperId(const Node& node) {
16.141 + static int aNodeId(const Node& node) {
16.142 return node.id >> 1;
16.143 }
16.144 - static Node fromUpperId(int id, Node) {
16.145 + static Node fromANodeId(int id, Node) {
16.146 return Node(id << 1);
16.147 }
16.148 - int maxUpperId() const {
16.149 - return _upperNodeNum;
16.150 + int maxANodeId() const {
16.151 + return _aNodeNum;
16.152 }
16.153
16.154 - static int lowerId(const Node& node) {
16.155 + static int bNodeId(const Node& node) {
16.156 return node.id >> 1;
16.157 }
16.158 - static Node fromLowerId(int id) {
16.159 + static Node fromBNodeId(int id) {
16.160 return Node((id << 1) + 1);
16.161 }
16.162 - int maxLowerId() const {
16.163 - return _lowerNodeNum;
16.164 + int maxBNodeId() const {
16.165 + return _bNodeNum;
16.166 }
16.167
16.168 - Node upperNode(const Edge& edge) const {
16.169 - return Node((edge.id / _lowerNodeNum) << 1);
16.170 + Node aNode(const Edge& edge) const {
16.171 + return Node((edge.id / _bNodeNum) << 1);
16.172 }
16.173 - Node lowerNode(const Edge& edge) const {
16.174 - return Node(((edge.id % _lowerNodeNum) << 1) + 1);
16.175 + Node bNode(const Edge& edge) const {
16.176 + return Node(((edge.id % _bNodeNum) << 1) + 1);
16.177 }
16.178
16.179 - static bool upper(const Node& node) {
16.180 + static bool aNode(const Node& node) {
16.181 return (node.id & 1) == 0;
16.182 }
16.183
16.184 - static bool lower(const Node& node) {
16.185 + static bool bNode(const Node& node) {
16.186 return (node.id & 1) == 1;
16.187 }
16.188
16.189 - static Node upperNode(int index) {
16.190 + static Node aNode(int index) {
16.191 return Node(index << 1);
16.192 }
16.193
16.194 - static Node lowerNode(int index) {
16.195 + static Node bNode(int index) {
16.196 return Node((index << 1) + 1);
16.197 }
16.198
16.199 };
16.200
16.201
16.202 - typedef StaticMappableUBipartiteGraphExtender<
16.203 - IterableUBipartiteGraphExtender<
16.204 - AlterableUBipartiteGraphExtender<
16.205 - UBipartiteGraphExtender <
16.206 - FullUBipartiteGraphBase> > > >
16.207 - ExtendedFullUBipartiteGraphBase;
16.208 + typedef StaticMappableBpUGraphExtender<
16.209 + IterableBpUGraphExtender<
16.210 + AlterableBpUGraphExtender<
16.211 + BpUGraphExtender <
16.212 + FullBpUGraphBase> > > >
16.213 + ExtendedFullBpUGraphBase;
16.214
16.215
16.216 - class FullUBipartiteGraph :
16.217 - public ExtendedFullUBipartiteGraphBase {
16.218 + /// \ingroup graphs
16.219 + ///
16.220 + /// \brief An undirected full bipartite graph class.
16.221 + ///
16.222 + /// This is a simple and fast bipartite undirected full graph implementation.
16.223 + /// It is completely static, so you can neither add nor delete either
16.224 + /// edges or nodes.
16.225 + ///
16.226 + /// \sa FullGraph
16.227 + ///
16.228 + /// \author Balazs Dezso
16.229 + class FullBpUGraph :
16.230 + public ExtendedFullBpUGraphBase {
16.231 public:
16.232 - typedef ExtendedFullUBipartiteGraphBase Parent;
16.233 - FullUBipartiteGraph(int upperNodeNum, int lowerNodeNum) {
16.234 - Parent::construct(upperNodeNum, lowerNodeNum);
16.235 + typedef ExtendedFullBpUGraphBase Parent;
16.236 + FullBpUGraph(int aNodeNum, int bNodeNum) {
16.237 + Parent::construct(aNodeNum, bNodeNum);
16.238 }
16.239 };
16.240
17.1 --- a/lemon/graph_to_eps.h Thu Jan 26 15:42:13 2006 +0000
17.2 +++ b/lemon/graph_to_eps.h Thu Jan 26 16:24:40 2006 +0000
17.3 @@ -234,7 +234,8 @@
17.4 ConstMap<typename Graph::Node,bool > _nodePsTexts;
17.5 char *_nodePsTextsPreamble;
17.6
17.7 - bool _u;
17.8 + bool _undirected;
17.9 +
17.10 bool _pleaseRemoveOsStream;
17.11
17.12 bool _scaleToA4;
17.13 @@ -272,7 +273,7 @@
17.14 _enableParallel(false), _parEdgeDist(1),
17.15 _showNodeText(false), _nodeTexts(false), _nodeTextSize(1),
17.16 _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0),
17.17 - _u(false),
17.18 + _undirected(false),
17.19 _pleaseRemoveOsStream(_pros), _scaleToA4(false),
17.20 _nodeTextColorType(SAME_COL), _nodeTextColors(Color(0,0,0)),
17.21 _autoNodeScale(false),
17.22 @@ -329,7 +330,8 @@
17.23 using T::_nodePsTexts;
17.24 using T::_nodePsTextsPreamble;
17.25
17.26 - using T::_u;
17.27 + using T::_undirected;
17.28 +
17.29 using T::_pleaseRemoveOsStream;
17.30
17.31 using T::_scaleToA4;
17.32 @@ -734,12 +736,13 @@
17.33
17.34 ///Sets whether the the graph is undirected
17.35 ///
17.36 - GraphToEps<T> &u(bool b=true) {_u=b;return *this;}
17.37 + GraphToEps<T> &undirected(bool b=true) {_undirected=b;return *this;}
17.38 +
17.39 ///Sets whether the the graph is directed
17.40
17.41 ///Sets whether the the graph is directed.
17.42 ///Use it to show the undirected edges as a pair of directed ones.
17.43 - GraphToEps<T> &bidir(bool b=true) {_u=!b;return *this;}
17.44 + GraphToEps<T> &bidir(bool b=true) {_undirected=!b;return *this;}
17.45
17.46 ///Sets the title.
17.47
17.48 @@ -958,7 +961,7 @@
17.49 if(_enableParallel) {
17.50 std::vector<Edge> el;
17.51 for(EdgeIt e(g);e!=INVALID;++e)
17.52 - if((!_u||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
17.53 + if((!_undirected||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
17.54 el.push_back(e);
17.55 std::sort(el.begin(),el.end(),edgeLess(g));
17.56
17.57 @@ -1046,7 +1049,7 @@
17.58 }
17.59 }
17.60 else for(EdgeIt e(g);e!=INVALID;++e)
17.61 - if((!_u||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
17.62 + if((!_undirected||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
17.63 if(_drawArrows) {
17.64 xy<double> d(mycoords[g.target(e)]-mycoords[g.source(e)]);
17.65 double rn=_nodeSizes[g.target(e)]*_nodeScale;
18.1 --- a/lemon/smart_graph.h Thu Jan 26 15:42:13 2006 +0000
18.2 +++ b/lemon/smart_graph.h Thu Jan 26 16:24:40 2006 +0000
18.3 @@ -378,12 +378,12 @@
18.4 };
18.5
18.6
18.7 - class SmartUBipartiteGraphBase {
18.8 + class SmartBpUGraphBase {
18.9 public:
18.10
18.11 class NodeSetError : public LogicError {
18.12 virtual const char* exceptionName() const {
18.13 - return "lemon::FullUBipartiteGraph::NodeSetError";
18.14 + return "lemon::SmartBpUGraph::NodeSetError";
18.15 }
18.16 };
18.17
18.18 @@ -396,19 +396,19 @@
18.19 };
18.20
18.21 struct EdgeT {
18.22 - int upper, next_down;
18.23 - int lower, next_up;
18.24 + int aNode, next_out;
18.25 + int bNode, next_in;
18.26 };
18.27
18.28 - std::vector<NodeT> upperNodes;
18.29 - std::vector<NodeT> lowerNodes;
18.30 + std::vector<NodeT> aNodes;
18.31 + std::vector<NodeT> bNodes;
18.32
18.33 std::vector<EdgeT> edges;
18.34
18.35 public:
18.36
18.37 class Node {
18.38 - friend class SmartUBipartiteGraphBase;
18.39 + friend class SmartBpUGraphBase;
18.40 protected:
18.41 int id;
18.42
18.43 @@ -422,7 +422,7 @@
18.44 };
18.45
18.46 class Edge {
18.47 - friend class SmartUBipartiteGraphBase;
18.48 + friend class SmartBpUGraphBase;
18.49 protected:
18.50 int id;
18.51
18.52 @@ -435,33 +435,33 @@
18.53 bool operator<(const Edge i) const {return id<i.id;}
18.54 };
18.55
18.56 - void firstUpper(Node& node) const {
18.57 - node.id = 2 * upperNodes.size() - 2;
18.58 + void firstANode(Node& node) const {
18.59 + node.id = 2 * aNodes.size() - 2;
18.60 if (node.id < 0) node.id = -1;
18.61 }
18.62 - void nextUpper(Node& node) const {
18.63 + void nextANode(Node& node) const {
18.64 node.id -= 2;
18.65 if (node.id < 0) node.id = -1;
18.66 }
18.67
18.68 - void firstLower(Node& node) const {
18.69 - node.id = 2 * lowerNodes.size() - 1;
18.70 + void firstBNode(Node& node) const {
18.71 + node.id = 2 * bNodes.size() - 1;
18.72 }
18.73 - void nextLower(Node& node) const {
18.74 + void nextBNode(Node& node) const {
18.75 node.id -= 2;
18.76 }
18.77
18.78 void first(Node& node) const {
18.79 - if (upperNodes.size() > 0) {
18.80 - node.id = 2 * upperNodes.size() - 2;
18.81 + if (aNodes.size() > 0) {
18.82 + node.id = 2 * aNodes.size() - 2;
18.83 } else {
18.84 - node.id = 2 * lowerNodes.size() - 1;
18.85 + node.id = 2 * bNodes.size() - 1;
18.86 }
18.87 }
18.88 void next(Node& node) const {
18.89 node.id -= 2;
18.90 if (node.id == -2) {
18.91 - node.id = 2 * lowerNodes.size() - 1;
18.92 + node.id = 2 * bNodes.size() - 1;
18.93 }
18.94 }
18.95
18.96 @@ -472,20 +472,20 @@
18.97 --edge.id;
18.98 }
18.99
18.100 - void firstDown(Edge& edge, const Node& node) const {
18.101 + void firstOut(Edge& edge, const Node& node) const {
18.102 LEMON_ASSERT((node.id & 1) == 0, NodeSetError());
18.103 - edge.id = upperNodes[node.id >> 1].first;
18.104 + edge.id = aNodes[node.id >> 1].first;
18.105 }
18.106 - void nextDown(Edge& edge) const {
18.107 - edge.id = edges[edge.id].next_down;
18.108 + void nextOut(Edge& edge) const {
18.109 + edge.id = edges[edge.id].next_out;
18.110 }
18.111
18.112 - void firstUp(Edge& edge, const Node& node) const {
18.113 + void firstIn(Edge& edge, const Node& node) const {
18.114 LEMON_ASSERT((node.id & 1) == 1, NodeSetError());
18.115 - edge.id = lowerNodes[node.id >> 1].first;
18.116 + edge.id = bNodes[node.id >> 1].first;
18.117 }
18.118 - void nextUp(Edge& edge) const {
18.119 - edge.id = edges[edge.id].next_up;
18.120 + void nextIn(Edge& edge) const {
18.121 + edge.id = edges[edge.id].next_in;
18.122 }
18.123
18.124 static int id(const Node& node) {
18.125 @@ -495,8 +495,8 @@
18.126 return Node(id);
18.127 }
18.128 int maxNodeId() const {
18.129 - return upperNodes.size() > lowerNodes.size() ?
18.130 - upperNodes.size() * 2 - 2 : lowerNodes.size() * 2 - 1;
18.131 + return aNodes.size() > bNodes.size() ?
18.132 + aNodes.size() * 2 - 2 : bNodes.size() * 2 - 1;
18.133 }
18.134
18.135 static int id(const Edge& edge) {
18.136 @@ -509,95 +509,103 @@
18.137 return edges.size();
18.138 }
18.139
18.140 - static int upperId(const Node& node) {
18.141 + static int aNodeId(const Node& node) {
18.142 return node.id >> 1;
18.143 }
18.144 - static Node fromUpperId(int id, Node) {
18.145 + static Node fromANodeId(int id, Node) {
18.146 return Node(id << 1);
18.147 }
18.148 - int maxUpperId() const {
18.149 - return upperNodes.size();
18.150 + int maxANodeId() const {
18.151 + return aNodes.size();
18.152 }
18.153
18.154 - static int lowerId(const Node& node) {
18.155 + static int bNodeId(const Node& node) {
18.156 return node.id >> 1;
18.157 }
18.158 - static Node fromLowerId(int id) {
18.159 + static Node fromBNodeId(int id) {
18.160 return Node((id << 1) + 1);
18.161 }
18.162 - int maxLowerId() const {
18.163 - return lowerNodes.size();
18.164 + int maxBNodeId() const {
18.165 + return bNodes.size();
18.166 }
18.167
18.168 - Node upperNode(const Edge& edge) const {
18.169 - return Node(edges[edge.id].upper);
18.170 + Node aNode(const Edge& edge) const {
18.171 + return Node(edges[edge.id].aNode);
18.172 }
18.173 - Node lowerNode(const Edge& edge) const {
18.174 - return Node(edges[edge.id].lower);
18.175 + Node bNode(const Edge& edge) const {
18.176 + return Node(edges[edge.id].bNode);
18.177 }
18.178
18.179 - static bool upper(const Node& node) {
18.180 + static bool aNode(const Node& node) {
18.181 return (node.id & 1) == 0;
18.182 }
18.183
18.184 - static bool lower(const Node& node) {
18.185 + static bool bNode(const Node& node) {
18.186 return (node.id & 1) == 1;
18.187 }
18.188
18.189 - Node addUpperNode() {
18.190 + Node addANode() {
18.191 NodeT nodeT;
18.192 nodeT.first = -1;
18.193 - upperNodes.push_back(nodeT);
18.194 - return Node(upperNodes.size() * 2 - 2);
18.195 + aNodes.push_back(nodeT);
18.196 + return Node(aNodes.size() * 2 - 2);
18.197 }
18.198
18.199 - Node addLowerNode() {
18.200 + Node addBNode() {
18.201 NodeT nodeT;
18.202 nodeT.first = -1;
18.203 - lowerNodes.push_back(nodeT);
18.204 - return Node(lowerNodes.size() * 2 - 1);
18.205 + bNodes.push_back(nodeT);
18.206 + return Node(bNodes.size() * 2 - 1);
18.207 }
18.208
18.209 Edge addEdge(const Node& source, const Node& target) {
18.210 LEMON_ASSERT(((source.id ^ target.id) & 1) == 1, NodeSetError());
18.211 EdgeT edgeT;
18.212 if ((source.id & 1) == 0) {
18.213 - edgeT.upper = source.id;
18.214 - edgeT.lower = target.id;
18.215 + edgeT.aNode = source.id;
18.216 + edgeT.bNode = target.id;
18.217 } else {
18.218 - edgeT.upper = target.id;
18.219 - edgeT.lower = source.id;
18.220 + edgeT.aNode = target.id;
18.221 + edgeT.bNode = source.id;
18.222 }
18.223 - edgeT.next_down = upperNodes[edgeT.upper >> 1].first;
18.224 - upperNodes[edgeT.upper >> 1].first = edges.size();
18.225 - edgeT.next_up = lowerNodes[edgeT.lower >> 1].first;
18.226 - lowerNodes[edgeT.lower >> 1].first = edges.size();
18.227 + edgeT.next_out = aNodes[edgeT.aNode >> 1].first;
18.228 + aNodes[edgeT.aNode >> 1].first = edges.size();
18.229 + edgeT.next_in = bNodes[edgeT.bNode >> 1].first;
18.230 + bNodes[edgeT.bNode >> 1].first = edges.size();
18.231 edges.push_back(edgeT);
18.232 return Edge(edges.size() - 1);
18.233 }
18.234
18.235 void clear() {
18.236 - upperNodes.clear();
18.237 - lowerNodes.clear();
18.238 + aNodes.clear();
18.239 + bNodes.clear();
18.240 edges.clear();
18.241 }
18.242
18.243 };
18.244
18.245
18.246 - typedef ClearableUBipartiteGraphExtender<
18.247 - ExtendableUBipartiteGraphExtender<
18.248 - MappableUBipartiteGraphExtender<
18.249 - IterableUBipartiteGraphExtender<
18.250 - AlterableUBipartiteGraphExtender<
18.251 - UBipartiteGraphExtender <
18.252 - SmartUBipartiteGraphBase> > > > > >
18.253 - ExtendedSmartUBipartiteGraphBase;
18.254 + typedef ClearableBpUGraphExtender<
18.255 + ExtendableBpUGraphExtender<
18.256 + MappableBpUGraphExtender<
18.257 + IterableBpUGraphExtender<
18.258 + AlterableBpUGraphExtender<
18.259 + BpUGraphExtender <
18.260 + SmartBpUGraphBase> > > > > >
18.261 + ExtendedSmartBpUGraphBase;
18.262
18.263 -
18.264 - class SmartUBipartiteGraph :
18.265 - public ExtendedSmartUBipartiteGraphBase {
18.266 - };
18.267 + /// \ingroup graphs
18.268 + ///
18.269 + /// \brief A smart bipartite undirected graph class.
18.270 + ///
18.271 + /// This is a simple and fast bipartite undirected graph implementation.
18.272 + /// It is also quite memory efficient, but at the price
18.273 + /// that <b> it does not support node and edge deletions</b>.
18.274 + /// Except from this it conforms to
18.275 + /// the \ref concept::BpUGraph "BpUGraph" concept.
18.276 + /// \sa concept::BpUGraph.
18.277 + ///
18.278 + class SmartBpUGraph : public ExtendedSmartBpUGraphBase {};
18.279
18.280
18.281 /// @}