Undir -> U transition
authorklao
Thu, 26 Jan 2006 15:42:13 +0000
changeset 19092d806130e700
parent 1908 e225719bde6b
child 1910 f95eea8c34b0
Undir -> U transition
demo/coloring.cc
demo/coloring.lgf
demo/partitions.lgf
demo/topology_demo.cc
demo/undir_components.lgf
doc/Makefile.am
doc/graph_io.dox
doc/undir_graphs.dox
lemon/Makefile.am
lemon/bits/alteration_notifier.h
lemon/bits/clearable_graph_extender.h
lemon/bits/default_map.h
lemon/bits/erasable_graph_extender.h
lemon/bits/extendable_graph_extender.h
lemon/bits/graph_extender.h
lemon/bits/iterable_graph_extender.h
lemon/bits/static_map.h
lemon/concept/graph.h
lemon/concept/graph_component.h
lemon/concept/ugraph.h
lemon/concept/undir_graph.h
lemon/edge_set.h
lemon/euler.h
lemon/full_graph.h
lemon/graph_adaptor.h
lemon/graph_reader.h
lemon/graph_to_eps.h
lemon/graph_utils.h
lemon/graph_writer.h
lemon/grid_graph.h
lemon/hypercube_graph.h
lemon/kruskal.h
lemon/lemon_reader.h
lemon/lemon_writer.h
lemon/list_graph.h
lemon/max_matching.h
lemon/path.h
lemon/smart_graph.h
lemon/sub_graph.h
lemon/topology.h
lemon/traits.h
test/Makefile.am
test/graph_adaptor_test.cc
test/max_matching_test.cc
test/path_test.cc
test/test_tools.h
test/ugraph_test.cc
test/undir_graph_test.cc
     1.1 --- a/demo/coloring.cc	Thu Jan 26 06:44:22 2006 +0000
     1.2 +++ b/demo/coloring.cc	Thu Jan 26 15:42:13 2006 +0000
     1.3 @@ -40,10 +40,10 @@
     1.4  
     1.5  int main() {
     1.6  
     1.7 -  typedef UndirSmartGraph Graph;
     1.8 +  typedef SmartUGraph Graph;
     1.9    typedef Graph::Node Node;
    1.10    typedef Graph::NodeIt NodeIt;
    1.11 -  typedef Graph::UndirEdge UndirEdge;
    1.12 +  typedef Graph::UEdge UEdge;
    1.13    typedef Graph::IncEdgeIt IncEdgeIt;
    1.14  
    1.15    std::cout << "Six coloring of a plan graph" << std::endl;
    1.16 @@ -52,7 +52,7 @@
    1.17  
    1.18    Graph graph;
    1.19  
    1.20 -  UndirGraphReader<Graph> reader("coloring.lgf", graph);
    1.21 +  UGraphReader<Graph> reader("coloring.lgf", graph);
    1.22    Graph::NodeMap<xy<double> > coords(graph);
    1.23    reader.readNodeMap("coords", coords);
    1.24    
     2.1 --- a/demo/coloring.lgf	Thu Jan 26 06:44:22 2006 +0000
     2.2 +++ b/demo/coloring.lgf	Thu Jan 26 15:42:13 2006 +0000
     2.3 @@ -11,7 +11,7 @@
     2.4  (-327, 46)	2	
     2.5  (157, -150)	1	
     2.6  (-282, -149)	0	
     2.7 -@undiredgeset 
     2.8 +@uedgeset 
     2.9  		label	
    2.10  9	10	17	
    2.11  1	9	15	
     3.1 --- a/demo/partitions.lgf	Thu Jan 26 06:44:22 2006 +0000
     3.2 +++ b/demo/partitions.lgf	Thu Jan 26 15:42:13 2006 +0000
     3.3 @@ -23,7 +23,7 @@
     3.4  -484.494	328.869		3	
     3.5  -607.82		-246.651	2	
     3.6  -274		-131		1	
     3.7 -@undiredgeset 
     3.8 +@uedgeset 
     3.9  		label	
    3.10  12	23	15	
    3.11  13	23	14	
     4.1 --- a/demo/topology_demo.cc	Thu Jan 26 06:44:22 2006 +0000
     4.2 +++ b/demo/topology_demo.cc	Thu Jan 26 15:42:13 2006 +0000
     4.3 @@ -43,13 +43,13 @@
     4.4  
     4.5  
     4.6  void drawConnectedComponents() {
     4.7 -  typedef UndirListGraph Graph;
     4.8 +  typedef ListUGraph Graph;
     4.9    typedef Graph::Node Node;
    4.10  
    4.11    Graph graph;
    4.12    Graph::NodeMap<xy<double> > coords(graph);
    4.13  
    4.14 -  UndirGraphReader<Graph>("undir_components.lgf", graph).
    4.15 +  UGraphReader<Graph>("u_components.lgf", graph).
    4.16      readNodeMap("coordinates_x", xMap(coords)).
    4.17      readNodeMap("coordinates_y", yMap(coords)).
    4.18      run();
    4.19 @@ -59,7 +59,7 @@
    4.20    Graph::NodeMap<int> compMap(graph);
    4.21    connectedComponents(graph, compMap);
    4.22  
    4.23 -  graphToEps(graph, "connected_components.eps").undir().
    4.24 +  graphToEps(graph, "connected_components.eps").u().
    4.25      coords(coords).scaleToA4().enableParallel().
    4.26      parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    4.27      nodeColors(composeMap(colorSet, compMap)).run();
    4.28 @@ -97,25 +97,25 @@
    4.29  }
    4.30  
    4.31  void drawNodeBiconnectedComponents() {
    4.32 -  typedef UndirListGraph Graph;
    4.33 +  typedef ListUGraph Graph;
    4.34    typedef Graph::Node Node;
    4.35 -  typedef Graph::UndirEdge UndirEdge;
    4.36 +  typedef Graph::UEdge UEdge;
    4.37  
    4.38    Graph graph;
    4.39    Graph::NodeMap<xy<double> > coords(graph);
    4.40  
    4.41 -  UndirGraphReader<Graph>("undir_components.lgf", graph).
    4.42 +  UGraphReader<Graph>("u_components.lgf", graph).
    4.43      readNodeMap("coordinates_x", xMap(coords)).
    4.44      readNodeMap("coordinates_y", yMap(coords)).
    4.45      run();
    4.46  
    4.47    ColorSet colorSet;
    4.48  
    4.49 -  Graph::UndirEdgeMap<int> compMap(graph);
    4.50 +  Graph::UEdgeMap<int> compMap(graph);
    4.51    Graph::NodeMap<bool> cutMap(graph);
    4.52    biNodeConnectedComponents(graph, compMap);
    4.53    biNodeConnectedCutNodes(graph, cutMap);
    4.54 -  graphToEps(graph, "bi_node_connected_components.eps").undir().
    4.55 +  graphToEps(graph, "bi_node_connected_components.eps").u().
    4.56      coords(coords).scaleToA4().enableParallel().
    4.57      parEdgeDist(20.0).edgeWidthScale(5.0).nodeScale(20.0).
    4.58      edgeColors(composeMap(colorSet, compMap)).
    4.59 @@ -126,14 +126,14 @@
    4.60  }
    4.61  
    4.62  void drawEdgeBiconnectedComponents() {
    4.63 -  typedef UndirListGraph Graph;
    4.64 +  typedef ListUGraph Graph;
    4.65    typedef Graph::Node Node;
    4.66 -  typedef Graph::UndirEdge UndirEdge;
    4.67 +  typedef Graph::UEdge UEdge;
    4.68  
    4.69    Graph graph;
    4.70    Graph::NodeMap<xy<double> > coords(graph);
    4.71  
    4.72 -  UndirGraphReader<Graph>("undir_components.lgf", graph).
    4.73 +  UGraphReader<Graph>("u_components.lgf", graph).
    4.74      readNodeMap("coordinates_x", xMap(coords)).
    4.75      readNodeMap("coordinates_y", yMap(coords)).
    4.76      run();
    4.77 @@ -141,11 +141,11 @@
    4.78    ColorSet colorSet;
    4.79  
    4.80    Graph::NodeMap<int> compMap(graph);
    4.81 -  Graph::UndirEdgeMap<bool> cutMap(graph);
    4.82 +  Graph::UEdgeMap<bool> cutMap(graph);
    4.83    biEdgeConnectedComponents(graph, compMap);
    4.84    biEdgeConnectedCutEdges(graph, cutMap);
    4.85  
    4.86 -  graphToEps(graph, "bi_edge_connected_components.eps").undir().
    4.87 +  graphToEps(graph, "bi_edge_connected_components.eps").u().
    4.88      coords(coords).scaleToA4().enableParallel().
    4.89      parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
    4.90      nodeColors(composeMap(colorSet, compMap)).
    4.91 @@ -155,14 +155,14 @@
    4.92  }
    4.93  
    4.94  void drawBipartitePartitions() {
    4.95 -  typedef UndirListGraph Graph;
    4.96 +  typedef ListUGraph Graph;
    4.97    typedef Graph::Node Node;
    4.98 -  typedef Graph::UndirEdge UndirEdge;
    4.99 +  typedef Graph::UEdge UEdge;
   4.100  
   4.101    Graph graph;
   4.102    Graph::NodeMap<xy<double> > coords(graph);
   4.103  
   4.104 -  UndirGraphReader<Graph>("partitions.lgf", graph).
   4.105 +  UGraphReader<Graph>("partitions.lgf", graph).
   4.106      readNodeMap("coordinates_x", xMap(coords)).
   4.107      readNodeMap("coordinates_y", yMap(coords)).
   4.108      run();
   4.109 @@ -172,7 +172,7 @@
   4.110    Graph::NodeMap<bool> partMap(graph);
   4.111    bipartitePartitions(graph, partMap);
   4.112  
   4.113 -  graphToEps(graph, "bipartite_partitions.eps").undir().
   4.114 +  graphToEps(graph, "bipartite_partitions.eps").u().
   4.115      coords(coords).scaleToA4().enableParallel().
   4.116      parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
   4.117      nodeColors(composeMap(functorMap(&color), partMap)).run();
     5.1 --- a/demo/undir_components.lgf	Thu Jan 26 06:44:22 2006 +0000
     5.2 +++ b/demo/undir_components.lgf	Thu Jan 26 15:42:13 2006 +0000
     5.3 @@ -43,7 +43,7 @@
     5.4  924.667	409.347	31	
     5.5  -689.204	-237.261	32	
     5.6  -567.302	43.6423	33	
     5.7 -@undiredgeset 
     5.8 +@uedgeset 
     5.9  		label	
    5.10  41	42	44	
    5.11  40	42	43	
     6.1 --- a/doc/Makefile.am	Thu Jan 26 06:44:22 2006 +0000
     6.2 +++ b/doc/Makefile.am	Thu Jan 26 15:42:13 2006 +0000
     6.3 @@ -19,7 +19,7 @@
     6.4  	named-param.dox \
     6.5  	namespaces.dox \
     6.6  	quicktour.dox \
     6.7 -	undir_graphs.dox
     6.8 +	ugraphs.dox
     6.9  
    6.10  html/index.html:
    6.11  	if test ${doxygen_found} = yes; then \
     7.1 --- a/doc/graph_io.dox	Thu Jan 26 06:44:22 2006 +0000
     7.2 +++ b/doc/graph_io.dox	Thu Jan 26 15:42:13 2006 +0000
     7.3 @@ -317,10 +317,10 @@
     7.4  
     7.5  The specialization of writing is very similar to that of reading.
     7.6  
     7.7 -\section undir Undirected graphs
     7.8 +\section u Undirected graphs
     7.9  
    7.10 -In a file describing an undirected graph (undir graph, for short) you find an
    7.11 -\c undiredgeset section instead of the \c edgeset section. The first line of
    7.12 +In a file describing an undirected graph (ugraph, for short) you find an
    7.13 +\c uedgeset section instead of the \c edgeset section. The first line of
    7.14  the section describes the names of the maps on the undirected egdes and all
    7.15  next lines describe one undirected edge with the the incident nodes and the
    7.16  values of the map.
    7.17 @@ -330,21 +330,21 @@
    7.18  then this will be read as a directed map.
    7.19  
    7.20  \code
    7.21 -@undiredgeset
    7.22 +@uedgeset
    7.23               label      capacity        +flow   -flow
    7.24  32   2       1          4.3             2.0     0.0
    7.25  21   21      5          2.6             0.0     2.6
    7.26  21   12      8          3.4             0.0     0.0
    7.27  \endcode
    7.28  
    7.29 -The \c edges section is changed to \c undiredges section. This section
    7.30 +The \c edges section is changed to \c uedges section. This section
    7.31  describes labeled edges and undirected edges. The directed edge label
    7.32  should start with a \c '+' or a \c '-' prefix to decide the direction
    7.33  of the edge. 
    7.34  
    7.35  \code
    7.36 -@undiredges
    7.37 -undiredge 1
    7.38 +@uedges
    7.39 +uedge 1
    7.40  +edge 5
    7.41  -back 5
    7.42  \endcode
    7.43 @@ -352,19 +352,19 @@
    7.44  There are similar classes to the \ref lemon::GraphReader "GraphReader" and
    7.45  \ref lemon::GraphWriter "GraphWriter" which
    7.46  handle the undirected graphs. These classes are
    7.47 -the \ref lemon::UndirGraphReader "UndirGraphReader"
    7.48 -and \ref lemon::UndirGraphWriter "UndirGraphWriter".
    7.49 +the \ref lemon::UGraphReader "UGraphReader"
    7.50 +and \ref lemon::UGraphWriter "UGraphWriter".
    7.51  
    7.52 -The \ref lemon::UndirGraphReader::readUndirEdgeMap() "readUndirEdgeMap()"
    7.53 +The \ref lemon::UGraphReader::readUEdgeMap() "readUEdgeMap()"
    7.54  function reads an undirected map and the
    7.55 -\ref lemon::UndirGraphReader::readUndirEdge() "readUndirEdge()"
    7.56 +\ref lemon::UGraphReader::readUEdge() "readUEdge()"
    7.57  reads an undirected edge from the file, 
    7.58  
    7.59  \code
    7.60 -reader.readUndirEdgeMap("capacity", capacityMap);
    7.61 +reader.readUEdgeMap("capacity", capacityMap);
    7.62  reader.readEdgeMap("flow", flowMap);
    7.63  ...
    7.64 -reader.readUndirEdge("undir_edge", undir_edge);
    7.65 +reader.readUEdge("u_edge", u_edge);
    7.66  reader.readEdge("edge", edge);
    7.67  \endcode
    7.68  
    7.69 @@ -439,17 +439,17 @@
    7.70  shows the input with the \ref lemon::LemonReader "LemonReader" class:
    7.71  
    7.72  \code
    7.73 -UndirListGraph network;
    7.74 -UndirListGraph::UndirEdgeMap<double> capacity;
    7.75 -ListEdgeSet<UndirListGraph> traffic(network);
    7.76 -ListEdgeSet<UndirListGraph>::EdgeMap<double> request(network);
    7.77 +ListUGraph network;
    7.78 +ListUGraph::UEdgeMap<double> capacity;
    7.79 +ListEdgeSet<ListUGraph> traffic(network);
    7.80 +ListEdgeSet<ListUGraph>::EdgeMap<double> request(network);
    7.81  
    7.82  LemonReader reader(std::cin);
    7.83 -NodeSetReader<UndirListGraph> nodesetReader(reader, network);
    7.84 -UndirEdgeSetReader<UndirListGraph> 
    7.85 -  undirEdgesetReader(reader, network, nodesetReader);
    7.86 -undirEdgesetReader.readEdgeMap("capacity", capacity);
    7.87 -EdgeSetReader<ListEdgeSet<UndirListGraph> > 
    7.88 +NodeSetReader<ListUGraph> nodesetReader(reader, network);
    7.89 +UEdgeSetReader<ListUGraph> 
    7.90 +  uEdgesetReader(reader, network, nodesetReader);
    7.91 +uEdgesetReader.readEdgeMap("capacity", capacity);
    7.92 +EdgeSetReader<ListEdgeSet<ListUGraph> > 
    7.93    edgesetReader(reader, traffic, nodesetReader, "traffic");
    7.94  edgesetReader.readEdgeMap("request", request);
    7.95  
    7.96 @@ -457,22 +457,22 @@
    7.97  \endcode
    7.98  
    7.99  Because both the \ref lemon::GraphReader "GraphReader"
   7.100 -and the \ref lemon::UndirGraphReader "UndirGraphReader" can be converted
   7.101 +and the \ref lemon::UGraphReader "UGraphReader" can be converted
   7.102  to \ref lemon::LemonReader "LemonReader"
   7.103  and it can resolve the label's of the items, the previous
   7.104 -result can be achived with the \ref lemon::UndirGraphReader "UndirGraphReader"
   7.105 +result can be achived with the \ref lemon::UGraphReader "UGraphReader"
   7.106  class, too.
   7.107  
   7.108  
   7.109  \code
   7.110 -UndirListGraph network;
   7.111 -UndirListGraph::UndirEdgeSet<double> capacity;
   7.112 -ListEdgeSet<UndirListGraph> traffic(network);
   7.113 -ListEdgeSet<UndirListGraph>::EdgeMap<double> request(network);
   7.114 +ListUGraph network;
   7.115 +ListUGraph::UEdgeSet<double> capacity;
   7.116 +ListEdgeSet<ListUGraph> traffic(network);
   7.117 +ListEdgeSet<ListUGraph>::EdgeMap<double> request(network);
   7.118  
   7.119 -UndirGraphReader<UndirListGraph> reader(std::cin, network);
   7.120 +UGraphReader<ListUGraph> reader(std::cin, network);
   7.121  reader.readEdgeMap("capacity", capacity);
   7.122 -EdgeSetReader<ListEdgeSet<UndirListGraph> > 
   7.123 +EdgeSetReader<ListEdgeSet<ListUGraph> > 
   7.124    edgesetReader(reader, traffic, reader, "traffic");
   7.125  edgesetReader.readEdgeMap("request", request);
   7.126  
     8.1 --- a/doc/undir_graphs.dox	Thu Jan 26 06:44:22 2006 +0000
     8.2 +++ b/doc/undir_graphs.dox	Thu Jan 26 15:42:13 2006 +0000
     8.3 @@ -1,6 +1,6 @@
     8.4  /*!
     8.5  
     8.6 -\page undir_graphs Undirected graph structures
     8.7 +\page ugraphs Undirected graph structures
     8.8  
     8.9  The primary data structures of LEMON are the graph classes.
    8.10  
     9.1 --- a/lemon/Makefile.am	Thu Jan 26 06:44:22 2006 +0000
     9.2 +++ b/lemon/Makefile.am	Thu Jan 26 15:42:13 2006 +0000
     9.3 @@ -90,7 +90,7 @@
     9.4  	bits/item_writer.h \
     9.5  	concept/graph.h \
     9.6  	concept/graph_component.h \
     9.7 -	concept/undir_graph.h \
     9.8 +	concept/ugraph.h \
     9.9  	concept/matrix_maps.h \
    9.10  	concept/maps.h \
    9.11  	concept/heap.h \
    10.1 --- a/lemon/bits/alteration_notifier.h	Thu Jan 26 06:44:22 2006 +0000
    10.2 +++ b/lemon/bits/alteration_notifier.h	Thu Jan 26 15:42:13 2006 +0000
    10.3 @@ -442,83 +442,83 @@
    10.4    /// enable_if boost technique?
    10.5  
    10.6    template <typename _Base> 
    10.7 -  class AlterableUndirGraphExtender
    10.8 +  class AlterableUGraphExtender
    10.9      : public AlterableGraphExtender<_Base> {
   10.10    public:
   10.11  
   10.12 -    typedef AlterableUndirGraphExtender Graph;
   10.13 +    typedef AlterableUGraphExtender Graph;
   10.14      typedef AlterableGraphExtender<_Base> Parent;
   10.15  
   10.16 -    typedef typename Parent::UndirEdge UndirEdge;
   10.17 +    typedef typename Parent::UEdge UEdge;
   10.18  
   10.19      /// The edge observer registry.
   10.20 -    typedef AlterationNotifier<UndirEdge> UndirEdgeNotifier;
   10.21 +    typedef AlterationNotifier<UEdge> UEdgeNotifier;
   10.22  
   10.23    protected:
   10.24  
   10.25 -    mutable UndirEdgeNotifier undir_edge_notifier;
   10.26 +    mutable UEdgeNotifier u_edge_notifier;
   10.27  
   10.28    public:
   10.29  
   10.30      using Parent::getNotifier;
   10.31 -    UndirEdgeNotifier& getNotifier(UndirEdge) const {
   10.32 -      return undir_edge_notifier;
   10.33 +    UEdgeNotifier& getNotifier(UEdge) const {
   10.34 +      return u_edge_notifier;
   10.35      }
   10.36  
   10.37 -    ~AlterableUndirGraphExtender() {
   10.38 -      undir_edge_notifier.clear();
   10.39 +    ~AlterableUGraphExtender() {
   10.40 +      u_edge_notifier.clear();
   10.41      }
   10.42    };
   10.43  
   10.44    template <typename _Base> 
   10.45 -  class AlterableUndirEdgeSetExtender
   10.46 +  class AlterableUEdgeSetExtender
   10.47      : public AlterableEdgeSetExtender<_Base> {
   10.48    public:
   10.49  
   10.50 -    typedef AlterableUndirEdgeSetExtender Graph;
   10.51 +    typedef AlterableUEdgeSetExtender Graph;
   10.52      typedef AlterableEdgeSetExtender<_Base> Parent;
   10.53  
   10.54 -    typedef typename Parent::UndirEdge UndirEdge;
   10.55 +    typedef typename Parent::UEdge UEdge;
   10.56  
   10.57 -    typedef AlterationNotifier<UndirEdge> UndirEdgeNotifier;
   10.58 +    typedef AlterationNotifier<UEdge> UEdgeNotifier;
   10.59  
   10.60    protected:
   10.61  
   10.62 -    mutable UndirEdgeNotifier undir_edge_notifier;
   10.63 +    mutable UEdgeNotifier u_edge_notifier;
   10.64  
   10.65    public:
   10.66  
   10.67      using Parent::getNotifier;
   10.68 -    UndirEdgeNotifier& getNotifier(UndirEdge) const {
   10.69 -      return undir_edge_notifier;
   10.70 +    UEdgeNotifier& getNotifier(UEdge) const {
   10.71 +      return u_edge_notifier;
   10.72      }
   10.73  
   10.74 -    ~AlterableUndirEdgeSetExtender() {
   10.75 -      undir_edge_notifier.clear();
   10.76 +    ~AlterableUEdgeSetExtender() {
   10.77 +      u_edge_notifier.clear();
   10.78      }
   10.79    };
   10.80  
   10.81  
   10.82  
   10.83    template <typename _Base>
   10.84 -  class AlterableUndirBipartiteGraphExtender : public _Base {
   10.85 +  class AlterableUBipartiteGraphExtender : public _Base {
   10.86    public:
   10.87  
   10.88      typedef _Base Parent;
   10.89 -    typedef AlterableUndirBipartiteGraphExtender Graph;
   10.90 +    typedef AlterableUBipartiteGraphExtender Graph;
   10.91    
   10.92      typedef typename Parent::Node Node;
   10.93      typedef typename Parent::LowerNode LowerNode;
   10.94      typedef typename Parent::UpperNode UpperNode;
   10.95      typedef typename Parent::Edge Edge;
   10.96 -    typedef typename Parent::UndirEdge UndirEdge;
   10.97 +    typedef typename Parent::UEdge UEdge;
   10.98    
   10.99    
  10.100      typedef AlterationNotifier<Node> NodeNotifier;
  10.101      typedef AlterationNotifier<LowerNode> LowerNodeNotifier;
  10.102      typedef AlterationNotifier<UpperNode> UpperNodeNotifier;
  10.103      typedef AlterationNotifier<Edge> EdgeNotifier;
  10.104 -    typedef AlterationNotifier<UndirEdge> UndirEdgeNotifier;
  10.105 +    typedef AlterationNotifier<UEdge> UEdgeNotifier;
  10.106  
  10.107    protected:
  10.108  
  10.109 @@ -526,7 +526,7 @@
  10.110      mutable LowerNodeNotifier lowerNodeNotifier;
  10.111      mutable UpperNodeNotifier upperNodeNotifier;
  10.112      mutable EdgeNotifier edgeNotifier;
  10.113 -    mutable UndirEdgeNotifier undirEdgeNotifier;
  10.114 +    mutable UEdgeNotifier uEdgeNotifier;
  10.115  
  10.116    public:
  10.117  
  10.118 @@ -546,16 +546,16 @@
  10.119        return edgeNotifier;
  10.120      }
  10.121  
  10.122 -    UndirEdgeNotifier& getNotifier(UndirEdge) const {
  10.123 -      return undirEdgeNotifier;
  10.124 +    UEdgeNotifier& getNotifier(UEdge) const {
  10.125 +      return uEdgeNotifier;
  10.126      }
  10.127  
  10.128 -    ~AlterableUndirBipartiteGraphExtender() {
  10.129 +    ~AlterableUBipartiteGraphExtender() {
  10.130        nodeNotifier.clear();
  10.131        lowerNodeNotifier.clear();
  10.132        upperNodeNotifier.clear();
  10.133        edgeNotifier.clear();
  10.134 -      undirEdgeNotifier.clear();
  10.135 +      uEdgeNotifier.clear();
  10.136      }
  10.137  
  10.138    };
    11.1 --- a/lemon/bits/clearable_graph_extender.h	Thu Jan 26 06:44:22 2006 +0000
    11.2 +++ b/lemon/bits/clearable_graph_extender.h	Thu Jan 26 15:42:13 2006 +0000
    11.3 @@ -42,35 +42,35 @@
    11.4    };
    11.5  
    11.6    template <typename _Base> 
    11.7 -  class ClearableUndirGraphExtender : public _Base {
    11.8 +  class ClearableUGraphExtender : public _Base {
    11.9    public:
   11.10  
   11.11 -    typedef ClearableUndirGraphExtender Graph;
   11.12 +    typedef ClearableUGraphExtender Graph;
   11.13      typedef _Base Parent;
   11.14      typedef typename Parent::Node Node;
   11.15 -    typedef typename Parent::UndirEdge UndirEdge;
   11.16 +    typedef typename Parent::UEdge UEdge;
   11.17      typedef typename Parent::Edge Edge;
   11.18  
   11.19      void clear() {
   11.20        Parent::getNotifier(Node()).clear();
   11.21 -      Parent::getNotifier(UndirEdge()).clear();
   11.22 +      Parent::getNotifier(UEdge()).clear();
   11.23        Parent::getNotifier(Edge()).clear();
   11.24        Parent::clear();
   11.25      }
   11.26    };
   11.27  
   11.28    template <typename _Base> 
   11.29 -  class ClearableUndirEdgeSetExtender : public _Base {
   11.30 +  class ClearableUEdgeSetExtender : public _Base {
   11.31    public:
   11.32  
   11.33 -    typedef ClearableUndirEdgeSetExtender Graph;
   11.34 +    typedef ClearableUEdgeSetExtender Graph;
   11.35      typedef _Base Parent;
   11.36      typedef typename Parent::Node Node;
   11.37 -    typedef typename Parent::UndirEdge UndirEdge;
   11.38 +    typedef typename Parent::UEdge UEdge;
   11.39      typedef typename Parent::Edge Edge;
   11.40  
   11.41      void clear() {
   11.42 -      Parent::getNotifier(UndirEdge()).clear();
   11.43 +      Parent::getNotifier(UEdge()).clear();
   11.44        Parent::getNotifier(Edge()).clear();
   11.45        Parent::clear();
   11.46      }
   11.47 @@ -79,21 +79,21 @@
   11.48  
   11.49  
   11.50    template <typename _Base>
   11.51 -  class ClearableUndirBipartiteGraphExtender : public _Base {
   11.52 +  class ClearableUBipartiteGraphExtender : public _Base {
   11.53    public:
   11.54  
   11.55      typedef _Base Parent;
   11.56 -    typedef ClearableUndirBipartiteGraphExtender Graph;
   11.57 +    typedef ClearableUBipartiteGraphExtender Graph;
   11.58  
   11.59      typedef typename Parent::Node Node;
   11.60      typedef typename Parent::LowerNode LowerNode;
   11.61      typedef typename Parent::UpperNode UpperNode;
   11.62      typedef typename Parent::Edge Edge;
   11.63 -    typedef typename Parent::UndirEdge UndirEdge;
   11.64 +    typedef typename Parent::UEdge UEdge;
   11.65  
   11.66      void clear() {
   11.67        Parent::getNotifier(Edge()).clear();
   11.68 -      Parent::getNotifier(UndirEdge()).clear();
   11.69 +      Parent::getNotifier(UEdge()).clear();
   11.70        Parent::getNotifier(Node()).clear();
   11.71        Parent::getNotifier(LowerNode()).clear();
   11.72        Parent::getNotifier(UpperNode()).clear();
    12.1 --- a/lemon/bits/default_map.h	Thu Jan 26 06:44:22 2006 +0000
    12.2 +++ b/lemon/bits/default_map.h	Thu Jan 26 15:42:13 2006 +0000
    12.3 @@ -266,37 +266,37 @@
    12.4  
    12.5    /// \e
    12.6    template <typename _Base> 
    12.7 -  class MappableUndirGraphExtender : 
    12.8 +  class MappableUGraphExtender : 
    12.9      public MappableGraphExtender<_Base> {
   12.10    public:
   12.11  
   12.12 -    typedef MappableUndirGraphExtender Graph;
   12.13 +    typedef MappableUGraphExtender Graph;
   12.14      typedef MappableGraphExtender<_Base> Parent;
   12.15  
   12.16 -    typedef typename Parent::UndirEdge UndirEdge;
   12.17 +    typedef typename Parent::UEdge UEdge;
   12.18  
   12.19      template <typename _Value>
   12.20 -    class UndirEdgeMap 
   12.21 -      : public IterableMapExtender<DefaultMap<Graph, UndirEdge, _Value> > {
   12.22 +    class UEdgeMap 
   12.23 +      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
   12.24      public:
   12.25 -      typedef MappableUndirGraphExtender Graph;
   12.26 +      typedef MappableUGraphExtender Graph;
   12.27        typedef IterableMapExtender<
   12.28 -	DefaultMap<Graph, UndirEdge, _Value> > Parent;
   12.29 +	DefaultMap<Graph, UEdge, _Value> > Parent;
   12.30  
   12.31 -      UndirEdgeMap(const Graph& _g) 
   12.32 +      UEdgeMap(const Graph& _g) 
   12.33  	: Parent(_g) {}
   12.34 -      UndirEdgeMap(const Graph& _g, const _Value& _v) 
   12.35 +      UEdgeMap(const Graph& _g, const _Value& _v) 
   12.36  	: Parent(_g, _v) {}
   12.37  
   12.38 -      UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
   12.39 -	return operator=<UndirEdgeMap>(cmap);
   12.40 +      UEdgeMap& operator=(const UEdgeMap& cmap) {
   12.41 +	return operator=<UEdgeMap>(cmap);
   12.42        }
   12.43  
   12.44        template <typename CMap>
   12.45 -      UndirEdgeMap& operator=(const CMap& cmap) {
   12.46 -	checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
   12.47 +      UEdgeMap& operator=(const CMap& cmap) {
   12.48 +	checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
   12.49  	const typename Parent::Graph* graph = Parent::getGraph();
   12.50 -	UndirEdge it;
   12.51 +	UEdge it;
   12.52  	for (graph->first(it); it != INVALID; graph->next(it)) {
   12.53  	  Parent::set(it, cmap[it]);
   12.54  	}
   12.55 @@ -309,37 +309,37 @@
   12.56  
   12.57    /// \e
   12.58    template <typename _Base> 
   12.59 -  class MappableUndirEdgeSetExtender : 
   12.60 +  class MappableUEdgeSetExtender : 
   12.61      public MappableEdgeSetExtender<_Base> {
   12.62    public:
   12.63  
   12.64 -    typedef MappableUndirEdgeSetExtender Graph;
   12.65 +    typedef MappableUEdgeSetExtender Graph;
   12.66      typedef MappableEdgeSetExtender<_Base> Parent;
   12.67  
   12.68 -    typedef typename Parent::UndirEdge UndirEdge;
   12.69 +    typedef typename Parent::UEdge UEdge;
   12.70  
   12.71      template <typename _Value>
   12.72 -    class UndirEdgeMap 
   12.73 -      : public IterableMapExtender<DefaultMap<Graph, UndirEdge, _Value> > {
   12.74 +    class UEdgeMap 
   12.75 +      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
   12.76      public:
   12.77 -      typedef MappableUndirEdgeSetExtender Graph;
   12.78 +      typedef MappableUEdgeSetExtender Graph;
   12.79        typedef IterableMapExtender<
   12.80 -	DefaultMap<Graph, UndirEdge, _Value> > Parent;
   12.81 +	DefaultMap<Graph, UEdge, _Value> > Parent;
   12.82  
   12.83 -      UndirEdgeMap(const Graph& _g) 
   12.84 +      UEdgeMap(const Graph& _g) 
   12.85  	: Parent(_g) {}
   12.86 -      UndirEdgeMap(const Graph& _g, const _Value& _v) 
   12.87 +      UEdgeMap(const Graph& _g, const _Value& _v) 
   12.88  	: Parent(_g, _v) {}
   12.89  
   12.90 -      UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
   12.91 -	return operator=<UndirEdgeMap>(cmap);
   12.92 +      UEdgeMap& operator=(const UEdgeMap& cmap) {
   12.93 +	return operator=<UEdgeMap>(cmap);
   12.94        }
   12.95  
   12.96        template <typename CMap>
   12.97 -      UndirEdgeMap& operator=(const CMap& cmap) {
   12.98 -	checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
   12.99 +      UEdgeMap& operator=(const CMap& cmap) {
  12.100 +	checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
  12.101  	const typename Parent::Graph* graph = Parent::getGraph();
  12.102 -	UndirEdge it;
  12.103 +	UEdge it;
  12.104  	for (graph->first(it); it != INVALID; graph->next(it)) {
  12.105  	  Parent::set(it, cmap[it]);
  12.106  	}
  12.107 @@ -352,23 +352,23 @@
  12.108  
  12.109  
  12.110    template <typename _Base>
  12.111 -  class MappableUndirBipartiteGraphExtender : public _Base {
  12.112 +  class MappableUBipartiteGraphExtender : public _Base {
  12.113    public:
  12.114  
  12.115      typedef _Base Parent;
  12.116 -    typedef MappableUndirBipartiteGraphExtender Graph;
  12.117 +    typedef MappableUBipartiteGraphExtender Graph;
  12.118  
  12.119      typedef typename Parent::Node Node;
  12.120      typedef typename Parent::UpperNode UpperNode;
  12.121      typedef typename Parent::LowerNode LowerNode;
  12.122      typedef typename Parent::Edge Edge;
  12.123 -    typedef typename Parent::UndirEdge UndirEdge;
  12.124 +    typedef typename Parent::UEdge UEdge;
  12.125      
  12.126      template <typename _Value>
  12.127      class UpperNodeMap 
  12.128        : public IterableMapExtender<DefaultMap<Graph, UpperNode, _Value> > {
  12.129      public:
  12.130 -      typedef MappableUndirBipartiteGraphExtender Graph;
  12.131 +      typedef MappableUBipartiteGraphExtender Graph;
  12.132        typedef IterableMapExtender<DefaultMap<Graph, UpperNode, _Value> > 
  12.133        Parent;
  12.134      
  12.135 @@ -405,7 +405,7 @@
  12.136      class LowerNodeMap 
  12.137        : public IterableMapExtender<DefaultMap<Graph, LowerNode, _Value> > {
  12.138      public:
  12.139 -      typedef MappableUndirBipartiteGraphExtender Graph;
  12.140 +      typedef MappableUBipartiteGraphExtender Graph;
  12.141        typedef IterableMapExtender<DefaultMap<Graph, LowerNode, _Value> > 
  12.142        Parent;
  12.143      
  12.144 @@ -443,7 +443,7 @@
  12.145      template <typename _Value>
  12.146      class NodeMapBase : public Parent::NodeNotifier::ObserverBase {
  12.147      public:
  12.148 -      typedef MappableUndirBipartiteGraphExtender Graph;
  12.149 +      typedef MappableUBipartiteGraphExtender Graph;
  12.150  
  12.151        typedef Node Key;
  12.152        typedef _Value Value;
  12.153 @@ -523,7 +523,7 @@
  12.154      class NodeMap 
  12.155        : public IterableMapExtender<NodeMapBase<_Value> > {
  12.156      public:
  12.157 -      typedef MappableUndirBipartiteGraphExtender Graph;
  12.158 +      typedef MappableUBipartiteGraphExtender Graph;
  12.159        typedef IterableMapExtender< NodeMapBase<_Value> > Parent;
  12.160      
  12.161        NodeMap(const Graph& _g) 
  12.162 @@ -561,7 +561,7 @@
  12.163      class EdgeMap 
  12.164        : public IterableMapExtender<DefaultMap<Graph, Edge, _Value> > {
  12.165      public:
  12.166 -      typedef MappableUndirBipartiteGraphExtender Graph;
  12.167 +      typedef MappableUBipartiteGraphExtender Graph;
  12.168        typedef IterableMapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
  12.169      
  12.170        EdgeMap(const Graph& _g) 
  12.171 @@ -586,27 +586,27 @@
  12.172      };
  12.173  
  12.174      template <typename _Value>
  12.175 -    class UndirEdgeMap 
  12.176 -      : public IterableMapExtender<DefaultMap<Graph, UndirEdge, _Value> > {
  12.177 +    class UEdgeMap 
  12.178 +      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
  12.179      public:
  12.180 -      typedef MappableUndirBipartiteGraphExtender Graph;
  12.181 -      typedef IterableMapExtender<DefaultMap<Graph, UndirEdge, _Value> > 
  12.182 +      typedef MappableUBipartiteGraphExtender Graph;
  12.183 +      typedef IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > 
  12.184        Parent;
  12.185      
  12.186 -      UndirEdgeMap(const Graph& _g) 
  12.187 +      UEdgeMap(const Graph& _g) 
  12.188  	: Parent(_g) {}
  12.189 -      UndirEdgeMap(const Graph& _g, const _Value& _v) 
  12.190 +      UEdgeMap(const Graph& _g, const _Value& _v) 
  12.191  	: Parent(_g, _v) {}
  12.192      
  12.193 -      UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
  12.194 -	return operator=<UndirEdgeMap>(cmap);
  12.195 +      UEdgeMap& operator=(const UEdgeMap& cmap) {
  12.196 +	return operator=<UEdgeMap>(cmap);
  12.197        }
  12.198      
  12.199        template <typename CMap>
  12.200 -      UndirEdgeMap& operator=(const CMap& cmap) {
  12.201 -	checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
  12.202 +      UEdgeMap& operator=(const CMap& cmap) {
  12.203 +	checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
  12.204  	const typename Parent::Graph* graph = Parent::getGraph();
  12.205 -	UndirEdge it;
  12.206 +	UEdge it;
  12.207  	for (graph->first(it); it != INVALID; graph->next(it)) {
  12.208  	  Parent::set(it, cmap[it]);
  12.209  	}
    13.1 --- a/lemon/bits/erasable_graph_extender.h	Thu Jan 26 06:44:22 2006 +0000
    13.2 +++ b/lemon/bits/erasable_graph_extender.h	Thu Jan 26 15:42:13 2006 +0000
    13.3 @@ -62,14 +62,14 @@
    13.4    };
    13.5  
    13.6    template <typename _Base> 
    13.7 -  class ErasableUndirGraphExtender : public _Base {
    13.8 +  class ErasableUGraphExtender : public _Base {
    13.9    public:
   13.10  
   13.11 -    typedef ErasableUndirGraphExtender Graph;
   13.12 +    typedef ErasableUGraphExtender Graph;
   13.13      typedef _Base Parent;
   13.14  
   13.15      typedef typename Parent::Node Node;
   13.16 -    typedef typename Parent::UndirEdge UndirEdge;
   13.17 +    typedef typename Parent::UEdge UEdge;
   13.18      typedef typename Parent::Edge Edge;
   13.19  
   13.20      void erase(const Node& node) {
   13.21 @@ -84,34 +84,34 @@
   13.22        Parent::erase(node);
   13.23      }
   13.24      
   13.25 -    void erase(const UndirEdge& uedge) {
   13.26 +    void erase(const UEdge& uedge) {
   13.27        std::vector<Edge> edges;
   13.28        edges.push_back(Parent::direct(uedge,true));
   13.29        edges.push_back(Parent::direct(uedge,false));
   13.30        Parent::getNotifier(Edge()).erase(edges);
   13.31 -      Parent::getNotifier(UndirEdge()).erase(uedge);
   13.32 +      Parent::getNotifier(UEdge()).erase(uedge);
   13.33        Parent::erase(uedge);
   13.34      }
   13.35  
   13.36    };
   13.37  
   13.38    template <typename _Base> 
   13.39 -  class ErasableUndirEdgeSetExtender : public _Base {
   13.40 +  class ErasableUEdgeSetExtender : public _Base {
   13.41    public:
   13.42  
   13.43 -    typedef ErasableUndirEdgeSetExtender Graph;
   13.44 +    typedef ErasableUEdgeSetExtender Graph;
   13.45      typedef _Base Parent;
   13.46  
   13.47      typedef typename Parent::Node Node;
   13.48 -    typedef typename Parent::UndirEdge UndirEdge;
   13.49 +    typedef typename Parent::UEdge UEdge;
   13.50      typedef typename Parent::Edge Edge;
   13.51  
   13.52 -    void erase(const UndirEdge& uedge) {
   13.53 +    void erase(const UEdge& uedge) {
   13.54        std::vector<Edge> edges;
   13.55        edges.push_back(Parent::direct(uedge,true));
   13.56        edges.push_back(Parent::direct(uedge,false));
   13.57        Parent::getNotifier(Edge()).erase(edges);
   13.58 -      Parent::getNotifier(UndirEdge()).erase(uedge);
   13.59 +      Parent::getNotifier(UEdge()).erase(uedge);
   13.60        Parent::erase(uedge);
   13.61      }
   13.62  
    14.1 --- a/lemon/bits/extendable_graph_extender.h	Thu Jan 26 06:44:22 2006 +0000
    14.2 +++ b/lemon/bits/extendable_graph_extender.h	Thu Jan 26 15:42:13 2006 +0000
    14.3 @@ -48,15 +48,15 @@
    14.4    };
    14.5  
    14.6    template <typename _Base> 
    14.7 -  class ExtendableUndirGraphExtender : public _Base {
    14.8 +  class ExtendableUGraphExtender : public _Base {
    14.9    public:
   14.10  
   14.11 -    typedef ExtendableUndirGraphExtender Graph;
   14.12 +    typedef ExtendableUGraphExtender Graph;
   14.13      typedef _Base Parent;
   14.14  
   14.15      typedef typename Parent::Node Node;
   14.16      typedef typename Parent::Edge Edge;
   14.17 -    typedef typename Parent::UndirEdge UndirEdge;
   14.18 +    typedef typename Parent::UEdge UEdge;
   14.19  
   14.20      Node addNode() {
   14.21        Node node = Parent::addNode();
   14.22 @@ -64,9 +64,9 @@
   14.23        return node;
   14.24      }
   14.25  
   14.26 -    UndirEdge addEdge(const Node& from, const Node& to) {
   14.27 -      UndirEdge uedge = Parent::addEdge(from, to);
   14.28 -      Parent::getNotifier(UndirEdge()).add(uedge);
   14.29 +    UEdge addEdge(const Node& from, const Node& to) {
   14.30 +      UEdge uedge = Parent::addEdge(from, to);
   14.31 +      Parent::getNotifier(UEdge()).add(uedge);
   14.32  
   14.33        std::vector<Edge> edges;
   14.34        edges.push_back(Parent::direct(uedge, true));
   14.35 @@ -79,19 +79,19 @@
   14.36    };
   14.37  
   14.38    template <typename _Base> 
   14.39 -  class ExtendableUndirEdgeSetExtender : public _Base {
   14.40 +  class ExtendableUEdgeSetExtender : public _Base {
   14.41    public:
   14.42  
   14.43 -    typedef ExtendableUndirEdgeSetExtender Graph;
   14.44 +    typedef ExtendableUEdgeSetExtender Graph;
   14.45      typedef _Base Parent;
   14.46  
   14.47      typedef typename Parent::Node Node;
   14.48      typedef typename Parent::Edge Edge;
   14.49 -    typedef typename Parent::UndirEdge UndirEdge;
   14.50 +    typedef typename Parent::UEdge UEdge;
   14.51  
   14.52 -    UndirEdge addEdge(const Node& from, const Node& to) {
   14.53 -      UndirEdge uedge = Parent::addEdge(from, to);
   14.54 -      Parent::getNotifier(UndirEdge()).add(uedge);
   14.55 +    UEdge addEdge(const Node& from, const Node& to) {
   14.56 +      UEdge uedge = Parent::addEdge(from, to);
   14.57 +      Parent::getNotifier(UEdge()).add(uedge);
   14.58  
   14.59        std::vector<Edge> edges;
   14.60        edges.push_back(Parent::direct(uedge, true));
   14.61 @@ -105,17 +105,17 @@
   14.62  
   14.63  
   14.64    template <typename _Base>
   14.65 -  class ExtendableUndirBipartiteGraphExtender : public _Base {
   14.66 +  class ExtendableUBipartiteGraphExtender : public _Base {
   14.67    public:
   14.68  
   14.69      typedef _Base Parent;
   14.70 -    typedef ExtendableUndirBipartiteGraphExtender Graph;
   14.71 +    typedef ExtendableUBipartiteGraphExtender Graph;
   14.72    
   14.73      typedef typename Parent::Node Node;
   14.74      typedef typename Parent::LowerNode LowerNode;
   14.75      typedef typename Parent::UpperNode UpperNode;
   14.76      typedef typename Parent::Edge Edge;
   14.77 -    typedef typename Parent::UndirEdge UndirEdge;
   14.78 +    typedef typename Parent::UEdge UEdge;
   14.79    
   14.80      Node addUpperNode() {
   14.81        Node node = Parent::addUpperNode();
   14.82 @@ -131,16 +131,16 @@
   14.83        return node;
   14.84      }
   14.85    
   14.86 -    UndirEdge addEdge(const Node& source, const Node& target) {
   14.87 -      UndirEdge undiredge = Parent::addEdge(source, target);
   14.88 -      Parent::getNotifier(UndirEdge()).add(undiredge);
   14.89 +    UEdge addEdge(const Node& source, const Node& target) {
   14.90 +      UEdge uedge = Parent::addEdge(source, target);
   14.91 +      Parent::getNotifier(UEdge()).add(uedge);
   14.92      
   14.93        std::vector<Edge> edges;
   14.94 -      edges.push_back(Parent::direct(undiredge, true));
   14.95 -      edges.push_back(Parent::direct(undiredge, false));
   14.96 +      edges.push_back(Parent::direct(uedge, true));
   14.97 +      edges.push_back(Parent::direct(uedge, false));
   14.98        Parent::getNotifier(Edge()).add(edges);
   14.99      
  14.100 -      return undiredge;
  14.101 +      return uedge;
  14.102      }
  14.103  
  14.104    };
    15.1 --- a/lemon/bits/graph_extender.h	Thu Jan 26 06:44:22 2006 +0000
    15.2 +++ b/lemon/bits/graph_extender.h	Thu Jan 26 15:42:13 2006 +0000
    15.3 @@ -61,41 +61,41 @@
    15.4    };
    15.5  
    15.6    template <typename _Base>
    15.7 -  class UndirGraphExtender : public _Base {
    15.8 +  class UGraphExtender : public _Base {
    15.9      typedef _Base Parent;
   15.10 -    typedef UndirGraphExtender Graph;
   15.11 +    typedef UGraphExtender Graph;
   15.12  
   15.13    public:
   15.14  
   15.15 -    typedef typename Parent::Edge UndirEdge;
   15.16 +    typedef typename Parent::Edge UEdge;
   15.17      typedef typename Parent::Node Node;
   15.18  
   15.19 -    class Edge : public UndirEdge {
   15.20 -      friend class UndirGraphExtender;
   15.21 +    class Edge : public UEdge {
   15.22 +      friend class UGraphExtender;
   15.23  
   15.24      protected:
   15.25        // FIXME: Marci use opposite logic in his graph adaptors. It would
   15.26        // be reasonable to syncronize...
   15.27        bool forward;
   15.28  
   15.29 -      Edge(const UndirEdge &ue, bool _forward) :
   15.30 -        UndirEdge(ue), forward(_forward) {}
   15.31 +      Edge(const UEdge &ue, bool _forward) :
   15.32 +        UEdge(ue), forward(_forward) {}
   15.33  
   15.34      public:
   15.35        Edge() {}
   15.36  
   15.37        /// Invalid edge constructor
   15.38 -      Edge(Invalid i) : UndirEdge(i), forward(true) {}
   15.39 +      Edge(Invalid i) : UEdge(i), forward(true) {}
   15.40  
   15.41        bool operator==(const Edge &that) const {
   15.42 -	return forward==that.forward && UndirEdge(*this)==UndirEdge(that);
   15.43 +	return forward==that.forward && UEdge(*this)==UEdge(that);
   15.44        }
   15.45        bool operator!=(const Edge &that) const {
   15.46 -	return forward!=that.forward || UndirEdge(*this)!=UndirEdge(that);
   15.47 +	return forward!=that.forward || UEdge(*this)!=UEdge(that);
   15.48        }
   15.49        bool operator<(const Edge &that) const {
   15.50  	return forward<that.forward ||
   15.51 -	  (!(that.forward<forward) && UndirEdge(*this)<UndirEdge(that));
   15.52 +	  (!(that.forward<forward) && UEdge(*this)<UEdge(that));
   15.53        }
   15.54      };
   15.55  
   15.56 @@ -126,7 +126,7 @@
   15.57        return e.forward ? Parent::target(e) : Parent::source(e);
   15.58      }
   15.59  
   15.60 -    Node oppositeNode(const Node &n, const UndirEdge &e) const {
   15.61 +    Node oppositeNode(const Node &n, const UEdge &e) const {
   15.62        if( n == Parent::source(e))
   15.63  	return Parent::target(e);
   15.64        else if( n == Parent::target(e))
   15.65 @@ -137,19 +137,19 @@
   15.66  
   15.67      /// \brief Directed edge from an undirected edge and a source node.
   15.68      ///
   15.69 -    /// Returns a (directed) Edge corresponding to the specified UndirEdge
   15.70 +    /// Returns a (directed) Edge corresponding to the specified UEdge
   15.71      /// and source Node.
   15.72      ///
   15.73 -    Edge direct(const UndirEdge &ue, const Node &s) const {
   15.74 +    Edge direct(const UEdge &ue, const Node &s) const {
   15.75        return Edge(ue, s == source(ue));
   15.76      }
   15.77  
   15.78      /// \brief Directed edge from an undirected edge.
   15.79      ///
   15.80 -    /// Returns a directed edge corresponding to the specified UndirEdge.
   15.81 +    /// Returns a directed edge corresponding to the specified UEdge.
   15.82      /// If the given bool is true the given undirected edge and the
   15.83      /// returned edge have the same source node.
   15.84 -    Edge direct(const UndirEdge &ue, bool d) const {
   15.85 +    Edge direct(const UEdge &ue, bool d) const {
   15.86        return Edge(ue, d);
   15.87      }
   15.88  
   15.89 @@ -182,7 +182,7 @@
   15.90  
   15.91      void firstOut(Edge &e, const Node &n) const {
   15.92        Parent::firstIn(e,n);
   15.93 -      if( UndirEdge(e) != INVALID ) {
   15.94 +      if( UEdge(e) != INVALID ) {
   15.95  	e.forward = false;
   15.96        }
   15.97        else {
   15.98 @@ -194,7 +194,7 @@
   15.99        if( ! e.forward ) {
  15.100  	Node n = Parent::target(e);
  15.101  	Parent::nextIn(e);
  15.102 -	if( UndirEdge(e) == INVALID ) {
  15.103 +	if( UEdge(e) == INVALID ) {
  15.104  	  Parent::firstOut(e, n);
  15.105  	  e.forward = true;
  15.106  	}
  15.107 @@ -206,7 +206,7 @@
  15.108  
  15.109      void firstIn(Edge &e, const Node &n) const {
  15.110        Parent::firstOut(e,n);
  15.111 -      if( UndirEdge(e) != INVALID ) {
  15.112 +      if( UEdge(e) != INVALID ) {
  15.113  	e.forward = false;
  15.114        }
  15.115        else {
  15.116 @@ -218,7 +218,7 @@
  15.117        if( ! e.forward ) {
  15.118  	Node n = Parent::source(e);
  15.119  	Parent::nextOut(e);
  15.120 -	if( UndirEdge(e) == INVALID ) {
  15.121 +	if( UEdge(e) == INVALID ) {
  15.122  	  Parent::firstIn(e, n);
  15.123  	  e.forward = true;
  15.124  	}
  15.125 @@ -228,12 +228,12 @@
  15.126        }
  15.127      }
  15.128  
  15.129 -    void firstInc(UndirEdge &e, const Node &n) const {
  15.130 +    void firstInc(UEdge &e, const Node &n) const {
  15.131        Parent::firstOut(e, n);
  15.132        if (e != INVALID) return;
  15.133        Parent::firstIn(e, n);
  15.134      }
  15.135 -    void nextInc(UndirEdge &e, const Node &n) const {
  15.136 +    void nextInc(UEdge &e, const Node &n) const {
  15.137        if (Parent::source(e) == n) {
  15.138  	Parent::nextOut(e);
  15.139  	if (e != INVALID) return;
  15.140 @@ -243,14 +243,14 @@
  15.141        }
  15.142      }
  15.143  
  15.144 -    void firstInc(UndirEdge &e, bool &d, const Node &n) const {
  15.145 +    void firstInc(UEdge &e, bool &d, const Node &n) const {
  15.146        d = true;
  15.147        Parent::firstOut(e, n);
  15.148        if (e != INVALID) return;
  15.149        d = false;
  15.150        Parent::firstIn(e, n);
  15.151      }
  15.152 -    void nextInc(UndirEdge &e, bool &d) const {
  15.153 +    void nextInc(UEdge &e, bool &d) const {
  15.154        if (d) {
  15.155  	Node s = Parent::source(e);
  15.156  	Parent::nextOut(e);
  15.157 @@ -275,7 +275,7 @@
  15.158        return Parent::id(n);
  15.159      }
  15.160  
  15.161 -    int id(const UndirEdge &e) const {
  15.162 +    int id(const UEdge &e) const {
  15.163        return Parent::id(e);
  15.164      }
  15.165  
  15.166 @@ -291,7 +291,7 @@
  15.167        return 2 * Parent::maxEdgeId() + 1;
  15.168      }
  15.169  
  15.170 -    int maxUndirEdgeId() const {
  15.171 +    int maxUEdgeId() const {
  15.172        return Parent::maxEdgeId();
  15.173      }
  15.174  
  15.175 @@ -302,15 +302,15 @@
  15.176      int maxId(Edge) const {
  15.177        return maxEdgeId();
  15.178      }
  15.179 -    int maxId(UndirEdge) const {
  15.180 -      return maxUndirEdgeId();
  15.181 +    int maxId(UEdge) const {
  15.182 +      return maxUEdgeId();
  15.183      }
  15.184  
  15.185      int edgeNum() const {
  15.186        return 2 * Parent::edgeNum();
  15.187      }
  15.188  
  15.189 -    int undirEdgeNum() const {
  15.190 +    int uEdgeNum() const {
  15.191        return Parent::edgeNum();
  15.192      }
  15.193  
  15.194 @@ -322,7 +322,7 @@
  15.195        return direct(Parent::edgeFromId(id >> 1), bool(id & 1));
  15.196      }
  15.197  
  15.198 -    UndirEdge undirEdgeFromId(int id) const {
  15.199 +    UEdge uEdgeFromId(int id) const {
  15.200        return Parent::edgeFromId(id >> 1);
  15.201      }
  15.202  
  15.203 @@ -334,42 +334,42 @@
  15.204        return edgeFromId(id);
  15.205      }
  15.206  
  15.207 -    UndirEdge fromId(int id, UndirEdge) const {
  15.208 -      return undirEdgeFromId(id);
  15.209 +    UEdge fromId(int id, UEdge) const {
  15.210 +      return uEdgeFromId(id);
  15.211      }
  15.212  
  15.213  
  15.214      Edge findEdge(Node source, Node target, Edge prev) const {
  15.215        if (prev == INVALID) {
  15.216 -	UndirEdge edge = Parent::findEdge(source, target);
  15.217 +	UEdge edge = Parent::findEdge(source, target);
  15.218  	if (edge != INVALID) return direct(edge, true);
  15.219  	edge = Parent::findEdge(target, source);
  15.220  	if (edge != INVALID) return direct(edge, false);
  15.221        } else if (direction(prev)) {
  15.222 -	UndirEdge edge = Parent::findEdge(source, target, prev);
  15.223 +	UEdge edge = Parent::findEdge(source, target, prev);
  15.224  	if (edge != INVALID) return direct(edge, true);
  15.225  	edge = Parent::findEdge(target, source);
  15.226  	if (edge != INVALID) return direct(edge, false);	
  15.227        } else {
  15.228 -	UndirEdge edge = Parent::findEdge(target, source, prev);
  15.229 +	UEdge edge = Parent::findEdge(target, source, prev);
  15.230  	if (edge != INVALID) return direct(edge, false);	      
  15.231        }
  15.232        return INVALID;
  15.233      }
  15.234  
  15.235 -    UndirEdge findUndirEdge(Node source, Node target, UndirEdge prev) const {
  15.236 +    UEdge findUEdge(Node source, Node target, UEdge prev) const {
  15.237        if (prev == INVALID) {
  15.238 -	UndirEdge edge = Parent::findEdge(source, target);
  15.239 +	UEdge edge = Parent::findEdge(source, target);
  15.240  	if (edge != INVALID) return edge;
  15.241  	edge = Parent::findEdge(target, source);
  15.242  	if (edge != INVALID) return edge;
  15.243        } else if (Parent::source(prev) == source) {
  15.244 -	UndirEdge edge = Parent::findEdge(source, target, prev);
  15.245 +	UEdge edge = Parent::findEdge(source, target, prev);
  15.246  	if (edge != INVALID) return edge;
  15.247  	edge = Parent::findEdge(target, source);
  15.248  	if (edge != INVALID) return edge;	
  15.249        } else {
  15.250 -	UndirEdge edge = Parent::findEdge(target, source, prev);
  15.251 +	UEdge edge = Parent::findEdge(target, source, prev);
  15.252  	if (edge != INVALID) return edge;	      
  15.253        }
  15.254        return INVALID;
  15.255 @@ -379,36 +379,36 @@
  15.256  
  15.257  
  15.258    template <typename _Base>
  15.259 -  class UndirBipartiteGraphExtender : public _Base {
  15.260 +  class UBipartiteGraphExtender : public _Base {
  15.261    public:
  15.262      typedef _Base Parent;
  15.263 -    typedef UndirBipartiteGraphExtender Graph;
  15.264 +    typedef UBipartiteGraphExtender Graph;
  15.265  
  15.266      typedef typename Parent::Node Node;
  15.267 -    typedef typename Parent::Edge UndirEdge;
  15.268 +    typedef typename Parent::Edge UEdge;
  15.269  
  15.270      using Parent::first;
  15.271      using Parent::next;
  15.272  
  15.273      using Parent::id;
  15.274  
  15.275 -    Node source(const UndirEdge& edge) const {
  15.276 +    Node source(const UEdge& edge) const {
  15.277        return upperNode(edge);
  15.278      }
  15.279 -    Node target(const UndirEdge& edge) const {
  15.280 +    Node target(const UEdge& edge) const {
  15.281        return lowerNode(edge);
  15.282      }
  15.283  
  15.284 -    void firstInc(UndirEdge& edge, bool& direction, const Node& node) const {
  15.285 +    void firstInc(UEdge& edge, bool& direction, const Node& node) const {
  15.286        if (Parent::upper(node)) {
  15.287  	Parent::firstDown(edge, node);
  15.288  	direction = true;
  15.289        } else {
  15.290  	Parent::firstUp(edge, node);
  15.291 -	direction = static_cast<UndirEdge&>(edge) == INVALID;
  15.292 +	direction = static_cast<UEdge&>(edge) == INVALID;
  15.293        }
  15.294      }
  15.295 -    void nextInc(UndirEdge& edge, bool& direction) const {
  15.296 +    void nextInc(UEdge& edge, bool& direction) const {
  15.297        if (direction) {
  15.298  	Parent::nextDown(edge);
  15.299        } else {
  15.300 @@ -417,45 +417,45 @@
  15.301        }
  15.302      }
  15.303  
  15.304 -    int maxUndirEdgeId() const {
  15.305 +    int maxUEdgeId() const {
  15.306        return Parent::maxEdgeId();
  15.307      }
  15.308  
  15.309 -    UndirEdge undirEdgeFromId(int id) const {
  15.310 +    UEdge uEdgeFromId(int id) const {
  15.311        return Parent::edgeFromId(id);
  15.312      }
  15.313  
  15.314 -    class Edge : public UndirEdge {
  15.315 -      friend class UndirBipartiteGraphExtender;
  15.316 +    class Edge : public UEdge {
  15.317 +      friend class UBipartiteGraphExtender;
  15.318      protected:
  15.319        bool forward;
  15.320  
  15.321 -      Edge(const UndirEdge& edge, bool _forward)
  15.322 -	: UndirEdge(edge), forward(_forward) {}
  15.323 +      Edge(const UEdge& edge, bool _forward)
  15.324 +	: UEdge(edge), forward(_forward) {}
  15.325  
  15.326      public:
  15.327        Edge() {}
  15.328 -      Edge (Invalid) : UndirEdge(INVALID), forward(true) {}
  15.329 +      Edge (Invalid) : UEdge(INVALID), forward(true) {}
  15.330        bool operator==(const Edge& i) const {
  15.331 -	return UndirEdge::operator==(i) && forward == i.forward;
  15.332 +	return UEdge::operator==(i) && forward == i.forward;
  15.333        }
  15.334        bool operator!=(const Edge& i) const {
  15.335 -	return UndirEdge::operator!=(i) || forward != i.forward;
  15.336 +	return UEdge::operator!=(i) || forward != i.forward;
  15.337        }
  15.338        bool operator<(const Edge& i) const {
  15.339 -	return UndirEdge::operator<(i) || 
  15.340 -	  (!(i.forward<forward) && UndirEdge(*this)<UndirEdge(i));
  15.341 +	return UEdge::operator<(i) || 
  15.342 +	  (!(i.forward<forward) && UEdge(*this)<UEdge(i));
  15.343        }
  15.344      };
  15.345  
  15.346      void first(Edge& edge) const {
  15.347 -      Parent::first(static_cast<UndirEdge&>(edge));
  15.348 +      Parent::first(static_cast<UEdge&>(edge));
  15.349        edge.forward = true;
  15.350      }
  15.351  
  15.352      void next(Edge& edge) const {
  15.353        if (!edge.forward) {
  15.354 -	Parent::next(static_cast<UndirEdge&>(edge));
  15.355 +	Parent::next(static_cast<UEdge&>(edge));
  15.356        }
  15.357        edge.forward = !edge.forward;
  15.358      }
  15.359 @@ -466,7 +466,7 @@
  15.360  	edge.forward = true;
  15.361        } else {
  15.362  	Parent::firstUp(edge, node);
  15.363 -	edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
  15.364 +	edge.forward = static_cast<UEdge&>(edge) == INVALID;
  15.365        }
  15.366      }
  15.367      void nextOut(Edge& edge) const {
  15.368 @@ -474,7 +474,7 @@
  15.369  	Parent::nextDown(edge);
  15.370        } else {
  15.371  	Parent::nextUp(edge);
  15.372 -        edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
  15.373 +        edge.forward = static_cast<UEdge&>(edge) == INVALID;
  15.374        }
  15.375      }
  15.376  
  15.377 @@ -484,7 +484,7 @@
  15.378  	edge.forward = true;	
  15.379        } else {
  15.380  	Parent::firstDown(edge, node);
  15.381 -	edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
  15.382 +	edge.forward = static_cast<UEdge&>(edge) == INVALID;
  15.383        }
  15.384      }
  15.385      void nextIn(Edge& edge) const {
  15.386 @@ -492,7 +492,7 @@
  15.387  	Parent::nextUp(edge);
  15.388        } else {
  15.389  	Parent::nextDown(edge);
  15.390 -	edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
  15.391 +	edge.forward = static_cast<UEdge&>(edge) == INVALID;
  15.392        }
  15.393      }
  15.394  
  15.395 @@ -507,15 +507,15 @@
  15.396        return edge.forward;
  15.397      }
  15.398  
  15.399 -    Edge direct(const UndirEdge& edge, const Node& node) const {
  15.400 +    Edge direct(const UEdge& edge, const Node& node) const {
  15.401        return Edge(edge, node == Parent::source(edge));
  15.402      }
  15.403  
  15.404 -    Edge direct(const UndirEdge& edge, bool direction) const {
  15.405 +    Edge direct(const UEdge& edge, bool direction) const {
  15.406        return Edge(edge, direction);
  15.407      }
  15.408  
  15.409 -    Node oppositeNode(const UndirEdge& edge, const Node& node) const {
  15.410 +    Node oppositeNode(const UEdge& edge, const Node& node) const {
  15.411        return source(edge) == node ? 
  15.412  	target(edge) : source(edge);
  15.413      }
  15.414 @@ -528,14 +528,14 @@
  15.415        return (Parent::id(edge) << 1) + (edge.forward ? 0 : 1);
  15.416      }
  15.417      Edge edgeFromId(int id) const {
  15.418 -      return Edge(Parent::fromId(id >> 1, UndirEdge()), (id & 1) == 0);
  15.419 +      return Edge(Parent::fromId(id >> 1, UEdge()), (id & 1) == 0);
  15.420      }
  15.421      int maxEdgeId() const {
  15.422 -      return (Parent::maxId(UndirEdge()) << 1) + 1;
  15.423 +      return (Parent::maxId(UEdge()) << 1) + 1;
  15.424      }
  15.425  
  15.426      class UpperNode : public Node {
  15.427 -      friend class UndirBipartiteGraphExtender;
  15.428 +      friend class UBipartiteGraphExtender;
  15.429      public:
  15.430        UpperNode() {}
  15.431        UpperNode(const Node& node) : Node(node) {
  15.432 @@ -557,7 +557,7 @@
  15.433      }
  15.434  
  15.435      class LowerNode : public Node {
  15.436 -      friend class UndirBipartiteGraphExtender;
  15.437 +      friend class UBipartiteGraphExtender;
  15.438      public:
  15.439        LowerNode() {}
  15.440        LowerNode(const Node& node) : Node(node) {
  15.441 @@ -592,8 +592,8 @@
  15.442      int maxId(Edge) const {
  15.443        return maxEdgeId();
  15.444      }
  15.445 -    int maxId(UndirEdge) const {
  15.446 -      return maxUndirEdgeId();
  15.447 +    int maxId(UEdge) const {
  15.448 +      return maxUEdgeId();
  15.449      }
  15.450  
  15.451  
  15.452 @@ -609,8 +609,8 @@
  15.453      Edge fromId(int id, Edge) const {
  15.454        return edgeFromId(id);
  15.455      }
  15.456 -    UndirEdge fromId(int id, UndirEdge) const {
  15.457 -      return undirEdgeFromId(id);
  15.458 +    UEdge fromId(int id, UEdge) const {
  15.459 +      return uEdgeFromId(id);
  15.460      }
  15.461  
  15.462    };
    16.1 --- a/lemon/bits/iterable_graph_extender.h	Thu Jan 26 06:44:22 2006 +0000
    16.2 +++ b/lemon/bits/iterable_graph_extender.h	Thu Jan 26 15:42:13 2006 +0000
    16.3 @@ -16,7 +16,7 @@
    16.4      ///\todo Better name?
    16.5      ///
    16.6      ///\bug Should it be here?
    16.7 -    typedef False UndirTag;
    16.8 +    typedef False UTag;
    16.9  
   16.10      typedef _Base Parent;
   16.11      typedef IterableGraphExtender<_Base> Graph;
   16.12 @@ -174,7 +174,7 @@
   16.13  
   16.14    
   16.15    template <typename _Base>
   16.16 -  class IterableUndirGraphExtender : public IterableGraphExtender<_Base> {
   16.17 +  class IterableUGraphExtender : public IterableGraphExtender<_Base> {
   16.18    public:
   16.19  
   16.20      /// Indicates that the graph is undirected.
   16.21 @@ -184,52 +184,52 @@
   16.22      ///\bug Should it be here?
   16.23      ///\bug Should be tested in the concept checker whether it is defined
   16.24      ///correctly.
   16.25 -    typedef True UndirTag;
   16.26 +    typedef True UTag;
   16.27  
   16.28      typedef IterableGraphExtender<_Base> Parent;
   16.29 -    typedef IterableUndirGraphExtender<_Base> Graph;
   16.30 +    typedef IterableUGraphExtender<_Base> Graph;
   16.31      typedef typename Parent::Node Node;
   16.32      typedef typename Parent::Edge Edge;
   16.33 -    typedef typename Parent::UndirEdge UndirEdge;
   16.34 +    typedef typename Parent::UEdge UEdge;
   16.35  
   16.36 -    class UndirEdgeIt : public Parent::UndirEdge { 
   16.37 +    class UEdgeIt : public Parent::UEdge { 
   16.38        const Graph* graph;
   16.39      public:
   16.40  
   16.41 -      UndirEdgeIt() { }
   16.42 +      UEdgeIt() { }
   16.43  
   16.44 -      UndirEdgeIt(Invalid i) : UndirEdge(i) { }
   16.45 +      UEdgeIt(Invalid i) : UEdge(i) { }
   16.46  
   16.47 -      explicit UndirEdgeIt(const Graph& _graph) : graph(&_graph) {
   16.48 -	_graph.first(*static_cast<UndirEdge*>(this));
   16.49 +      explicit UEdgeIt(const Graph& _graph) : graph(&_graph) {
   16.50 +	_graph.first(*static_cast<UEdge*>(this));
   16.51        }
   16.52  
   16.53 -      UndirEdgeIt(const Graph& _graph, const UndirEdge& e) : 
   16.54 -	UndirEdge(e), graph(&_graph) { }
   16.55 +      UEdgeIt(const Graph& _graph, const UEdge& e) : 
   16.56 +	UEdge(e), graph(&_graph) { }
   16.57  
   16.58 -      UndirEdgeIt& operator++() { 
   16.59 +      UEdgeIt& operator++() { 
   16.60  	graph->next(*this);
   16.61  	return *this; 
   16.62        }
   16.63  
   16.64      };
   16.65  
   16.66 -    class IncEdgeIt : public Parent::UndirEdge { 
   16.67 +    class IncEdgeIt : public Parent::UEdge { 
   16.68        const Graph* graph;
   16.69        bool direction;
   16.70 -      friend class IterableUndirGraphExtender;
   16.71 +      friend class IterableUGraphExtender;
   16.72      public:
   16.73  
   16.74        IncEdgeIt() { }
   16.75  
   16.76 -      IncEdgeIt(Invalid i) : UndirEdge(i), direction(false) { }
   16.77 +      IncEdgeIt(Invalid i) : UEdge(i), direction(false) { }
   16.78  
   16.79        IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
   16.80  	_graph.firstInc(*this, direction, n);
   16.81        }
   16.82  
   16.83 -      IncEdgeIt(const Graph& _graph, const UndirEdge &ue, const Node &n)
   16.84 -	: graph(&_graph), UndirEdge(ue) {
   16.85 +      IncEdgeIt(const Graph& _graph, const UEdge &ue, const Node &n)
   16.86 +	: graph(&_graph), UEdge(ue) {
   16.87  	direction = (_graph.source(ue) == n);
   16.88        }
   16.89  
   16.90 @@ -258,7 +258,7 @@
   16.91      /// \brief The opposite node on the given undirected edge.
   16.92      ///
   16.93      /// Gives back the opposite on the given undirected edge.
   16.94 -    Node oppositeNode(const Node& n, const UndirEdge& e) const {
   16.95 +    Node oppositeNode(const Node& n, const UEdge& e) const {
   16.96        if (Parent::source(e) == n) {
   16.97  	return Parent::target(e);
   16.98        } else {
   16.99 @@ -270,16 +270,16 @@
  16.100  
  16.101  
  16.102    template <typename _Base>
  16.103 -  class IterableUndirBipartiteGraphExtender : public _Base {
  16.104 +  class IterableUBipartiteGraphExtender : public _Base {
  16.105    public:
  16.106      typedef _Base Parent;
  16.107 -    typedef IterableUndirBipartiteGraphExtender Graph;
  16.108 +    typedef IterableUBipartiteGraphExtender Graph;
  16.109     
  16.110      typedef typename Parent::Node Node;
  16.111      typedef typename Parent::UpperNode UpperNode;
  16.112      typedef typename Parent::LowerNode LowerNode;
  16.113      typedef typename Parent::Edge Edge;
  16.114 -    typedef typename Parent::UndirEdge UndirEdge;
  16.115 +    typedef typename Parent::UEdge UEdge;
  16.116    
  16.117      class NodeIt : public Node { 
  16.118        const Graph* graph;
  16.119 @@ -304,7 +304,7 @@
  16.120      };
  16.121  
  16.122      class UpperNodeIt : public Node { 
  16.123 -      friend class IterableUndirBipartiteGraphExtender;
  16.124 +      friend class IterableUBipartiteGraphExtender;
  16.125        const Graph* graph;
  16.126      public:
  16.127      
  16.128 @@ -326,7 +326,7 @@
  16.129      };
  16.130  
  16.131      class LowerNodeIt : public Node { 
  16.132 -      friend class IterableUndirBipartiteGraphExtender;
  16.133 +      friend class IterableUBipartiteGraphExtender;
  16.134        const Graph* graph;
  16.135      public:
  16.136      
  16.137 @@ -348,7 +348,7 @@
  16.138      };
  16.139  
  16.140      class EdgeIt : public Edge { 
  16.141 -      friend class IterableUndirBipartiteGraphExtender;
  16.142 +      friend class IterableUBipartiteGraphExtender;
  16.143        const Graph* graph;
  16.144      public:
  16.145      
  16.146 @@ -370,30 +370,30 @@
  16.147  
  16.148      };
  16.149  
  16.150 -    class UndirEdgeIt : public UndirEdge { 
  16.151 -      friend class IterableUndirBipartiteGraphExtender;
  16.152 +    class UEdgeIt : public UEdge { 
  16.153 +      friend class IterableUBipartiteGraphExtender;
  16.154        const Graph* graph;
  16.155      public:
  16.156      
  16.157 -      UndirEdgeIt() { }
  16.158 +      UEdgeIt() { }
  16.159      
  16.160 -      UndirEdgeIt(Invalid i) : UndirEdge(INVALID) { }
  16.161 +      UEdgeIt(Invalid i) : UEdge(INVALID) { }
  16.162      
  16.163 -      explicit UndirEdgeIt(const Graph& _graph) : graph(&_graph) {
  16.164 -	graph->first(static_cast<UndirEdge&>(*this));
  16.165 +      explicit UEdgeIt(const Graph& _graph) : graph(&_graph) {
  16.166 +	graph->first(static_cast<UEdge&>(*this));
  16.167        }
  16.168  
  16.169 -      UndirEdgeIt(const Graph& _graph, const UndirEdge& edge) 
  16.170 -	: UndirEdge(edge), graph(&_graph) { }
  16.171 +      UEdgeIt(const Graph& _graph, const UEdge& edge) 
  16.172 +	: UEdge(edge), graph(&_graph) { }
  16.173      
  16.174 -      UndirEdgeIt& operator++() { 
  16.175 +      UEdgeIt& operator++() { 
  16.176  	graph->next(*this);
  16.177  	return *this; 
  16.178        }
  16.179      };
  16.180  
  16.181      class OutEdgeIt : public Edge { 
  16.182 -      friend class IterableUndirBipartiteGraphExtender;
  16.183 +      friend class IterableUBipartiteGraphExtender;
  16.184        const Graph* graph;
  16.185      public:
  16.186      
  16.187 @@ -418,7 +418,7 @@
  16.188  
  16.189  
  16.190      class InEdgeIt : public Edge { 
  16.191 -      friend class IterableUndirBipartiteGraphExtender;
  16.192 +      friend class IterableUBipartiteGraphExtender;
  16.193        const Graph* graph;
  16.194      public:
  16.195      
  16.196 @@ -469,22 +469,22 @@
  16.197        return Parent::source((Edge&)e);
  16.198      }
  16.199    
  16.200 -    class IncEdgeIt : public Parent::UndirEdge { 
  16.201 -      friend class IterableUndirBipartiteGraphExtender;
  16.202 +    class IncEdgeIt : public Parent::UEdge { 
  16.203 +      friend class IterableUBipartiteGraphExtender;
  16.204        const Graph* graph;
  16.205        bool direction;
  16.206      public:
  16.207      
  16.208        IncEdgeIt() { }
  16.209      
  16.210 -      IncEdgeIt(Invalid i) : UndirEdge(i), direction(true) { }
  16.211 +      IncEdgeIt(Invalid i) : UEdge(i), direction(true) { }
  16.212      
  16.213        IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
  16.214  	graph->firstInc(*this, direction, n);
  16.215        }
  16.216  
  16.217 -      IncEdgeIt(const Graph& _graph, const UndirEdge &ue, const Node &n)
  16.218 -	: graph(&_graph), UndirEdge(ue) {
  16.219 +      IncEdgeIt(const Graph& _graph, const UEdge &ue, const Node &n)
  16.220 +	: graph(&_graph), UEdge(ue) {
  16.221  	direction = (graph->source(ue) == n);
  16.222        }
  16.223  
    17.1 --- a/lemon/bits/static_map.h	Thu Jan 26 06:44:22 2006 +0000
    17.2 +++ b/lemon/bits/static_map.h	Thu Jan 26 15:42:13 2006 +0000
    17.3 @@ -305,37 +305,37 @@
    17.4  
    17.5    /// \e
    17.6    template <typename _Base> 
    17.7 -  class StaticMappableUndirGraphExtender : 
    17.8 +  class StaticMappableUGraphExtender : 
    17.9      public StaticMappableGraphExtender<_Base> {
   17.10    public:
   17.11  
   17.12 -    typedef StaticMappableUndirGraphExtender Graph;
   17.13 +    typedef StaticMappableUGraphExtender Graph;
   17.14      typedef StaticMappableGraphExtender<_Base> Parent;
   17.15  
   17.16 -    typedef typename Parent::UndirEdge UndirEdge;
   17.17 +    typedef typename Parent::UEdge UEdge;
   17.18  
   17.19      template <typename _Value>
   17.20 -    class UndirEdgeMap 
   17.21 -      : public IterableMapExtender<StaticMap<Graph, UndirEdge, _Value> > {
   17.22 +    class UEdgeMap 
   17.23 +      : public IterableMapExtender<StaticMap<Graph, UEdge, _Value> > {
   17.24      public:
   17.25 -      typedef StaticMappableUndirGraphExtender Graph;
   17.26 +      typedef StaticMappableUGraphExtender Graph;
   17.27        typedef IterableMapExtender<
   17.28 -	StaticMap<Graph, UndirEdge, _Value> > Parent;
   17.29 +	StaticMap<Graph, UEdge, _Value> > Parent;
   17.30  
   17.31 -      UndirEdgeMap(const Graph& _g) 
   17.32 +      UEdgeMap(const Graph& _g) 
   17.33  	: Parent(_g) {}
   17.34 -      UndirEdgeMap(const Graph& _g, const _Value& _v) 
   17.35 +      UEdgeMap(const Graph& _g, const _Value& _v) 
   17.36  	: Parent(_g, _v) {}
   17.37  
   17.38 -      UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
   17.39 -	return operator=<UndirEdgeMap>(cmap);
   17.40 +      UEdgeMap& operator=(const UEdgeMap& cmap) {
   17.41 +	return operator=<UEdgeMap>(cmap);
   17.42        }
   17.43  
   17.44        template <typename CMap>
   17.45 -      UndirEdgeMap& operator=(const CMap& cmap) {
   17.46 -	checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
   17.47 +      UEdgeMap& operator=(const CMap& cmap) {
   17.48 +	checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
   17.49  	const typename Parent::Graph* graph = Parent::getGraph();
   17.50 -	UndirEdge it;
   17.51 +	UEdge it;
   17.52  	for (graph->first(it); it != INVALID; graph->next(it)) {
   17.53  	  Parent::set(it, cmap[it]);
   17.54  	}
   17.55 @@ -346,23 +346,23 @@
   17.56    };
   17.57  
   17.58    template <typename _Base>
   17.59 -  class StaticMappableUndirBipartiteGraphExtender : public _Base {
   17.60 +  class StaticMappableUBipartiteGraphExtender : public _Base {
   17.61    public:
   17.62  
   17.63      typedef _Base Parent;
   17.64 -    typedef StaticMappableUndirBipartiteGraphExtender Graph;
   17.65 +    typedef StaticMappableUBipartiteGraphExtender Graph;
   17.66  
   17.67      typedef typename Parent::Node Node;
   17.68      typedef typename Parent::UpperNode UpperNode;
   17.69      typedef typename Parent::LowerNode LowerNode;
   17.70      typedef typename Parent::Edge Edge;
   17.71 -    typedef typename Parent::UndirEdge UndirEdge;
   17.72 +    typedef typename Parent::UEdge UEdge;
   17.73      
   17.74      template <typename _Value>
   17.75      class UpperNodeMap 
   17.76        : public IterableMapExtender<StaticMap<Graph, UpperNode, _Value> > {
   17.77      public:
   17.78 -      typedef StaticMappableUndirBipartiteGraphExtender Graph;
   17.79 +      typedef StaticMappableUBipartiteGraphExtender Graph;
   17.80        typedef IterableMapExtender<StaticMap<Graph, UpperNode, _Value> > 
   17.81        Parent;
   17.82      
   17.83 @@ -399,7 +399,7 @@
   17.84      class LowerNodeMap 
   17.85        : public IterableMapExtender<StaticMap<Graph, LowerNode, _Value> > {
   17.86      public:
   17.87 -      typedef StaticMappableUndirBipartiteGraphExtender Graph;
   17.88 +      typedef StaticMappableUBipartiteGraphExtender Graph;
   17.89        typedef IterableMapExtender<StaticMap<Graph, LowerNode, _Value> > 
   17.90        Parent;
   17.91      
   17.92 @@ -437,7 +437,7 @@
   17.93      template <typename _Value>
   17.94      class NodeMapBase : public Parent::NodeNotifier::ObserverBase {
   17.95      public:
   17.96 -      typedef StaticMappableUndirBipartiteGraphExtender Graph;
   17.97 +      typedef StaticMappableUBipartiteGraphExtender Graph;
   17.98  
   17.99        typedef Node Key;
  17.100        typedef _Value Value;
  17.101 @@ -517,7 +517,7 @@
  17.102      class NodeMap 
  17.103        : public IterableMapExtender<NodeMapBase<_Value> > {
  17.104      public:
  17.105 -      typedef StaticMappableUndirBipartiteGraphExtender Graph;
  17.106 +      typedef StaticMappableUBipartiteGraphExtender Graph;
  17.107        typedef IterableMapExtender< NodeMapBase<_Value> > Parent;
  17.108      
  17.109        NodeMap(const Graph& _g) 
  17.110 @@ -555,7 +555,7 @@
  17.111      class EdgeMap 
  17.112        : public IterableMapExtender<StaticMap<Graph, Edge, _Value> > {
  17.113      public:
  17.114 -      typedef StaticMappableUndirBipartiteGraphExtender Graph;
  17.115 +      typedef StaticMappableUBipartiteGraphExtender Graph;
  17.116        typedef IterableMapExtender<StaticMap<Graph, Edge, _Value> > Parent;
  17.117      
  17.118        EdgeMap(const Graph& _g) 
  17.119 @@ -580,27 +580,27 @@
  17.120      };
  17.121  
  17.122      template <typename _Value>
  17.123 -    class UndirEdgeMap 
  17.124 -      : public IterableMapExtender<StaticMap<Graph, UndirEdge, _Value> > {
  17.125 +    class UEdgeMap 
  17.126 +      : public IterableMapExtender<StaticMap<Graph, UEdge, _Value> > {
  17.127      public:
  17.128 -      typedef StaticMappableUndirBipartiteGraphExtender Graph;
  17.129 -      typedef IterableMapExtender<StaticMap<Graph, UndirEdge, _Value> > 
  17.130 +      typedef StaticMappableUBipartiteGraphExtender Graph;
  17.131 +      typedef IterableMapExtender<StaticMap<Graph, UEdge, _Value> > 
  17.132        Parent;
  17.133      
  17.134 -      UndirEdgeMap(const Graph& _g) 
  17.135 +      UEdgeMap(const Graph& _g) 
  17.136  	: Parent(_g) {}
  17.137 -      UndirEdgeMap(const Graph& _g, const _Value& _v) 
  17.138 +      UEdgeMap(const Graph& _g, const _Value& _v) 
  17.139  	: Parent(_g, _v) {}
  17.140      
  17.141 -      UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
  17.142 -	return operator=<UndirEdgeMap>(cmap);
  17.143 +      UEdgeMap& operator=(const UEdgeMap& cmap) {
  17.144 +	return operator=<UEdgeMap>(cmap);
  17.145        }
  17.146      
  17.147        template <typename CMap>
  17.148 -      UndirEdgeMap& operator=(const CMap& cmap) {
  17.149 -	checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
  17.150 +      UEdgeMap& operator=(const CMap& cmap) {
  17.151 +	checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
  17.152  	const typename Parent::Graph* graph = Parent::getGraph();
  17.153 -	UndirEdge it;
  17.154 +	UEdge it;
  17.155  	for (graph->first(it); it != INVALID; graph->next(it)) {
  17.156  	  Parent::set(it, cmap[it]);
  17.157  	}
    18.1 --- a/lemon/concept/graph.h	Thu Jan 26 06:44:22 2006 +0000
    18.2 +++ b/lemon/concept/graph.h	Thu Jan 26 15:42:13 2006 +0000
    18.3 @@ -42,7 +42,7 @@
    18.4           public IterableGraphComponent, public MappableGraphComponent {
    18.5      public:
    18.6  
    18.7 -      typedef False UndirTag;
    18.8 +      typedef False UTag;
    18.9        
   18.10        typedef BaseGraphComponent::Node Node;
   18.11        typedef BaseGraphComponent::Edge Edge;
   18.12 @@ -123,7 +123,7 @@
   18.13  
   18.14        ///\todo undocumented
   18.15        ///
   18.16 -      typedef False UndirTag;
   18.17 +      typedef False UTag;
   18.18  
   18.19        /// Defalult constructor.
   18.20  
    19.1 --- a/lemon/concept/graph_component.h	Thu Jan 26 06:44:22 2006 +0000
    19.2 +++ b/lemon/concept/graph_component.h	Thu Jan 26 15:42:13 2006 +0000
    19.3 @@ -34,7 +34,7 @@
    19.4  
    19.5      /// Skeleton class for graph Node and Edge types
    19.6  
    19.7 -    /// This class describes the interface of Node and Edge (and UndirEdge
    19.8 +    /// This class describes the interface of Node and Edge (and UEdge
    19.9      /// in undirected graphs) subtypes of graph types.
   19.10      ///
   19.11      /// \note This class is a template class so that we can use it to
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/lemon/concept/ugraph.h	Thu Jan 26 15:42:13 2006 +0000
    20.3 @@ -0,0 +1,995 @@
    20.4 +/* -*- C++ -*-
    20.5 + *
    20.6 + * lemon/concept/ugraph_component.h - Part of LEMON, a generic
    20.7 + * C++ optimization library
    20.8 + *
    20.9 + * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi
   20.10 + * Kutatocsoport (Egervary Research Group on Combinatorial Optimization,
   20.11 + * EGRES).
   20.12 + *
   20.13 + * Permission to use, modify and distribute this software is granted
   20.14 + * provided that this copyright notice appears in all copies. For
   20.15 + * precise terms see the accompanying LICENSE file.
   20.16 + *
   20.17 + * This software is provided "AS IS" with no warranty of any kind,
   20.18 + * express or implied, and with no claim as to its suitability for any
   20.19 + * purpose.
   20.20 + *
   20.21 + */
   20.22 +
   20.23 +///\ingroup graph_concepts
   20.24 +///\file
   20.25 +///\brief Undirected graphs and components of.
   20.26 +
   20.27 +
   20.28 +#ifndef LEMON_CONCEPT_UNDIR_GRAPH_H
   20.29 +#define LEMON_CONCEPT_UNDIR_GRAPH_H
   20.30 +
   20.31 +#include <lemon/concept/graph_component.h>
   20.32 +#include <lemon/concept/graph.h>
   20.33 +#include <lemon/utility.h>
   20.34 +
   20.35 +namespace lemon {
   20.36 +  namespace concept {
   20.37 +
   20.38 +//     /// Skeleton class which describes an edge with direction in \ref
   20.39 +//     /// UGraph "undirected graph".
   20.40 +    template <typename UGraph>
   20.41 +    class UGraphEdge : public UGraph::UEdge {
   20.42 +      typedef typename UGraph::UEdge UEdge;
   20.43 +      typedef typename UGraph::Node Node;
   20.44 +    public:
   20.45 +
   20.46 +      /// \e
   20.47 +      UGraphEdge() {}
   20.48 +
   20.49 +      /// \e
   20.50 +      UGraphEdge(const UGraphEdge& e) : UGraph::UEdge(e) {}
   20.51 +
   20.52 +      /// \e
   20.53 +      UGraphEdge(Invalid) {}
   20.54 +
   20.55 +      /// \brief Directed edge from undirected edge and a source node.
   20.56 +      ///
   20.57 +      /// Constructs a directed edge from undirected edge and a source node.
   20.58 +      ///
   20.59 +      /// \note You have to specify the graph for this constructor.
   20.60 +      UGraphEdge(const UGraph &g,
   20.61 +		     UEdge u_edge, Node n) {
   20.62 +	ignore_unused_variable_warning(u_edge);
   20.63 +	ignore_unused_variable_warning(g);
   20.64 +	ignore_unused_variable_warning(n);
   20.65 +      }
   20.66 +
   20.67 +      /// \e
   20.68 +      UGraphEdge& operator=(UGraphEdge) { return *this; }
   20.69 +
   20.70 +      /// \e
   20.71 +      bool operator==(UGraphEdge) const { return true; }
   20.72 +      /// \e
   20.73 +      bool operator!=(UGraphEdge) const { return false; }
   20.74 +
   20.75 +      /// \e
   20.76 +      bool operator<(UGraphEdge) const { return false; }
   20.77 +
   20.78 +      template <typename Edge>
   20.79 +      struct Constraints {
   20.80 +	void constraints() {
   20.81 +	  const_constraints();
   20.82 +	}
   20.83 +	void const_constraints() const {
   20.84 +	  /// \bug This should be is_base_and_derived ...
   20.85 +	  UEdge ue = e;
   20.86 +	  ue = e;
   20.87 +
   20.88 +	  Edge e_with_source(graph,ue,n);
   20.89 +	  ignore_unused_variable_warning(e_with_source);
   20.90 +	}
   20.91 +	Edge e;
   20.92 +	UEdge ue;
   20.93 +	UGraph graph;
   20.94 +	Node n;
   20.95 +      };
   20.96 +    };
   20.97 +    
   20.98 +
   20.99 +    struct BaseIterableUGraphConcept {
  20.100 +
  20.101 +      template <typename Graph>
  20.102 +      struct Constraints {
  20.103 +
  20.104 +	typedef typename Graph::UEdge UEdge;
  20.105 +	typedef typename Graph::Edge Edge;
  20.106 +	typedef typename Graph::Node Node;
  20.107 +
  20.108 +	void constraints() {
  20.109 +	  checkConcept<BaseIterableGraphComponent, Graph>();
  20.110 +	  checkConcept<GraphItem<>, UEdge>();
  20.111 +	  //checkConcept<UGraphEdge<Graph>, Edge>();
  20.112 +
  20.113 +	  graph.first(ue);
  20.114 +	  graph.next(ue);
  20.115 +
  20.116 +	  const_constraints();
  20.117 +	}
  20.118 +	void const_constraints() {
  20.119 +	  Node n;
  20.120 +	  n = graph.target(ue);
  20.121 +	  n = graph.source(ue);
  20.122 +	  n = graph.oppositeNode(n0, ue);
  20.123 +
  20.124 +	  bool b;
  20.125 +	  b = graph.direction(e);
  20.126 +	  Edge e = graph.direct(UEdge(), true);
  20.127 +	  e = graph.direct(UEdge(), n);
  20.128 + 
  20.129 +	  ignore_unused_variable_warning(b);
  20.130 +	}
  20.131 +
  20.132 +	Graph graph;
  20.133 +	Edge e;
  20.134 +	Node n0;
  20.135 +	UEdge ue;
  20.136 +      };
  20.137 +
  20.138 +    };
  20.139 +
  20.140 +
  20.141 +    struct IterableUGraphConcept {
  20.142 +
  20.143 +      template <typename Graph>
  20.144 +      struct Constraints {
  20.145 +	void constraints() {
  20.146 +	  /// \todo we don't need the iterable component to be base iterable
  20.147 +	  /// Don't we really???
  20.148 +	  //checkConcept< BaseIterableUGraphConcept, Graph > ();
  20.149 +
  20.150 +	  checkConcept<IterableGraphComponent, Graph> ();
  20.151 +
  20.152 +	  typedef typename Graph::UEdge UEdge;
  20.153 +	  typedef typename Graph::UEdgeIt UEdgeIt;
  20.154 +	  typedef typename Graph::IncEdgeIt IncEdgeIt;
  20.155 +
  20.156 +	  checkConcept<GraphIterator<Graph, UEdge>, UEdgeIt>();
  20.157 +	  checkConcept<GraphIncIterator<Graph, UEdge>, IncEdgeIt>();
  20.158 +	}
  20.159 +      };
  20.160 +
  20.161 +    };
  20.162 +
  20.163 +    struct MappableUGraphConcept {
  20.164 +
  20.165 +      template <typename Graph>
  20.166 +      struct Constraints {
  20.167 +
  20.168 +	struct Dummy {
  20.169 +	  int value;
  20.170 +	  Dummy() : value(0) {}
  20.171 +	  Dummy(int _v) : value(_v) {}
  20.172 +	};
  20.173 +
  20.174 +	void constraints() {
  20.175 +	  checkConcept<MappableGraphComponent, Graph>();
  20.176 +
  20.177 +	  typedef typename Graph::template UEdgeMap<int> IntMap;
  20.178 +	  checkConcept<GraphMap<Graph, typename Graph::UEdge, int>,
  20.179 +	    IntMap >();
  20.180 +
  20.181 +	  typedef typename Graph::template UEdgeMap<bool> BoolMap;
  20.182 +	  checkConcept<GraphMap<Graph, typename Graph::UEdge, bool>,
  20.183 +	    BoolMap >();
  20.184 +
  20.185 +	  typedef typename Graph::template UEdgeMap<Dummy> DummyMap;
  20.186 +	  checkConcept<GraphMap<Graph, typename Graph::UEdge, Dummy>,
  20.187 +	    DummyMap >();
  20.188 +	}
  20.189 +      };
  20.190 +
  20.191 +    };
  20.192 +
  20.193 +    struct ExtendableUGraphConcept {
  20.194 +
  20.195 +      template <typename Graph>
  20.196 +      struct Constraints {
  20.197 +	void constraints() {
  20.198 +	  node_a = graph.addNode();
  20.199 +	  uedge = graph.addEdge(node_a, node_b);
  20.200 +	}
  20.201 +	typename Graph::Node node_a, node_b;
  20.202 +	typename Graph::UEdge uedge;
  20.203 +	Graph graph;
  20.204 +      };
  20.205 +
  20.206 +    };
  20.207 +
  20.208 +    struct ErasableUGraphConcept {
  20.209 +
  20.210 +      template <typename Graph>
  20.211 +      struct Constraints {
  20.212 +	void constraints() {
  20.213 +	  graph.erase(n);
  20.214 +	  graph.erase(e);
  20.215 +	}
  20.216 +	Graph graph;
  20.217 +	typename Graph::Node n;
  20.218 +	typename Graph::UEdge e;
  20.219 +      };
  20.220 +
  20.221 +    };
  20.222 +
  20.223 +    /// \addtogroup graph_concepts
  20.224 +    /// @{
  20.225 +
  20.226 +
  20.227 +    /// Class describing the concept of Undirected Graphs.
  20.228 +
  20.229 +    /// This class describes the common interface of all Undirected
  20.230 +    /// Graphs.
  20.231 +    ///
  20.232 +    /// As all concept describing classes it provides only interface
  20.233 +    /// without any sensible implementation. So any algorithm for
  20.234 +    /// undirected graph should compile with this class, but it will not
  20.235 +    /// run properly, of couse.
  20.236 +    ///
  20.237 +    /// In LEMON undirected graphs also fulfill the concept of directed
  20.238 +    /// graphs (\ref lemon::concept::StaticGraph "Graph Concept"). For
  20.239 +    /// explanation of this and more see also the page \ref ugraphs,
  20.240 +    /// a tutorial about undirected graphs.
  20.241 +    ///
  20.242 +    /// You can assume that all undirected graph can be handled
  20.243 +    /// as a static directed graph. This way it is fully conform
  20.244 +    /// to the StaticGraph concept.
  20.245 +
  20.246 +    class UGraph {
  20.247 +    public:
  20.248 +      ///\e
  20.249 +
  20.250 +      ///\todo undocumented
  20.251 +      ///
  20.252 +      typedef True UTag;
  20.253 +
  20.254 +      /// \brief The base type of node iterators, 
  20.255 +      /// or in other words, the trivial node iterator.
  20.256 +      ///
  20.257 +      /// This is the base type of each node iterator,
  20.258 +      /// thus each kind of node iterator converts to this.
  20.259 +      /// More precisely each kind of node iterator should be inherited 
  20.260 +      /// from the trivial node iterator.
  20.261 +      class Node {
  20.262 +      public:
  20.263 +        /// Default constructor
  20.264 +
  20.265 +        /// @warning The default constructor sets the iterator
  20.266 +        /// to an undefined value.
  20.267 +        Node() { }
  20.268 +        /// Copy constructor.
  20.269 +
  20.270 +        /// Copy constructor.
  20.271 +        ///
  20.272 +        Node(const Node&) { }
  20.273 +
  20.274 +        /// Invalid constructor \& conversion.
  20.275 +
  20.276 +        /// This constructor initializes the iterator to be invalid.
  20.277 +        /// \sa Invalid for more details.
  20.278 +        Node(Invalid) { }
  20.279 +        /// Equality operator
  20.280 +
  20.281 +        /// Two iterators are equal if and only if they point to the
  20.282 +        /// same object or both are invalid.
  20.283 +        bool operator==(Node) const { return true; }
  20.284 +
  20.285 +        /// Inequality operator
  20.286 +        
  20.287 +        /// \sa operator==(Node n)
  20.288 +        ///
  20.289 +        bool operator!=(Node) const { return true; }
  20.290 +
  20.291 +	/// Artificial ordering operator.
  20.292 +	
  20.293 +	/// To allow the use of graph descriptors as key type in std::map or
  20.294 +	/// similar associative container we require this.
  20.295 +	///
  20.296 +	/// \note This operator only have to define some strict ordering of
  20.297 +	/// the items; this order has nothing to do with the iteration
  20.298 +	/// ordering of the items.
  20.299 +	///
  20.300 +	/// \bug This is a technical requirement. Do we really need this?
  20.301 +	bool operator<(Node) const { return false; }
  20.302 +
  20.303 +      };
  20.304 +    
  20.305 +      /// This iterator goes through each node.
  20.306 +
  20.307 +      /// This iterator goes through each node.
  20.308 +      /// Its usage is quite simple, for example you can count the number
  20.309 +      /// of nodes in graph \c g of type \c Graph like this:
  20.310 +      /// \code
  20.311 +      /// int count=0;
  20.312 +      /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
  20.313 +      /// \endcode
  20.314 +      class NodeIt : public Node {
  20.315 +      public:
  20.316 +        /// Default constructor
  20.317 +
  20.318 +        /// @warning The default constructor sets the iterator
  20.319 +        /// to an undefined value.
  20.320 +        NodeIt() { }
  20.321 +        /// Copy constructor.
  20.322 +        
  20.323 +        /// Copy constructor.
  20.324 +        ///
  20.325 +        NodeIt(const NodeIt& n) : Node(n) { }
  20.326 +        /// Invalid constructor \& conversion.
  20.327 +
  20.328 +        /// Initialize the iterator to be invalid.
  20.329 +        /// \sa Invalid for more details.
  20.330 +        NodeIt(Invalid) { }
  20.331 +        /// Sets the iterator to the first node.
  20.332 +
  20.333 +        /// Sets the iterator to the first node of \c g.
  20.334 +        ///
  20.335 +        NodeIt(const UGraph&) { }
  20.336 +        /// Node -> NodeIt conversion.
  20.337 +
  20.338 +        /// Sets the iterator to the node of \c the graph pointed by 
  20.339 +	/// the trivial iterator.
  20.340 +        /// This feature necessitates that each time we 
  20.341 +        /// iterate the edge-set, the iteration order is the same.
  20.342 +        NodeIt(const UGraph&, const Node&) { }
  20.343 +        /// Next node.
  20.344 +
  20.345 +        /// Assign the iterator to the next node.
  20.346 +        ///
  20.347 +        NodeIt& operator++() { return *this; }
  20.348 +      };
  20.349 +    
  20.350 +    
  20.351 +      /// The base type of the undirected edge iterators.
  20.352 +
  20.353 +      /// The base type of the undirected edge iterators.
  20.354 +      ///
  20.355 +      class UEdge {
  20.356 +      public:
  20.357 +        /// Default constructor
  20.358 +
  20.359 +        /// @warning The default constructor sets the iterator
  20.360 +        /// to an undefined value.
  20.361 +        UEdge() { }
  20.362 +        /// Copy constructor.
  20.363 +
  20.364 +        /// Copy constructor.
  20.365 +        ///
  20.366 +        UEdge(const UEdge&) { }
  20.367 +        /// Initialize the iterator to be invalid.
  20.368 +
  20.369 +        /// Initialize the iterator to be invalid.
  20.370 +        ///
  20.371 +        UEdge(Invalid) { }
  20.372 +        /// Equality operator
  20.373 +
  20.374 +        /// Two iterators are equal if and only if they point to the
  20.375 +        /// same object or both are invalid.
  20.376 +        bool operator==(UEdge) const { return true; }
  20.377 +        /// Inequality operator
  20.378 +
  20.379 +        /// \sa operator==(UEdge n)
  20.380 +        ///
  20.381 +        bool operator!=(UEdge) const { return true; }
  20.382 +
  20.383 +	/// Artificial ordering operator.
  20.384 +	
  20.385 +	/// To allow the use of graph descriptors as key type in std::map or
  20.386 +	/// similar associative container we require this.
  20.387 +	///
  20.388 +	/// \note This operator only have to define some strict ordering of
  20.389 +	/// the items; this order has nothing to do with the iteration
  20.390 +	/// ordering of the items.
  20.391 +	///
  20.392 +	/// \bug This is a technical requirement. Do we really need this?
  20.393 +	bool operator<(UEdge) const { return false; }
  20.394 +      };
  20.395 +
  20.396 +      /// This iterator goes through each undirected edge.
  20.397 +
  20.398 +      /// This iterator goes through each undirected edge of a graph.
  20.399 +      /// Its usage is quite simple, for example you can count the number
  20.400 +      /// of undirected edges in a graph \c g of type \c Graph as follows:
  20.401 +      /// \code
  20.402 +      /// int count=0;
  20.403 +      /// for(Graph::UEdgeIt e(g); e!=INVALID; ++e) ++count;
  20.404 +      /// \endcode
  20.405 +      class UEdgeIt : public UEdge {
  20.406 +      public:
  20.407 +        /// Default constructor
  20.408 +
  20.409 +        /// @warning The default constructor sets the iterator
  20.410 +        /// to an undefined value.
  20.411 +        UEdgeIt() { }
  20.412 +        /// Copy constructor.
  20.413 +
  20.414 +        /// Copy constructor.
  20.415 +        ///
  20.416 +        UEdgeIt(const UEdgeIt& e) : UEdge(e) { }
  20.417 +        /// Initialize the iterator to be invalid.
  20.418 +
  20.419 +        /// Initialize the iterator to be invalid.
  20.420 +        ///
  20.421 +        UEdgeIt(Invalid) { }
  20.422 +        /// This constructor sets the iterator to the first undirected edge.
  20.423 +    
  20.424 +        /// This constructor sets the iterator to the first undirected edge.
  20.425 +        UEdgeIt(const UGraph&) { }
  20.426 +        /// UEdge -> UEdgeIt conversion
  20.427 +
  20.428 +        /// Sets the iterator to the value of the trivial iterator.
  20.429 +        /// This feature necessitates that each time we
  20.430 +        /// iterate the undirected edge-set, the iteration order is the 
  20.431 +	/// same.
  20.432 +        UEdgeIt(const UGraph&, const UEdge&) { } 
  20.433 +        /// Next undirected edge
  20.434 +        
  20.435 +        /// Assign the iterator to the next undirected edge.
  20.436 +        UEdgeIt& operator++() { return *this; }
  20.437 +      };
  20.438 +
  20.439 +      /// \brief This iterator goes trough the incident undirected 
  20.440 +      /// edges of a node.
  20.441 +      ///
  20.442 +      /// This iterator goes trough the incident undirected edges
  20.443 +      /// of a certain node
  20.444 +      /// of a graph.
  20.445 +      /// Its usage is quite simple, for example you can compute the
  20.446 +      /// degree (i.e. count the number
  20.447 +      /// of incident edges of a node \c n
  20.448 +      /// in graph \c g of type \c Graph as follows.
  20.449 +      /// \code
  20.450 +      /// int count=0;
  20.451 +      /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
  20.452 +      /// \endcode
  20.453 +      class IncEdgeIt : public UEdge {
  20.454 +      public:
  20.455 +        /// Default constructor
  20.456 +
  20.457 +        /// @warning The default constructor sets the iterator
  20.458 +        /// to an undefined value.
  20.459 +        IncEdgeIt() { }
  20.460 +        /// Copy constructor.
  20.461 +
  20.462 +        /// Copy constructor.
  20.463 +        ///
  20.464 +        IncEdgeIt(const IncEdgeIt& e) : UEdge(e) { }
  20.465 +        /// Initialize the iterator to be invalid.
  20.466 +
  20.467 +        /// Initialize the iterator to be invalid.
  20.468 +        ///
  20.469 +        IncEdgeIt(Invalid) { }
  20.470 +        /// This constructor sets the iterator to first incident edge.
  20.471 +    
  20.472 +        /// This constructor set the iterator to the first incident edge of
  20.473 +        /// the node.
  20.474 +        IncEdgeIt(const UGraph&, const Node&) { }
  20.475 +        /// UEdge -> IncEdgeIt conversion
  20.476 +
  20.477 +        /// Sets the iterator to the value of the trivial iterator \c e.
  20.478 +        /// This feature necessitates that each time we 
  20.479 +        /// iterate the edge-set, the iteration order is the same.
  20.480 +        IncEdgeIt(const UGraph&, const UEdge&) { }
  20.481 +        /// Next incident edge
  20.482 +
  20.483 +        /// Assign the iterator to the next incident edge
  20.484 +	/// of the corresponding node.
  20.485 +        IncEdgeIt& operator++() { return *this; }
  20.486 +      };
  20.487 +
  20.488 +      /// The directed edge type.
  20.489 +
  20.490 +      /// The directed edge type. It can be converted to the
  20.491 +      /// undirected edge.
  20.492 +      class Edge : public UEdge {
  20.493 +      public:
  20.494 +        /// Default constructor
  20.495 +
  20.496 +        /// @warning The default constructor sets the iterator
  20.497 +        /// to an undefined value.
  20.498 +        Edge() { }
  20.499 +        /// Copy constructor.
  20.500 +
  20.501 +        /// Copy constructor.
  20.502 +        ///
  20.503 +        Edge(const Edge& e) : UEdge(e) { }
  20.504 +        /// Initialize the iterator to be invalid.
  20.505 +
  20.506 +        /// Initialize the iterator to be invalid.
  20.507 +        ///
  20.508 +        Edge(Invalid) { }
  20.509 +        /// Equality operator
  20.510 +
  20.511 +        /// Two iterators are equal if and only if they point to the
  20.512 +        /// same object or both are invalid.
  20.513 +        bool operator==(Edge) const { return true; }
  20.514 +        /// Inequality operator
  20.515 +
  20.516 +        /// \sa operator==(Edge n)
  20.517 +        ///
  20.518 +        bool operator!=(Edge) const { return true; }
  20.519 +
  20.520 +	/// Artificial ordering operator.
  20.521 +	
  20.522 +	/// To allow the use of graph descriptors as key type in std::map or
  20.523 +	/// similar associative container we require this.
  20.524 +	///
  20.525 +	/// \note This operator only have to define some strict ordering of
  20.526 +	/// the items; this order has nothing to do with the iteration
  20.527 +	/// ordering of the items.
  20.528 +	///
  20.529 +	/// \bug This is a technical requirement. Do we really need this?
  20.530 +	bool operator<(Edge) const { return false; }
  20.531 +	
  20.532 +      }; 
  20.533 +      /// This iterator goes through each directed edge.
  20.534 +
  20.535 +      /// This iterator goes through each edge of a graph.
  20.536 +      /// Its usage is quite simple, for example you can count the number
  20.537 +      /// of edges in a graph \c g of type \c Graph as follows:
  20.538 +      /// \code
  20.539 +      /// int count=0;
  20.540 +      /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
  20.541 +      /// \endcode
  20.542 +      class EdgeIt : public Edge {
  20.543 +      public:
  20.544 +        /// Default constructor
  20.545 +
  20.546 +        /// @warning The default constructor sets the iterator
  20.547 +        /// to an undefined value.
  20.548 +        EdgeIt() { }
  20.549 +        /// Copy constructor.
  20.550 +
  20.551 +        /// Copy constructor.
  20.552 +        ///
  20.553 +        EdgeIt(const EdgeIt& e) : Edge(e) { }
  20.554 +        /// Initialize the iterator to be invalid.
  20.555 +
  20.556 +        /// Initialize the iterator to be invalid.
  20.557 +        ///
  20.558 +        EdgeIt(Invalid) { }
  20.559 +        /// This constructor sets the iterator to the first edge.
  20.560 +    
  20.561 +        /// This constructor sets the iterator to the first edge of \c g.
  20.562 +        ///@param g the graph
  20.563 +        EdgeIt(const UGraph &g) { ignore_unused_variable_warning(g); }
  20.564 +        /// Edge -> EdgeIt conversion
  20.565 +
  20.566 +        /// Sets the iterator to the value of the trivial iterator \c e.
  20.567 +        /// This feature necessitates that each time we 
  20.568 +        /// iterate the edge-set, the iteration order is the same.
  20.569 +        EdgeIt(const UGraph&, const Edge&) { } 
  20.570 +        ///Next edge
  20.571 +        
  20.572 +        /// Assign the iterator to the next edge.
  20.573 +        EdgeIt& operator++() { return *this; }
  20.574 +      };
  20.575 +   
  20.576 +      /// This iterator goes trough the outgoing directed edges of a node.
  20.577 +
  20.578 +      /// This iterator goes trough the \e outgoing edges of a certain node
  20.579 +      /// of a graph.
  20.580 +      /// Its usage is quite simple, for example you can count the number
  20.581 +      /// of outgoing edges of a node \c n
  20.582 +      /// in graph \c g of type \c Graph as follows.
  20.583 +      /// \code
  20.584 +      /// int count=0;
  20.585 +      /// for (Graph::OutEdgeIt e(g, n); e!=INVALID; ++e) ++count;
  20.586 +      /// \endcode
  20.587 +    
  20.588 +      class OutEdgeIt : public Edge {
  20.589 +      public:
  20.590 +        /// Default constructor
  20.591 +
  20.592 +        /// @warning The default constructor sets the iterator
  20.593 +        /// to an undefined value.
  20.594 +        OutEdgeIt() { }
  20.595 +        /// Copy constructor.
  20.596 +
  20.597 +        /// Copy constructor.
  20.598 +        ///
  20.599 +        OutEdgeIt(const OutEdgeIt& e) : Edge(e) { }
  20.600 +        /// Initialize the iterator to be invalid.
  20.601 +
  20.602 +        /// Initialize the iterator to be invalid.
  20.603 +        ///
  20.604 +        OutEdgeIt(Invalid) { }
  20.605 +        /// This constructor sets the iterator to the first outgoing edge.
  20.606 +    
  20.607 +        /// This constructor sets the iterator to the first outgoing edge of
  20.608 +        /// the node.
  20.609 +        ///@param n the node
  20.610 +        ///@param g the graph
  20.611 +        OutEdgeIt(const UGraph& n, const Node& g) {
  20.612 +	  ignore_unused_variable_warning(n);
  20.613 +	  ignore_unused_variable_warning(g);
  20.614 +	}
  20.615 +        /// Edge -> OutEdgeIt conversion
  20.616 +
  20.617 +        /// Sets the iterator to the value of the trivial iterator.
  20.618 +	/// This feature necessitates that each time we 
  20.619 +        /// iterate the edge-set, the iteration order is the same.
  20.620 +        OutEdgeIt(const UGraph&, const Edge&) { }
  20.621 +        ///Next outgoing edge
  20.622 +        
  20.623 +        /// Assign the iterator to the next 
  20.624 +        /// outgoing edge of the corresponding node.
  20.625 +        OutEdgeIt& operator++() { return *this; }
  20.626 +      };
  20.627 +
  20.628 +      /// This iterator goes trough the incoming directed edges of a node.
  20.629 +
  20.630 +      /// This iterator goes trough the \e incoming edges of a certain node
  20.631 +      /// of a graph.
  20.632 +      /// Its usage is quite simple, for example you can count the number
  20.633 +      /// of outgoing edges of a node \c n
  20.634 +      /// in graph \c g of type \c Graph as follows.
  20.635 +      /// \code
  20.636 +      /// int count=0;
  20.637 +      /// for(Graph::InEdgeIt e(g, n); e!=INVALID; ++e) ++count;
  20.638 +      /// \endcode
  20.639 +
  20.640 +      class InEdgeIt : public Edge {
  20.641 +      public:
  20.642 +        /// Default constructor
  20.643 +
  20.644 +        /// @warning The default constructor sets the iterator
  20.645 +        /// to an undefined value.
  20.646 +        InEdgeIt() { }
  20.647 +        /// Copy constructor.
  20.648 +
  20.649 +        /// Copy constructor.
  20.650 +        ///
  20.651 +        InEdgeIt(const InEdgeIt& e) : Edge(e) { }
  20.652 +        /// Initialize the iterator to be invalid.
  20.653 +
  20.654 +        /// Initialize the iterator to be invalid.
  20.655 +        ///
  20.656 +        InEdgeIt(Invalid) { }
  20.657 +        /// This constructor sets the iterator to first incoming edge.
  20.658 +    
  20.659 +        /// This constructor set the iterator to the first incoming edge of
  20.660 +        /// the node.
  20.661 +        ///@param n the node
  20.662 +        ///@param g the graph
  20.663 +        InEdgeIt(const UGraph& g, const Node& n) { 
  20.664 +	  ignore_unused_variable_warning(n);
  20.665 +	  ignore_unused_variable_warning(g);
  20.666 +	}
  20.667 +        /// Edge -> InEdgeIt conversion
  20.668 +
  20.669 +        /// Sets the iterator to the value of the trivial iterator \c e.
  20.670 +        /// This feature necessitates that each time we 
  20.671 +        /// iterate the edge-set, the iteration order is the same.
  20.672 +        InEdgeIt(const UGraph&, const Edge&) { }
  20.673 +        /// Next incoming edge
  20.674 +
  20.675 +        /// Assign the iterator to the next inedge of the corresponding node.
  20.676 +        ///
  20.677 +        InEdgeIt& operator++() { return *this; }
  20.678 +      };
  20.679 +
  20.680 +      /// \brief Read write map of the nodes to type \c T.
  20.681 +      /// 
  20.682 +      /// ReadWrite map of the nodes to type \c T.
  20.683 +      /// \sa Reference
  20.684 +      /// \warning Making maps that can handle bool type (NodeMap<bool>)
  20.685 +      /// needs some extra attention!
  20.686 +      /// \todo Wrong documentation
  20.687 +      template<class T> 
  20.688 +      class NodeMap : public ReadWriteMap< Node, T >
  20.689 +      {
  20.690 +      public:
  20.691 +
  20.692 +        ///\e
  20.693 +        NodeMap(const UGraph&) { }
  20.694 +        ///\e
  20.695 +        NodeMap(const UGraph&, T) { }
  20.696 +
  20.697 +        ///Copy constructor
  20.698 +        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
  20.699 +        ///Assignment operator
  20.700 +        NodeMap& operator=(const NodeMap&) { return *this; }
  20.701 +        // \todo fix this concept
  20.702 +      };
  20.703 +
  20.704 +      /// \brief Read write map of the directed edges to type \c T.
  20.705 +      ///
  20.706 +      /// Reference map of the directed edges to type \c T.
  20.707 +      /// \sa Reference
  20.708 +      /// \warning Making maps that can handle bool type (EdgeMap<bool>)
  20.709 +      /// needs some extra attention!
  20.710 +      /// \todo Wrong documentation
  20.711 +      template<class T> 
  20.712 +      class EdgeMap : public ReadWriteMap<Edge,T>
  20.713 +      {
  20.714 +      public:
  20.715 +
  20.716 +        ///\e
  20.717 +        EdgeMap(const UGraph&) { }
  20.718 +        ///\e
  20.719 +        EdgeMap(const UGraph&, T) { }
  20.720 +        ///Copy constructor
  20.721 +        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { }
  20.722 +        ///Assignment operator
  20.723 +        EdgeMap& operator=(const EdgeMap&) { return *this; }
  20.724 +        // \todo fix this concept    
  20.725 +      };
  20.726 +
  20.727 +      /// Read write map of the undirected edges to type \c T.
  20.728 +
  20.729 +      /// Reference map of the edges to type \c T.
  20.730 +      /// \sa Reference
  20.731 +      /// \warning Making maps that can handle bool type (UEdgeMap<bool>)
  20.732 +      /// needs some extra attention!
  20.733 +      /// \todo Wrong documentation
  20.734 +      template<class T> 
  20.735 +      class UEdgeMap : public ReadWriteMap<UEdge,T>
  20.736 +      {
  20.737 +      public:
  20.738 +
  20.739 +        ///\e
  20.740 +        UEdgeMap(const UGraph&) { }
  20.741 +        ///\e
  20.742 +        UEdgeMap(const UGraph&, T) { }
  20.743 +        ///Copy constructor
  20.744 +        UEdgeMap(const UEdgeMap& em) : ReadWriteMap<UEdge,T>(em) {}
  20.745 +        ///Assignment operator
  20.746 +        UEdgeMap &operator=(const UEdgeMap&) { return *this; }
  20.747 +        // \todo fix this concept    
  20.748 +      };
  20.749 +
  20.750 +      /// \brief Direct the given undirected edge.
  20.751 +      ///
  20.752 +      /// Direct the given undirected edge. The returned edge source
  20.753 +      /// will be the given edge.
  20.754 +      Edge direct(const UEdge&, const Node&) const {
  20.755 +	return INVALID;
  20.756 +      }
  20.757 +
  20.758 +      /// \brief Direct the given undirected edge.
  20.759 +      ///
  20.760 +      /// Direct the given undirected edge. The returned edge source
  20.761 +      /// will be the source of the undirected edge if the given bool
  20.762 +      /// is true.
  20.763 +      Edge direct(const UEdge&, bool) const {
  20.764 +	return INVALID;
  20.765 +      }
  20.766 +
  20.767 +      /// \brief Returns true if the edge has default orientation.
  20.768 +      ///
  20.769 +      /// Returns whether the given directed edge is same orientation as
  20.770 +      /// the corresponding undirected edge.
  20.771 +      bool direction(Edge) const { return true; }
  20.772 +
  20.773 +      /// \brief Returns the opposite directed edge.
  20.774 +      ///
  20.775 +      /// Returns the opposite directed edge.
  20.776 +      Edge oppositeEdge(Edge) const { return INVALID; }
  20.777 +
  20.778 +      /// \brief Opposite node on an edge
  20.779 +      ///
  20.780 +      /// \return the opposite of the given Node on the given Edge
  20.781 +      Node oppositeNode(Node, UEdge) const { return INVALID; }
  20.782 +
  20.783 +      /// \brief First node of the undirected edge.
  20.784 +      ///
  20.785 +      /// \return the first node of the given UEdge.
  20.786 +      ///
  20.787 +      /// Naturally uectected edges don't have direction and thus
  20.788 +      /// don't have source and target node. But we use these two methods
  20.789 +      /// to query the two endnodes of the edge. The direction of the edge
  20.790 +      /// which arises this way is called the inherent direction of the
  20.791 +      /// undirected edge, and is used to define the "default" direction
  20.792 +      /// of the directed versions of the edges.
  20.793 +      /// \sa direction
  20.794 +      Node source(UEdge) const { return INVALID; }
  20.795 +
  20.796 +      /// \brief Second node of the undirected edge.
  20.797 +      Node target(UEdge) const { return INVALID; }
  20.798 +
  20.799 +      /// \brief Source node of the directed edge.
  20.800 +      Node source(Edge) const { return INVALID; }
  20.801 +
  20.802 +      /// \brief Target node of the directed edge.
  20.803 +      Node target(Edge) const { return INVALID; }
  20.804 +
  20.805 +//       /// \brief First node of the graph
  20.806 +//       ///
  20.807 +//       /// \note This method is part of so called \ref
  20.808 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.809 +//       /// be used in an end-user program.
  20.810 +      void first(Node&) const {}
  20.811 +//       /// \brief Next node of the graph
  20.812 +//       ///
  20.813 +//       /// \note This method is part of so called \ref
  20.814 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.815 +//       /// be used in an end-user program.
  20.816 +      void next(Node&) const {}
  20.817 +
  20.818 +//       /// \brief First undirected edge of the graph
  20.819 +//       ///
  20.820 +//       /// \note This method is part of so called \ref
  20.821 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.822 +//       /// be used in an end-user program.
  20.823 +      void first(UEdge&) const {}
  20.824 +//       /// \brief Next undirected edge of the graph
  20.825 +//       ///
  20.826 +//       /// \note This method is part of so called \ref
  20.827 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.828 +//       /// be used in an end-user program.
  20.829 +      void next(UEdge&) const {}
  20.830 +
  20.831 +//       /// \brief First directed edge of the graph
  20.832 +//       ///
  20.833 +//       /// \note This method is part of so called \ref
  20.834 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.835 +//       /// be used in an end-user program.
  20.836 +      void first(Edge&) const {}
  20.837 +//       /// \brief Next directed edge of the graph
  20.838 +//       ///
  20.839 +//       /// \note This method is part of so called \ref
  20.840 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.841 +//       /// be used in an end-user program.
  20.842 +      void next(Edge&) const {}
  20.843 +
  20.844 +//       /// \brief First outgoing edge from a given node
  20.845 +//       ///
  20.846 +//       /// \note This method is part of so called \ref
  20.847 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.848 +//       /// be used in an end-user program.
  20.849 +      void firstOut(Edge&, Node) const {}
  20.850 +//       /// \brief Next outgoing edge to a node
  20.851 +//       ///
  20.852 +//       /// \note This method is part of so called \ref
  20.853 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.854 +//       /// be used in an end-user program.
  20.855 +      void nextOut(Edge&) const {}
  20.856 +
  20.857 +//       /// \brief First incoming edge to a given node
  20.858 +//       ///
  20.859 +//       /// \note This method is part of so called \ref
  20.860 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.861 +//       /// be used in an end-user program.
  20.862 +      void firstIn(Edge&, Node) const {}
  20.863 +//       /// \brief Next incoming edge to a node
  20.864 +//       ///
  20.865 +//       /// \note This method is part of so called \ref
  20.866 +//       /// developpers_interface "Developpers' interface", so it shouldn't
  20.867 +//       /// be used in an end-user program.
  20.868 +      void nextIn(Edge&) const {}
  20.869 +
  20.870 +
  20.871 +      /// \brief Base node of the iterator
  20.872 +      ///
  20.873 +      /// Returns the base node (the source in this case) of the iterator
  20.874 +      Node baseNode(OutEdgeIt e) const {
  20.875 +	return source(e);
  20.876 +      }
  20.877 +      /// \brief Running node of the iterator
  20.878 +      ///
  20.879 +      /// Returns the running node (the target in this case) of the
  20.880 +      /// iterator
  20.881 +      Node runningNode(OutEdgeIt e) const {
  20.882 +	return target(e);
  20.883 +      }
  20.884 +
  20.885 +      /// \brief Base node of the iterator
  20.886 +      ///
  20.887 +      /// Returns the base node (the target in this case) of the iterator
  20.888 +      Node baseNode(InEdgeIt e) const {
  20.889 +	return target(e);
  20.890 +      }
  20.891 +      /// \brief Running node of the iterator
  20.892 +      ///
  20.893 +      /// Returns the running node (the source in this case) of the
  20.894 +      /// iterator
  20.895 +      Node runningNode(InEdgeIt e) const {
  20.896 +	return source(e);
  20.897 +      }
  20.898 +
  20.899 +      /// \brief Base node of the iterator
  20.900 +      ///
  20.901 +      /// Returns the base node of the iterator
  20.902 +      Node baseNode(IncEdgeIt) const {
  20.903 +	return INVALID;
  20.904 +      }
  20.905 +      
  20.906 +      /// \brief Running node of the iterator
  20.907 +      ///
  20.908 +      /// Returns the running node of the iterator
  20.909 +      Node runningNode(IncEdgeIt) const {
  20.910 +	return INVALID;
  20.911 +      }
  20.912 +
  20.913 +      template <typename Graph>
  20.914 +      struct Constraints {
  20.915 +	void constraints() {
  20.916 +	  checkConcept<BaseIterableUGraphConcept, Graph>();
  20.917 +	  checkConcept<IterableUGraphConcept, Graph>();
  20.918 +	  checkConcept<MappableUGraphConcept, Graph>();
  20.919 +	}
  20.920 +      };
  20.921 +
  20.922 +    };
  20.923 +
  20.924 +    /// \brief An empty non-static undirected graph class.
  20.925 +    ///    
  20.926 +    /// This class provides everything that \ref UGraph does.
  20.927 +    /// Additionally it enables building graphs from scratch.
  20.928 +    class ExtendableUGraph : public UGraph {
  20.929 +    public:
  20.930 +      
  20.931 +      /// \brief Add a new node to the graph.
  20.932 +      ///
  20.933 +      /// Add a new node to the graph.
  20.934 +      /// \return the new node.
  20.935 +      Node addNode();
  20.936 +
  20.937 +      /// \brief Add a new undirected edge to the graph.
  20.938 +      ///
  20.939 +      /// Add a new undirected edge to the graph.
  20.940 +      /// \return the new edge.
  20.941 +      UEdge addEdge(const Node& from, const Node& to);
  20.942 +
  20.943 +      /// \brief Resets the graph.
  20.944 +      ///
  20.945 +      /// This function deletes all undirected edges and nodes of the graph.
  20.946 +      /// It also frees the memory allocated to store them.
  20.947 +      void clear() { }
  20.948 +
  20.949 +      template <typename Graph>
  20.950 +      struct Constraints {
  20.951 +	void constraints() {
  20.952 +	  checkConcept<BaseIterableUGraphConcept, Graph>();
  20.953 +	  checkConcept<IterableUGraphConcept, Graph>();
  20.954 +	  checkConcept<MappableUGraphConcept, Graph>();
  20.955 +
  20.956 +	  checkConcept<UGraph, Graph>();
  20.957 +	  checkConcept<ExtendableUGraphConcept, Graph>();
  20.958 +	  checkConcept<ClearableGraphComponent, Graph>();
  20.959 +	}
  20.960 +      };
  20.961 +
  20.962 +    };
  20.963 +
  20.964 +    /// \brief An empty erasable undirected graph class.
  20.965 +    ///
  20.966 +    /// This class is an extension of \ref ExtendableUGraph. It makes it
  20.967 +    /// possible to erase undirected edges or nodes.
  20.968 +    class ErasableUGraph : public ExtendableUGraph {
  20.969 +    public:
  20.970 +
  20.971 +      /// \brief Deletes a node.
  20.972 +      ///
  20.973 +      /// Deletes a node.
  20.974 +      ///
  20.975 +      void erase(Node) { }
  20.976 +      /// \brief Deletes an undirected edge.
  20.977 +      ///
  20.978 +      /// Deletes an undirected edge.
  20.979 +      ///
  20.980 +      void erase(UEdge) { }
  20.981 +
  20.982 +      template <typename Graph>
  20.983 +      struct Constraints {
  20.984 +	void constraints() {
  20.985 +	  checkConcept<ExtendableUGraph, Graph>();
  20.986 +	  checkConcept<ErasableUGraphConcept, Graph>();
  20.987 +	}
  20.988 +      };
  20.989 +
  20.990 +    };
  20.991 +
  20.992 +    /// @}
  20.993 +
  20.994 +  }
  20.995 +
  20.996 +}
  20.997 +
  20.998 +#endif
    21.1 --- a/lemon/concept/undir_graph.h	Thu Jan 26 06:44:22 2006 +0000
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,995 +0,0 @@
    21.4 -/* -*- C++ -*-
    21.5 - *
    21.6 - * lemon/concept/undir_graph_component.h - Part of LEMON, a generic
    21.7 - * C++ optimization library
    21.8 - *
    21.9 - * Copyright (C) 2006 Egervary Jeno Kombinatorikus Optimalizalasi
   21.10 - * Kutatocsoport (Egervary Research Group on Combinatorial Optimization,
   21.11 - * EGRES).
   21.12 - *
   21.13 - * Permission to use, modify and distribute this software is granted
   21.14 - * provided that this copyright notice appears in all copies. For
   21.15 - * precise terms see the accompanying LICENSE file.
   21.16 - *
   21.17 - * This software is provided "AS IS" with no warranty of any kind,
   21.18 - * express or implied, and with no claim as to its suitability for any
   21.19 - * purpose.
   21.20 - *
   21.21 - */
   21.22 -
   21.23 -///\ingroup graph_concepts
   21.24 -///\file
   21.25 -///\brief Undirected graphs and components of.
   21.26 -
   21.27 -
   21.28 -#ifndef LEMON_CONCEPT_UNDIR_GRAPH_H
   21.29 -#define LEMON_CONCEPT_UNDIR_GRAPH_H
   21.30 -
   21.31 -#include <lemon/concept/graph_component.h>
   21.32 -#include <lemon/concept/graph.h>
   21.33 -#include <lemon/utility.h>
   21.34 -
   21.35 -namespace lemon {
   21.36 -  namespace concept {
   21.37 -
   21.38 -//     /// Skeleton class which describes an edge with direction in \ref
   21.39 -//     /// UndirGraph "undirected graph".
   21.40 -    template <typename UndirGraph>
   21.41 -    class UndirGraphEdge : public UndirGraph::UndirEdge {
   21.42 -      typedef typename UndirGraph::UndirEdge UndirEdge;
   21.43 -      typedef typename UndirGraph::Node Node;
   21.44 -    public:
   21.45 -
   21.46 -      /// \e
   21.47 -      UndirGraphEdge() {}
   21.48 -
   21.49 -      /// \e
   21.50 -      UndirGraphEdge(const UndirGraphEdge& e) : UndirGraph::UndirEdge(e) {}
   21.51 -
   21.52 -      /// \e
   21.53 -      UndirGraphEdge(Invalid) {}
   21.54 -
   21.55 -      /// \brief Directed edge from undirected edge and a source node.
   21.56 -      ///
   21.57 -      /// Constructs a directed edge from undirected edge and a source node.
   21.58 -      ///
   21.59 -      /// \note You have to specify the graph for this constructor.
   21.60 -      UndirGraphEdge(const UndirGraph &g,
   21.61 -		     UndirEdge undir_edge, Node n) {
   21.62 -	ignore_unused_variable_warning(undir_edge);
   21.63 -	ignore_unused_variable_warning(g);
   21.64 -	ignore_unused_variable_warning(n);
   21.65 -      }
   21.66 -
   21.67 -      /// \e
   21.68 -      UndirGraphEdge& operator=(UndirGraphEdge) { return *this; }
   21.69 -
   21.70 -      /// \e
   21.71 -      bool operator==(UndirGraphEdge) const { return true; }
   21.72 -      /// \e
   21.73 -      bool operator!=(UndirGraphEdge) const { return false; }
   21.74 -
   21.75 -      /// \e
   21.76 -      bool operator<(UndirGraphEdge) const { return false; }
   21.77 -
   21.78 -      template <typename Edge>
   21.79 -      struct Constraints {
   21.80 -	void constraints() {
   21.81 -	  const_constraints();
   21.82 -	}
   21.83 -	void const_constraints() const {
   21.84 -	  /// \bug This should be is_base_and_derived ...
   21.85 -	  UndirEdge ue = e;
   21.86 -	  ue = e;
   21.87 -
   21.88 -	  Edge e_with_source(graph,ue,n);
   21.89 -	  ignore_unused_variable_warning(e_with_source);
   21.90 -	}
   21.91 -	Edge e;
   21.92 -	UndirEdge ue;
   21.93 -	UndirGraph graph;
   21.94 -	Node n;
   21.95 -      };
   21.96 -    };
   21.97 -    
   21.98 -
   21.99 -    struct BaseIterableUndirGraphConcept {
  21.100 -
  21.101 -      template <typename Graph>
  21.102 -      struct Constraints {
  21.103 -
  21.104 -	typedef typename Graph::UndirEdge UndirEdge;
  21.105 -	typedef typename Graph::Edge Edge;
  21.106 -	typedef typename Graph::Node Node;
  21.107 -
  21.108 -	void constraints() {
  21.109 -	  checkConcept<BaseIterableGraphComponent, Graph>();
  21.110 -	  checkConcept<GraphItem<>, UndirEdge>();
  21.111 -	  //checkConcept<UndirGraphEdge<Graph>, Edge>();
  21.112 -
  21.113 -	  graph.first(ue);
  21.114 -	  graph.next(ue);
  21.115 -
  21.116 -	  const_constraints();
  21.117 -	}
  21.118 -	void const_constraints() {
  21.119 -	  Node n;
  21.120 -	  n = graph.target(ue);
  21.121 -	  n = graph.source(ue);
  21.122 -	  n = graph.oppositeNode(n0, ue);
  21.123 -
  21.124 -	  bool b;
  21.125 -	  b = graph.direction(e);
  21.126 -	  Edge e = graph.direct(UndirEdge(), true);
  21.127 -	  e = graph.direct(UndirEdge(), n);
  21.128 - 
  21.129 -	  ignore_unused_variable_warning(b);
  21.130 -	}
  21.131 -
  21.132 -	Graph graph;
  21.133 -	Edge e;
  21.134 -	Node n0;
  21.135 -	UndirEdge ue;
  21.136 -      };
  21.137 -
  21.138 -    };
  21.139 -
  21.140 -
  21.141 -    struct IterableUndirGraphConcept {
  21.142 -
  21.143 -      template <typename Graph>
  21.144 -      struct Constraints {
  21.145 -	void constraints() {
  21.146 -	  /// \todo we don't need the iterable component to be base iterable
  21.147 -	  /// Don't we really???
  21.148 -	  //checkConcept< BaseIterableUndirGraphConcept, Graph > ();
  21.149 -
  21.150 -	  checkConcept<IterableGraphComponent, Graph> ();
  21.151 -
  21.152 -	  typedef typename Graph::UndirEdge UndirEdge;
  21.153 -	  typedef typename Graph::UndirEdgeIt UndirEdgeIt;
  21.154 -	  typedef typename Graph::IncEdgeIt IncEdgeIt;
  21.155 -
  21.156 -	  checkConcept<GraphIterator<Graph, UndirEdge>, UndirEdgeIt>();
  21.157 -	  checkConcept<GraphIncIterator<Graph, UndirEdge>, IncEdgeIt>();
  21.158 -	}
  21.159 -      };
  21.160 -
  21.161 -    };
  21.162 -
  21.163 -    struct MappableUndirGraphConcept {
  21.164 -
  21.165 -      template <typename Graph>
  21.166 -      struct Constraints {
  21.167 -
  21.168 -	struct Dummy {
  21.169 -	  int value;
  21.170 -	  Dummy() : value(0) {}
  21.171 -	  Dummy(int _v) : value(_v) {}
  21.172 -	};
  21.173 -
  21.174 -	void constraints() {
  21.175 -	  checkConcept<MappableGraphComponent, Graph>();
  21.176 -
  21.177 -	  typedef typename Graph::template UndirEdgeMap<int> IntMap;
  21.178 -	  checkConcept<GraphMap<Graph, typename Graph::UndirEdge, int>,
  21.179 -	    IntMap >();
  21.180 -
  21.181 -	  typedef typename Graph::template UndirEdgeMap<bool> BoolMap;
  21.182 -	  checkConcept<GraphMap<Graph, typename Graph::UndirEdge, bool>,
  21.183 -	    BoolMap >();
  21.184 -
  21.185 -	  typedef typename Graph::template UndirEdgeMap<Dummy> DummyMap;
  21.186 -	  checkConcept<GraphMap<Graph, typename Graph::UndirEdge, Dummy>,
  21.187 -	    DummyMap >();
  21.188 -	}
  21.189 -      };
  21.190 -
  21.191 -    };
  21.192 -
  21.193 -    struct ExtendableUndirGraphConcept {
  21.194 -
  21.195 -      template <typename Graph>
  21.196 -      struct Constraints {
  21.197 -	void constraints() {
  21.198 -	  node_a = graph.addNode();
  21.199 -	  uedge = graph.addEdge(node_a, node_b);
  21.200 -	}
  21.201 -	typename Graph::Node node_a, node_b;
  21.202 -	typename Graph::UndirEdge uedge;
  21.203 -	Graph graph;
  21.204 -      };
  21.205 -
  21.206 -    };
  21.207 -
  21.208 -    struct ErasableUndirGraphConcept {
  21.209 -
  21.210 -      template <typename Graph>
  21.211 -      struct Constraints {
  21.212 -	void constraints() {
  21.213 -	  graph.erase(n);
  21.214 -	  graph.erase(e);
  21.215 -	}
  21.216 -	Graph graph;
  21.217 -	typename Graph::Node n;
  21.218 -	typename Graph::UndirEdge e;
  21.219 -      };
  21.220 -
  21.221 -    };
  21.222 -
  21.223 -    /// \addtogroup graph_concepts
  21.224 -    /// @{
  21.225 -
  21.226 -
  21.227 -    /// Class describing the concept of Undirected Graphs.
  21.228 -
  21.229 -    /// This class describes the common interface of all Undirected
  21.230 -    /// Graphs.
  21.231 -    ///
  21.232 -    /// As all concept describing classes it provides only interface
  21.233 -    /// without any sensible implementation. So any algorithm for
  21.234 -    /// undirected graph should compile with this class, but it will not
  21.235 -    /// run properly, of couse.
  21.236 -    ///
  21.237 -    /// In LEMON undirected graphs also fulfill the concept of directed
  21.238 -    /// graphs (\ref lemon::concept::StaticGraph "Graph Concept"). For
  21.239 -    /// explanation of this and more see also the page \ref undir_graphs,
  21.240 -    /// a tutorial about undirected graphs.
  21.241 -    ///
  21.242 -    /// You can assume that all undirected graph can be handled
  21.243 -    /// as a static directed graph. This way it is fully conform
  21.244 -    /// to the StaticGraph concept.
  21.245 -
  21.246 -    class UndirGraph {
  21.247 -    public:
  21.248 -      ///\e
  21.249 -
  21.250 -      ///\todo undocumented
  21.251 -      ///
  21.252 -      typedef True UndirTag;
  21.253 -
  21.254 -      /// \brief The base type of node iterators, 
  21.255 -      /// or in other words, the trivial node iterator.
  21.256 -      ///
  21.257 -      /// This is the base type of each node iterator,
  21.258 -      /// thus each kind of node iterator converts to this.
  21.259 -      /// More precisely each kind of node iterator should be inherited 
  21.260 -      /// from the trivial node iterator.
  21.261 -      class Node {
  21.262 -      public:
  21.263 -        /// Default constructor
  21.264 -
  21.265 -        /// @warning The default constructor sets the iterator
  21.266 -        /// to an undefined value.
  21.267 -        Node() { }
  21.268 -        /// Copy constructor.
  21.269 -
  21.270 -        /// Copy constructor.
  21.271 -        ///
  21.272 -        Node(const Node&) { }
  21.273 -
  21.274 -        /// Invalid constructor \& conversion.
  21.275 -
  21.276 -        /// This constructor initializes the iterator to be invalid.
  21.277 -        /// \sa Invalid for more details.
  21.278 -        Node(Invalid) { }
  21.279 -        /// Equality operator
  21.280 -
  21.281 -        /// Two iterators are equal if and only if they point to the
  21.282 -        /// same object or both are invalid.
  21.283 -        bool operator==(Node) const { return true; }
  21.284 -
  21.285 -        /// Inequality operator
  21.286 -        
  21.287 -        /// \sa operator==(Node n)
  21.288 -        ///
  21.289 -        bool operator!=(Node) const { return true; }
  21.290 -
  21.291 -	/// Artificial ordering operator.
  21.292 -	
  21.293 -	/// To allow the use of graph descriptors as key type in std::map or
  21.294 -	/// similar associative container we require this.
  21.295 -	///
  21.296 -	/// \note This operator only have to define some strict ordering of
  21.297 -	/// the items; this order has nothing to do with the iteration
  21.298 -	/// ordering of the items.
  21.299 -	///
  21.300 -	/// \bug This is a technical requirement. Do we really need this?
  21.301 -	bool operator<(Node) const { return false; }
  21.302 -
  21.303 -      };
  21.304 -    
  21.305 -      /// This iterator goes through each node.
  21.306 -
  21.307 -      /// This iterator goes through each node.
  21.308 -      /// Its usage is quite simple, for example you can count the number
  21.309 -      /// of nodes in graph \c g of type \c Graph like this:
  21.310 -      /// \code
  21.311 -      /// int count=0;
  21.312 -      /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
  21.313 -      /// \endcode
  21.314 -      class NodeIt : public Node {
  21.315 -      public:
  21.316 -        /// Default constructor
  21.317 -
  21.318 -        /// @warning The default constructor sets the iterator
  21.319 -        /// to an undefined value.
  21.320 -        NodeIt() { }
  21.321 -        /// Copy constructor.
  21.322 -        
  21.323 -        /// Copy constructor.
  21.324 -        ///
  21.325 -        NodeIt(const NodeIt& n) : Node(n) { }
  21.326 -        /// Invalid constructor \& conversion.
  21.327 -
  21.328 -        /// Initialize the iterator to be invalid.
  21.329 -        /// \sa Invalid for more details.
  21.330 -        NodeIt(Invalid) { }
  21.331 -        /// Sets the iterator to the first node.
  21.332 -
  21.333 -        /// Sets the iterator to the first node of \c g.
  21.334 -        ///
  21.335 -        NodeIt(const UndirGraph&) { }
  21.336 -        /// Node -> NodeIt conversion.
  21.337 -
  21.338 -        /// Sets the iterator to the node of \c the graph pointed by 
  21.339 -	/// the trivial iterator.
  21.340 -        /// This feature necessitates that each time we 
  21.341 -        /// iterate the edge-set, the iteration order is the same.
  21.342 -        NodeIt(const UndirGraph&, const Node&) { }
  21.343 -        /// Next node.
  21.344 -
  21.345 -        /// Assign the iterator to the next node.
  21.346 -        ///
  21.347 -        NodeIt& operator++() { return *this; }
  21.348 -      };
  21.349 -    
  21.350 -    
  21.351 -      /// The base type of the undirected edge iterators.
  21.352 -
  21.353 -      /// The base type of the undirected edge iterators.
  21.354 -      ///
  21.355 -      class UndirEdge {
  21.356 -      public:
  21.357 -        /// Default constructor
  21.358 -
  21.359 -        /// @warning The default constructor sets the iterator
  21.360 -        /// to an undefined value.
  21.361 -        UndirEdge() { }
  21.362 -        /// Copy constructor.
  21.363 -
  21.364 -        /// Copy constructor.
  21.365 -        ///
  21.366 -        UndirEdge(const UndirEdge&) { }
  21.367 -        /// Initialize the iterator to be invalid.
  21.368 -
  21.369 -        /// Initialize the iterator to be invalid.
  21.370 -        ///
  21.371 -        UndirEdge(Invalid) { }
  21.372 -        /// Equality operator
  21.373 -
  21.374 -        /// Two iterators are equal if and only if they point to the
  21.375 -        /// same object or both are invalid.
  21.376 -        bool operator==(UndirEdge) const { return true; }
  21.377 -        /// Inequality operator
  21.378 -
  21.379 -        /// \sa operator==(UndirEdge n)
  21.380 -        ///
  21.381 -        bool operator!=(UndirEdge) const { return true; }
  21.382 -
  21.383 -	/// Artificial ordering operator.
  21.384 -	
  21.385 -	/// To allow the use of graph descriptors as key type in std::map or
  21.386 -	/// similar associative container we require this.
  21.387 -	///
  21.388 -	/// \note This operator only have to define some strict ordering of
  21.389 -	/// the items; this order has nothing to do with the iteration
  21.390 -	/// ordering of the items.
  21.391 -	///
  21.392 -	/// \bug This is a technical requirement. Do we really need this?
  21.393 -	bool operator<(UndirEdge) const { return false; }
  21.394 -      };
  21.395 -
  21.396 -      /// This iterator goes through each undirected edge.
  21.397 -
  21.398 -      /// This iterator goes through each undirected edge of a graph.
  21.399 -      /// Its usage is quite simple, for example you can count the number
  21.400 -      /// of undirected edges in a graph \c g of type \c Graph as follows:
  21.401 -      /// \code
  21.402 -      /// int count=0;
  21.403 -      /// for(Graph::UndirEdgeIt e(g); e!=INVALID; ++e) ++count;
  21.404 -      /// \endcode
  21.405 -      class UndirEdgeIt : public UndirEdge {
  21.406 -      public:
  21.407 -        /// Default constructor
  21.408 -
  21.409 -        /// @warning The default constructor sets the iterator
  21.410 -        /// to an undefined value.
  21.411 -        UndirEdgeIt() { }
  21.412 -        /// Copy constructor.
  21.413 -
  21.414 -        /// Copy constructor.
  21.415 -        ///
  21.416 -        UndirEdgeIt(const UndirEdgeIt& e) : UndirEdge(e) { }
  21.417 -        /// Initialize the iterator to be invalid.
  21.418 -
  21.419 -        /// Initialize the iterator to be invalid.
  21.420 -        ///
  21.421 -        UndirEdgeIt(Invalid) { }
  21.422 -        /// This constructor sets the iterator to the first undirected edge.
  21.423 -    
  21.424 -        /// This constructor sets the iterator to the first undirected edge.
  21.425 -        UndirEdgeIt(const UndirGraph&) { }
  21.426 -        /// UndirEdge -> UndirEdgeIt conversion
  21.427 -
  21.428 -        /// Sets the iterator to the value of the trivial iterator.
  21.429 -        /// This feature necessitates that each time we
  21.430 -        /// iterate the undirected edge-set, the iteration order is the 
  21.431 -	/// same.
  21.432 -        UndirEdgeIt(const UndirGraph&, const UndirEdge&) { } 
  21.433 -        /// Next undirected edge
  21.434 -        
  21.435 -        /// Assign the iterator to the next undirected edge.
  21.436 -        UndirEdgeIt& operator++() { return *this; }
  21.437 -      };
  21.438 -
  21.439 -      /// \brief This iterator goes trough the incident undirected 
  21.440 -      /// edges of a node.
  21.441 -      ///
  21.442 -      /// This iterator goes trough the incident undirected edges
  21.443 -      /// of a certain node
  21.444 -      /// of a graph.
  21.445 -      /// Its usage is quite simple, for example you can compute the
  21.446 -      /// degree (i.e. count the number
  21.447 -      /// of incident edges of a node \c n
  21.448 -      /// in graph \c g of type \c Graph as follows.
  21.449 -      /// \code
  21.450 -      /// int count=0;
  21.451 -      /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
  21.452 -      /// \endcode
  21.453 -      class IncEdgeIt : public UndirEdge {
  21.454 -      public:
  21.455 -        /// Default constructor
  21.456 -
  21.457 -        /// @warning The default constructor sets the iterator
  21.458 -        /// to an undefined value.
  21.459 -        IncEdgeIt() { }
  21.460 -        /// Copy constructor.
  21.461 -
  21.462 -        /// Copy constructor.
  21.463 -        ///
  21.464 -        IncEdgeIt(const IncEdgeIt& e) : UndirEdge(e) { }
  21.465 -        /// Initialize the iterator to be invalid.
  21.466 -
  21.467 -        /// Initialize the iterator to be invalid.
  21.468 -        ///
  21.469 -        IncEdgeIt(Invalid) { }
  21.470 -        /// This constructor sets the iterator to first incident edge.
  21.471 -    
  21.472 -        /// This constructor set the iterator to the first incident edge of
  21.473 -        /// the node.
  21.474 -        IncEdgeIt(const UndirGraph&, const Node&) { }
  21.475 -        /// UndirEdge -> IncEdgeIt conversion
  21.476 -
  21.477 -        /// Sets the iterator to the value of the trivial iterator \c e.
  21.478 -        /// This feature necessitates that each time we 
  21.479 -        /// iterate the edge-set, the iteration order is the same.
  21.480 -        IncEdgeIt(const UndirGraph&, const UndirEdge&) { }
  21.481 -        /// Next incident edge
  21.482 -
  21.483 -        /// Assign the iterator to the next incident edge
  21.484 -	/// of the corresponding node.
  21.485 -        IncEdgeIt& operator++() { return *this; }
  21.486 -      };
  21.487 -
  21.488 -      /// The directed edge type.
  21.489 -
  21.490 -      /// The directed edge type. It can be converted to the
  21.491 -      /// undirected edge.
  21.492 -      class Edge : public UndirEdge {
  21.493 -      public:
  21.494 -        /// Default constructor
  21.495 -
  21.496 -        /// @warning The default constructor sets the iterator
  21.497 -        /// to an undefined value.
  21.498 -        Edge() { }
  21.499 -        /// Copy constructor.
  21.500 -
  21.501 -        /// Copy constructor.
  21.502 -        ///
  21.503 -        Edge(const Edge& e) : UndirEdge(e) { }
  21.504 -        /// Initialize the iterator to be invalid.
  21.505 -
  21.506 -        /// Initialize the iterator to be invalid.
  21.507 -        ///
  21.508 -        Edge(Invalid) { }
  21.509 -        /// Equality operator
  21.510 -
  21.511 -        /// Two iterators are equal if and only if they point to the
  21.512 -        /// same object or both are invalid.
  21.513 -        bool operator==(Edge) const { return true; }
  21.514 -        /// Inequality operator
  21.515 -
  21.516 -        /// \sa operator==(Edge n)
  21.517 -        ///
  21.518 -        bool operator!=(Edge) const { return true; }
  21.519 -
  21.520 -	/// Artificial ordering operator.
  21.521 -	
  21.522 -	/// To allow the use of graph descriptors as key type in std::map or
  21.523 -	/// similar associative container we require this.
  21.524 -	///
  21.525 -	/// \note This operator only have to define some strict ordering of
  21.526 -	/// the items; this order has nothing to do with the iteration
  21.527 -	/// ordering of the items.
  21.528 -	///
  21.529 -	/// \bug This is a technical requirement. Do we really need this?
  21.530 -	bool operator<(Edge) const { return false; }
  21.531 -	
  21.532 -      }; 
  21.533 -      /// This iterator goes through each directed edge.
  21.534 -
  21.535 -      /// This iterator goes through each edge of a graph.
  21.536 -      /// Its usage is quite simple, for example you can count the number
  21.537 -      /// of edges in a graph \c g of type \c Graph as follows:
  21.538 -      /// \code
  21.539 -      /// int count=0;
  21.540 -      /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
  21.541 -      /// \endcode
  21.542 -      class EdgeIt : public Edge {
  21.543 -      public:
  21.544 -        /// Default constructor
  21.545 -
  21.546 -        /// @warning The default constructor sets the iterator
  21.547 -        /// to an undefined value.
  21.548 -        EdgeIt() { }
  21.549 -        /// Copy constructor.
  21.550 -
  21.551 -        /// Copy constructor.
  21.552 -        ///
  21.553 -        EdgeIt(const EdgeIt& e) : Edge(e) { }
  21.554 -        /// Initialize the iterator to be invalid.
  21.555 -
  21.556 -        /// Initialize the iterator to be invalid.
  21.557 -        ///
  21.558 -        EdgeIt(Invalid) { }
  21.559 -        /// This constructor sets the iterator to the first edge.
  21.560 -    
  21.561 -        /// This constructor sets the iterator to the first edge of \c g.
  21.562 -        ///@param g the graph
  21.563 -        EdgeIt(const UndirGraph &g) { ignore_unused_variable_warning(g); }
  21.564 -        /// Edge -> EdgeIt conversion
  21.565 -
  21.566 -        /// Sets the iterator to the value of the trivial iterator \c e.
  21.567 -        /// This feature necessitates that each time we 
  21.568 -        /// iterate the edge-set, the iteration order is the same.
  21.569 -        EdgeIt(const UndirGraph&, const Edge&) { } 
  21.570 -        ///Next edge
  21.571 -        
  21.572 -        /// Assign the iterator to the next edge.
  21.573 -        EdgeIt& operator++() { return *this; }
  21.574 -      };
  21.575 -   
  21.576 -      /// This iterator goes trough the outgoing directed edges of a node.
  21.577 -
  21.578 -      /// This iterator goes trough the \e outgoing edges of a certain node
  21.579 -      /// of a graph.
  21.580 -      /// Its usage is quite simple, for example you can count the number
  21.581 -      /// of outgoing edges of a node \c n
  21.582 -      /// in graph \c g of type \c Graph as follows.
  21.583 -      /// \code
  21.584 -      /// int count=0;
  21.585 -      /// for (Graph::OutEdgeIt e(g, n); e!=INVALID; ++e) ++count;
  21.586 -      /// \endcode
  21.587 -    
  21.588 -      class OutEdgeIt : public Edge {
  21.589 -      public:
  21.590 -        /// Default constructor
  21.591 -
  21.592 -        /// @warning The default constructor sets the iterator
  21.593 -        /// to an undefined value.
  21.594 -        OutEdgeIt() { }
  21.595 -        /// Copy constructor.
  21.596 -
  21.597 -        /// Copy constructor.
  21.598 -        ///
  21.599 -        OutEdgeIt(const OutEdgeIt& e) : Edge(e) { }
  21.600 -        /// Initialize the iterator to be invalid.
  21.601 -
  21.602 -        /// Initialize the iterator to be invalid.
  21.603 -        ///
  21.604 -        OutEdgeIt(Invalid) { }
  21.605 -        /// This constructor sets the iterator to the first outgoing edge.
  21.606 -    
  21.607 -        /// This constructor sets the iterator to the first outgoing edge of
  21.608 -        /// the node.
  21.609 -        ///@param n the node
  21.610 -        ///@param g the graph
  21.611 -        OutEdgeIt(const UndirGraph& n, const Node& g) {
  21.612 -	  ignore_unused_variable_warning(n);
  21.613 -	  ignore_unused_variable_warning(g);
  21.614 -	}
  21.615 -        /// Edge -> OutEdgeIt conversion
  21.616 -
  21.617 -        /// Sets the iterator to the value of the trivial iterator.
  21.618 -	/// This feature necessitates that each time we 
  21.619 -        /// iterate the edge-set, the iteration order is the same.
  21.620 -        OutEdgeIt(const UndirGraph&, const Edge&) { }
  21.621 -        ///Next outgoing edge
  21.622 -        
  21.623 -        /// Assign the iterator to the next 
  21.624 -        /// outgoing edge of the corresponding node.
  21.625 -        OutEdgeIt& operator++() { return *this; }
  21.626 -      };
  21.627 -
  21.628 -      /// This iterator goes trough the incoming directed edges of a node.
  21.629 -
  21.630 -      /// This iterator goes trough the \e incoming edges of a certain node
  21.631 -      /// of a graph.
  21.632 -      /// Its usage is quite simple, for example you can count the number
  21.633 -      /// of outgoing edges of a node \c n
  21.634 -      /// in graph \c g of type \c Graph as follows.
  21.635 -      /// \code
  21.636 -      /// int count=0;
  21.637 -      /// for(Graph::InEdgeIt e(g, n); e!=INVALID; ++e) ++count;
  21.638 -      /// \endcode
  21.639 -
  21.640 -      class InEdgeIt : public Edge {
  21.641 -      public:
  21.642 -        /// Default constructor
  21.643 -
  21.644 -        /// @warning The default constructor sets the iterator
  21.645 -        /// to an undefined value.
  21.646 -        InEdgeIt() { }
  21.647 -        /// Copy constructor.
  21.648 -
  21.649 -        /// Copy constructor.
  21.650 -        ///
  21.651 -        InEdgeIt(const InEdgeIt& e) : Edge(e) { }
  21.652 -        /// Initialize the iterator to be invalid.
  21.653 -
  21.654 -        /// Initialize the iterator to be invalid.
  21.655 -        ///
  21.656 -        InEdgeIt(Invalid) { }
  21.657 -        /// This constructor sets the iterator to first incoming edge.
  21.658 -    
  21.659 -        /// This constructor set the iterator to the first incoming edge of
  21.660 -        /// the node.
  21.661 -        ///@param n the node
  21.662 -        ///@param g the graph
  21.663 -        InEdgeIt(const UndirGraph& g, const Node& n) { 
  21.664 -	  ignore_unused_variable_warning(n);
  21.665 -	  ignore_unused_variable_warning(g);
  21.666 -	}
  21.667 -        /// Edge -> InEdgeIt conversion
  21.668 -
  21.669 -        /// Sets the iterator to the value of the trivial iterator \c e.
  21.670 -        /// This feature necessitates that each time we 
  21.671 -        /// iterate the edge-set, the iteration order is the same.
  21.672 -        InEdgeIt(const UndirGraph&, const Edge&) { }
  21.673 -        /// Next incoming edge
  21.674 -
  21.675 -        /// Assign the iterator to the next inedge of the corresponding node.
  21.676 -        ///
  21.677 -        InEdgeIt& operator++() { return *this; }
  21.678 -      };
  21.679 -
  21.680 -      /// \brief Read write map of the nodes to type \c T.
  21.681 -      /// 
  21.682 -      /// ReadWrite map of the nodes to type \c T.
  21.683 -      /// \sa Reference
  21.684 -      /// \warning Making maps that can handle bool type (NodeMap<bool>)
  21.685 -      /// needs some extra attention!
  21.686 -      /// \todo Wrong documentation
  21.687 -      template<class T> 
  21.688 -      class NodeMap : public ReadWriteMap< Node, T >
  21.689 -      {
  21.690 -      public:
  21.691 -
  21.692 -        ///\e
  21.693 -        NodeMap(const UndirGraph&) { }
  21.694 -        ///\e
  21.695 -        NodeMap(const UndirGraph&, T) { }
  21.696 -
  21.697 -        ///Copy constructor
  21.698 -        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
  21.699 -        ///Assignment operator
  21.700 -        NodeMap& operator=(const NodeMap&) { return *this; }
  21.701 -        // \todo fix this concept
  21.702 -      };
  21.703 -
  21.704 -      /// \brief Read write map of the directed edges to type \c T.
  21.705 -      ///
  21.706 -      /// Reference map of the directed edges to type \c T.
  21.707 -      /// \sa Reference
  21.708 -      /// \warning Making maps that can handle bool type (EdgeMap<bool>)
  21.709 -      /// needs some extra attention!
  21.710 -      /// \todo Wrong documentation
  21.711 -      template<class T> 
  21.712 -      class EdgeMap : public ReadWriteMap<Edge,T>
  21.713 -      {
  21.714 -      public:
  21.715 -
  21.716 -        ///\e
  21.717 -        EdgeMap(const UndirGraph&) { }
  21.718 -        ///\e
  21.719 -        EdgeMap(const UndirGraph&, T) { }
  21.720 -        ///Copy constructor
  21.721 -        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { }
  21.722 -        ///Assignment operator
  21.723 -        EdgeMap& operator=(const EdgeMap&) { return *this; }
  21.724 -        // \todo fix this concept    
  21.725 -      };
  21.726 -
  21.727 -      /// Read write map of the undirected edges to type \c T.
  21.728 -
  21.729 -      /// Reference map of the edges to type \c T.
  21.730 -      /// \sa Reference
  21.731 -      /// \warning Making maps that can handle bool type (UndirEdgeMap<bool>)
  21.732 -      /// needs some extra attention!
  21.733 -      /// \todo Wrong documentation
  21.734 -      template<class T> 
  21.735 -      class UndirEdgeMap : public ReadWriteMap<UndirEdge,T>
  21.736 -      {
  21.737 -      public:
  21.738 -
  21.739 -        ///\e
  21.740 -        UndirEdgeMap(const UndirGraph&) { }
  21.741 -        ///\e
  21.742 -        UndirEdgeMap(const UndirGraph&, T) { }
  21.743 -        ///Copy constructor
  21.744 -        UndirEdgeMap(const UndirEdgeMap& em) : ReadWriteMap<UndirEdge,T>(em) {}
  21.745 -        ///Assignment operator
  21.746 -        UndirEdgeMap &operator=(const UndirEdgeMap&) { return *this; }
  21.747 -        // \todo fix this concept    
  21.748 -      };
  21.749 -
  21.750 -      /// \brief Direct the given undirected edge.
  21.751 -      ///
  21.752 -      /// Direct the given undirected edge. The returned edge source
  21.753 -      /// will be the given edge.
  21.754 -      Edge direct(const UndirEdge&, const Node&) const {
  21.755 -	return INVALID;
  21.756 -      }
  21.757 -
  21.758 -      /// \brief Direct the given undirected edge.
  21.759 -      ///
  21.760 -      /// Direct the given undirected edge. The returned edge source
  21.761 -      /// will be the source of the undirected edge if the given bool
  21.762 -      /// is true.
  21.763 -      Edge direct(const UndirEdge&, bool) const {
  21.764 -	return INVALID;
  21.765 -      }
  21.766 -
  21.767 -      /// \brief Returns true if the edge has default orientation.
  21.768 -      ///
  21.769 -      /// Returns whether the given directed edge is same orientation as
  21.770 -      /// the corresponding undirected edge.
  21.771 -      bool direction(Edge) const { return true; }
  21.772 -
  21.773 -      /// \brief Returns the opposite directed edge.
  21.774 -      ///
  21.775 -      /// Returns the opposite directed edge.
  21.776 -      Edge oppositeEdge(Edge) const { return INVALID; }
  21.777 -
  21.778 -      /// \brief Opposite node on an edge
  21.779 -      ///
  21.780 -      /// \return the opposite of the given Node on the given Edge
  21.781 -      Node oppositeNode(Node, UndirEdge) const { return INVALID; }
  21.782 -
  21.783 -      /// \brief First node of the undirected edge.
  21.784 -      ///
  21.785 -      /// \return the first node of the given UndirEdge.
  21.786 -      ///
  21.787 -      /// Naturally undirectected edges don't have direction and thus
  21.788 -      /// don't have source and target node. But we use these two methods
  21.789 -      /// to query the two endnodes of the edge. The direction of the edge
  21.790 -      /// which arises this way is called the inherent direction of the
  21.791 -      /// undirected edge, and is used to define the "default" direction
  21.792 -      /// of the directed versions of the edges.
  21.793 -      /// \sa direction
  21.794 -      Node source(UndirEdge) const { return INVALID; }
  21.795 -
  21.796 -      /// \brief Second node of the undirected edge.
  21.797 -      Node target(UndirEdge) const { return INVALID; }
  21.798 -
  21.799 -      /// \brief Source node of the directed edge.
  21.800 -      Node source(Edge) const { return INVALID; }
  21.801 -
  21.802 -      /// \brief Target node of the directed edge.
  21.803 -      Node target(Edge) const { return INVALID; }
  21.804 -
  21.805 -//       /// \brief First node of the graph
  21.806 -//       ///
  21.807 -//       /// \note This method is part of so called \ref
  21.808 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.809 -//       /// be used in an end-user program.
  21.810 -      void first(Node&) const {}
  21.811 -//       /// \brief Next node of the graph
  21.812 -//       ///
  21.813 -//       /// \note This method is part of so called \ref
  21.814 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.815 -//       /// be used in an end-user program.
  21.816 -      void next(Node&) const {}
  21.817 -
  21.818 -//       /// \brief First undirected edge of the graph
  21.819 -//       ///
  21.820 -//       /// \note This method is part of so called \ref
  21.821 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.822 -//       /// be used in an end-user program.
  21.823 -      void first(UndirEdge&) const {}
  21.824 -//       /// \brief Next undirected edge of the graph
  21.825 -//       ///
  21.826 -//       /// \note This method is part of so called \ref
  21.827 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.828 -//       /// be used in an end-user program.
  21.829 -      void next(UndirEdge&) const {}
  21.830 -
  21.831 -//       /// \brief First directed edge of the graph
  21.832 -//       ///
  21.833 -//       /// \note This method is part of so called \ref
  21.834 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.835 -//       /// be used in an end-user program.
  21.836 -      void first(Edge&) const {}
  21.837 -//       /// \brief Next directed edge of the graph
  21.838 -//       ///
  21.839 -//       /// \note This method is part of so called \ref
  21.840 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.841 -//       /// be used in an end-user program.
  21.842 -      void next(Edge&) const {}
  21.843 -
  21.844 -//       /// \brief First outgoing edge from a given node
  21.845 -//       ///
  21.846 -//       /// \note This method is part of so called \ref
  21.847 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.848 -//       /// be used in an end-user program.
  21.849 -      void firstOut(Edge&, Node) const {}
  21.850 -//       /// \brief Next outgoing edge to a node
  21.851 -//       ///
  21.852 -//       /// \note This method is part of so called \ref
  21.853 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.854 -//       /// be used in an end-user program.
  21.855 -      void nextOut(Edge&) const {}
  21.856 -
  21.857 -//       /// \brief First incoming edge to a given node
  21.858 -//       ///
  21.859 -//       /// \note This method is part of so called \ref
  21.860 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.861 -//       /// be used in an end-user program.
  21.862 -      void firstIn(Edge&, Node) const {}
  21.863 -//       /// \brief Next incoming edge to a node
  21.864 -//       ///
  21.865 -//       /// \note This method is part of so called \ref
  21.866 -//       /// developpers_interface "Developpers' interface", so it shouldn't
  21.867 -//       /// be used in an end-user program.
  21.868 -      void nextIn(Edge&) const {}
  21.869 -
  21.870 -
  21.871 -      /// \brief Base node of the iterator
  21.872 -      ///
  21.873 -      /// Returns the base node (the source in this case) of the iterator
  21.874 -      Node baseNode(OutEdgeIt e) const {
  21.875 -	return source(e);
  21.876 -      }
  21.877 -      /// \brief Running node of the iterator
  21.878 -      ///
  21.879 -      /// Returns the running node (the target in this case) of the
  21.880 -      /// iterator
  21.881 -      Node runningNode(OutEdgeIt e) const {
  21.882 -	return target(e);
  21.883 -      }
  21.884 -
  21.885 -      /// \brief Base node of the iterator
  21.886 -      ///
  21.887 -      /// Returns the base node (the target in this case) of the iterator
  21.888 -      Node baseNode(InEdgeIt e) const {
  21.889 -	return target(e);
  21.890 -      }
  21.891 -      /// \brief Running node of the iterator
  21.892 -      ///
  21.893 -      /// Returns the running node (the source in this case) of the
  21.894 -      /// iterator
  21.895 -      Node runningNode(InEdgeIt e) const {
  21.896 -	return source(e);
  21.897 -      }
  21.898 -
  21.899 -      /// \brief Base node of the iterator
  21.900 -      ///
  21.901 -      /// Returns the base node of the iterator
  21.902 -      Node baseNode(IncEdgeIt) const {
  21.903 -	return INVALID;
  21.904 -      }
  21.905 -      
  21.906 -      /// \brief Running node of the iterator
  21.907 -      ///
  21.908 -      /// Returns the running node of the iterator
  21.909 -      Node runningNode(IncEdgeIt) const {
  21.910 -	return INVALID;
  21.911 -      }
  21.912 -
  21.913 -      template <typename Graph>
  21.914 -      struct Constraints {
  21.915 -	void constraints() {
  21.916 -	  checkConcept<BaseIterableUndirGraphConcept, Graph>();
  21.917 -	  checkConcept<IterableUndirGraphConcept, Graph>();
  21.918 -	  checkConcept<MappableUndirGraphConcept, Graph>();
  21.919 -	}
  21.920 -      };
  21.921 -
  21.922 -    };
  21.923 -
  21.924 -    /// \brief An empty non-static undirected graph class.
  21.925 -    ///    
  21.926 -    /// This class provides everything that \ref UndirGraph does.
  21.927 -    /// Additionally it enables building graphs from scratch.
  21.928 -    class ExtendableUndirGraph : public UndirGraph {
  21.929 -    public:
  21.930 -      
  21.931 -      /// \brief Add a new node to the graph.
  21.932 -      ///
  21.933 -      /// Add a new node to the graph.
  21.934 -      /// \return the new node.
  21.935 -      Node addNode();
  21.936 -
  21.937 -      /// \brief Add a new undirected edge to the graph.
  21.938 -      ///
  21.939 -      /// Add a new undirected edge to the graph.
  21.940 -      /// \return the new edge.
  21.941 -      UndirEdge addEdge(const Node& from, const Node& to);
  21.942 -
  21.943 -      /// \brief Resets the graph.
  21.944 -      ///
  21.945 -      /// This function deletes all undirected edges and nodes of the graph.
  21.946 -      /// It also frees the memory allocated to store them.
  21.947 -      void clear() { }
  21.948 -
  21.949 -      template <typename Graph>
  21.950 -      struct Constraints {
  21.951 -	void constraints() {
  21.952 -	  checkConcept<BaseIterableUndirGraphConcept, Graph>();
  21.953 -	  checkConcept<IterableUndirGraphConcept, Graph>();
  21.954 -	  checkConcept<MappableUndirGraphConcept, Graph>();
  21.955 -
  21.956 -	  checkConcept<UndirGraph, Graph>();
  21.957 -	  checkConcept<ExtendableUndirGraphConcept, Graph>();
  21.958 -	  checkConcept<ClearableGraphComponent, Graph>();
  21.959 -	}
  21.960 -      };
  21.961 -
  21.962 -    };
  21.963 -
  21.964 -    /// \brief An empty erasable undirected graph class.
  21.965 -    ///
  21.966 -    /// This class is an extension of \ref ExtendableUndirGraph. It makes it
  21.967 -    /// possible to erase undirected edges or nodes.
  21.968 -    class ErasableUndirGraph : public ExtendableUndirGraph {
  21.969 -    public:
  21.970 -
  21.971 -      /// \brief Deletes a node.
  21.972 -      ///
  21.973 -      /// Deletes a node.
  21.974 -      ///
  21.975 -      void erase(Node) { }
  21.976 -      /// \brief Deletes an undirected edge.
  21.977 -      ///
  21.978 -      /// Deletes an undirected edge.
  21.979 -      ///
  21.980 -      void erase(UndirEdge) { }
  21.981 -
  21.982 -      template <typename Graph>
  21.983 -      struct Constraints {
  21.984 -	void constraints() {
  21.985 -	  checkConcept<ExtendableUndirGraph, Graph>();
  21.986 -	  checkConcept<ErasableUndirGraphConcept, Graph>();
  21.987 -	}
  21.988 -      };
  21.989 -
  21.990 -    };
  21.991 -
  21.992 -    /// @}
  21.993 -
  21.994 -  }
  21.995 -
  21.996 -}
  21.997 -
  21.998 -#endif
    22.1 --- a/lemon/edge_set.h	Thu Jan 26 06:44:22 2006 +0000
    22.2 +++ b/lemon/edge_set.h	Thu Jan 26 15:42:13 2006 +0000
    22.3 @@ -294,7 +294,7 @@
    22.4    /// \ingroup semi_adaptors
    22.5    ///
    22.6    /// \brief Graph using a node set of another graph and an
    22.7 -  /// own undir edge set.
    22.8 +  /// own uedge set.
    22.9    ///
   22.10    /// This structure can be used to establish another graph over a node set
   22.11    /// of an existing one. The node iterator will go through the nodes of the
   22.12 @@ -307,25 +307,25 @@
   22.13    /// In the edge extension and removing it conforms to the 
   22.14    /// \ref concept::ExtendableGraph "ExtendableGraph" concept.
   22.15    template <typename _Graph>
   22.16 -  class ListUndirEdgeSet :
   22.17 -    public ErasableUndirEdgeSetExtender<
   22.18 -    ClearableUndirEdgeSetExtender<
   22.19 -    ExtendableUndirEdgeSetExtender<
   22.20 -    MappableUndirEdgeSetExtender<
   22.21 -    IterableUndirGraphExtender<
   22.22 -    AlterableUndirEdgeSetExtender<
   22.23 -    UndirGraphExtender<
   22.24 +  class ListUEdgeSet :
   22.25 +    public ErasableUEdgeSetExtender<
   22.26 +    ClearableUEdgeSetExtender<
   22.27 +    ExtendableUEdgeSetExtender<
   22.28 +    MappableUEdgeSetExtender<
   22.29 +    IterableUGraphExtender<
   22.30 +    AlterableUEdgeSetExtender<
   22.31 +    UGraphExtender<
   22.32      ListEdgeSetBase<_Graph> > > > > > > > {
   22.33  
   22.34    public:
   22.35  
   22.36 -    typedef ErasableUndirEdgeSetExtender<
   22.37 -      ClearableUndirEdgeSetExtender<
   22.38 -      ExtendableUndirEdgeSetExtender<
   22.39 -      MappableUndirEdgeSetExtender<
   22.40 -      IterableUndirGraphExtender<
   22.41 -      AlterableUndirEdgeSetExtender<
   22.42 -      UndirGraphExtender<
   22.43 +    typedef ErasableUEdgeSetExtender<
   22.44 +      ClearableUEdgeSetExtender<
   22.45 +      ExtendableUEdgeSetExtender<
   22.46 +      MappableUEdgeSetExtender<
   22.47 +      IterableUGraphExtender<
   22.48 +      AlterableUEdgeSetExtender<
   22.49 +      UGraphExtender<
   22.50        ListEdgeSetBase<_Graph> > > > > > > > Parent;
   22.51      
   22.52      typedef typename Parent::Node Node;
   22.53 @@ -354,7 +354,7 @@
   22.54      public:
   22.55        typedef NodesImplBase Parent;
   22.56        
   22.57 -      NodesImpl(const Graph& graph, ListUndirEdgeSet& edgeset) 
   22.58 +      NodesImpl(const Graph& graph, ListUEdgeSet& edgeset) 
   22.59  	: Parent(graph), _edgeset(edgeset) {}
   22.60        
   22.61      protected:
   22.62 @@ -375,7 +375,7 @@
   22.63        }
   22.64  
   22.65      private:
   22.66 -      ListUndirEdgeSet& _edgeset;
   22.67 +      ListUEdgeSet& _edgeset;
   22.68      };
   22.69  
   22.70      NodesImpl nodes;
   22.71 @@ -385,7 +385,7 @@
   22.72      /// \brief Constructor of the adaptor.
   22.73      /// 
   22.74      /// Constructor of the adaptor.
   22.75 -    ListUndirEdgeSet(const Graph& graph) : nodes(graph, *this) {
   22.76 +    ListUEdgeSet(const Graph& graph) : nodes(graph, *this) {
   22.77        Parent::initalize(graph, nodes);
   22.78      }
   22.79      
    23.1 --- a/lemon/euler.h	Thu Jan 26 06:44:22 2006 +0000
    23.2 +++ b/lemon/euler.h	Thu Jan 26 15:42:13 2006 +0000
    23.3 @@ -124,18 +124,18 @@
    23.4    ///the following code will print the edge IDs according to an
    23.5    ///Euler tour of \c g.
    23.6    ///\code
    23.7 -  ///  for(UndirEulerIt<UndirListGraph> e(g),e!=INVALID;++e) {
    23.8 -  ///    std::cout << g.id(UndirEdge(e)) << std::eol;
    23.9 +  ///  for(UEulerIt<ListUGraph> e(g),e!=INVALID;++e) {
   23.10 +  ///    std::cout << g.id(UEdge(e)) << std::eol;
   23.11    ///  }
   23.12    ///\endcode
   23.13    ///Although the iterator provides an Euler tour of an undirected graph,
   23.14 -  ///in order to indicate the direction of the tour, UndirEulerIt
   23.15 +  ///in order to indicate the direction of the tour, UEulerIt
   23.16    ///returns directed edges (that convert to the undirected ones, of course).
   23.17    ///
   23.18    ///If \c g is not Euler then the resulted tour will not be full or closed.
   23.19    ///\todo Test required
   23.20    template<class Graph>
   23.21 -  class UndirEulerIt
   23.22 +  class UEulerIt
   23.23    {
   23.24      typedef typename Graph::Node Node;
   23.25      typedef typename Graph::NodeIt NodeIt;
   23.26 @@ -146,7 +146,7 @@
   23.27      
   23.28      const Graph &g;
   23.29      typename Graph::NodeMap<OutEdgeIt> nedge;
   23.30 -    typename Graph::UndirEdgeMap<bool> visited;
   23.31 +    typename Graph::UEdgeMap<bool> visited;
   23.32      std::list<Edge> euler;
   23.33  
   23.34    public:
   23.35 @@ -156,7 +156,7 @@
   23.36      ///\param _g An undirected graph.
   23.37      ///\param start The starting point of the tour. If it is not given
   23.38      ///       the tour will start from the first node.
   23.39 -    UndirEulerIt(const Graph &_g,typename Graph::Node start=INVALID)
   23.40 +    UEulerIt(const Graph &_g,typename Graph::Node start=INVALID)
   23.41        : g(_g), nedge(g), visited(g,false)
   23.42      {
   23.43        if(start==INVALID) start=NodeIt(g);
   23.44 @@ -175,7 +175,7 @@
   23.45      bool operator!=(Invalid) { return !euler.empty(); }
   23.46      
   23.47      ///Next edge of the tour
   23.48 -    UndirEulerIt &operator++() {
   23.49 +    UEulerIt &operator++() {
   23.50        Node s=g.target(euler.front());
   23.51        euler.pop_front();
   23.52        typename std::list<Edge>::iterator next=euler.begin();
   23.53 @@ -196,7 +196,7 @@
   23.54      ///Postfix incrementation
   23.55      
   23.56      ///\warning This incrementation
   23.57 -    ///returns an \c Edge, not an \ref UndirEulerIt, as one may
   23.58 +    ///returns an \c Edge, not an \ref UEulerIt, as one may
   23.59      ///expect.
   23.60      Edge operator++(int) 
   23.61      {
   23.62 @@ -224,7 +224,7 @@
   23.63  #ifdef DOXYGEN
   23.64    bool
   23.65  #else
   23.66 -  typename enable_if<typename Graph::UndirTag,bool>::type
   23.67 +  typename enable_if<typename Graph::UTag,bool>::type
   23.68    euler(const Graph &g) 
   23.69    {
   23.70      for(typename Graph::NodeIt n(g);n!=INVALID;++n)
   23.71 @@ -232,7 +232,7 @@
   23.72      return connected(g);
   23.73    }
   23.74    template<class Graph>
   23.75 -  typename disable_if<typename Graph::UndirTag,bool>::type
   23.76 +  typename disable_if<typename Graph::UTag,bool>::type
   23.77  #endif
   23.78    euler(const Graph &g) 
   23.79    {
    24.1 --- a/lemon/full_graph.h	Thu Jan 26 06:44:22 2006 +0000
    24.2 +++ b/lemon/full_graph.h	Thu Jan 26 15:42:13 2006 +0000
    24.3 @@ -31,7 +31,7 @@
    24.4  
    24.5  ///\ingroup graphs
    24.6  ///\file
    24.7 -///\brief FullGraph and UndirFullGraph classes.
    24.8 +///\brief FullGraph and FullUGraph classes.
    24.9  
   24.10  
   24.11  namespace lemon {
   24.12 @@ -213,19 +213,19 @@
   24.13    };
   24.14  
   24.15  
   24.16 -  class UndirFullGraphBase {
   24.17 +  class FullUGraphBase {
   24.18      int _nodeNum;
   24.19      int _edgeNum;
   24.20    public:
   24.21  
   24.22 -    typedef UndirFullGraphBase Graph;
   24.23 +    typedef FullUGraphBase Graph;
   24.24  
   24.25      class Node;
   24.26      class Edge;
   24.27  
   24.28    public:
   24.29  
   24.30 -    UndirFullGraphBase() {}
   24.31 +    FullUGraphBase() {}
   24.32  
   24.33  
   24.34      ///Creates a full graph with \c n nodes.
   24.35 @@ -301,7 +301,7 @@
   24.36      
   24.37        
   24.38      class Node {
   24.39 -      friend class UndirFullGraphBase;
   24.40 +      friend class FullUGraphBase;
   24.41  
   24.42      protected:
   24.43        int id;
   24.44 @@ -317,7 +317,7 @@
   24.45  
   24.46  
   24.47      class Edge {
   24.48 -      friend class UndirFullGraphBase;
   24.49 +      friend class FullUGraphBase;
   24.50        
   24.51      protected:
   24.52        int id;  // _nodeNum * target + source;
   24.53 @@ -377,10 +377,10 @@
   24.54  
   24.55    };
   24.56  
   24.57 -  typedef StaticMappableUndirGraphExtender<
   24.58 -    IterableUndirGraphExtender<
   24.59 -    AlterableUndirGraphExtender<
   24.60 -    UndirGraphExtender<UndirFullGraphBase> > > > ExtendedUndirFullGraphBase;
   24.61 +  typedef StaticMappableUGraphExtender<
   24.62 +    IterableUGraphExtender<
   24.63 +    AlterableUGraphExtender<
   24.64 +    UGraphExtender<FullUGraphBase> > > > ExtendedFullUGraphBase;
   24.65  
   24.66    /// \ingroup graphs
   24.67    ///
   24.68 @@ -390,20 +390,20 @@
   24.69    /// It is completely static, so you can neither add nor delete either
   24.70    /// edges or nodes.
   24.71    ///
   24.72 -  /// The main difference beetween the \e FullGraph and \e UndirFullGraph class
   24.73 +  /// The main difference beetween the \e FullGraph and \e FullUGraph class
   24.74    /// is that this class conforms to the undirected graph concept and
   24.75    /// it does not contain the loop edges.
   24.76    ///
   24.77    /// \sa FullGraph
   24.78    ///
   24.79    /// \author Balazs Dezso
   24.80 -  class UndirFullGraph : public ExtendedUndirFullGraphBase {
   24.81 +  class FullUGraph : public ExtendedFullUGraphBase {
   24.82    public:
   24.83 -    UndirFullGraph(int n) { construct(n); }
   24.84 +    FullUGraph(int n) { construct(n); }
   24.85    };
   24.86  
   24.87  
   24.88 -  class FullUndirBipartiteGraphBase {
   24.89 +  class FullUBipartiteGraphBase {
   24.90    protected:
   24.91  
   24.92      int _upperNodeNum;
   24.93 @@ -415,12 +415,12 @@
   24.94  
   24.95      class NodeSetError : public LogicError {
   24.96        virtual const char* exceptionName() const { 
   24.97 -	return "lemon::FullUndirBipartiteGraph::NodeSetError";
   24.98 +	return "lemon::FullUBipartiteGraph::NodeSetError";
   24.99        }
  24.100      };
  24.101    
  24.102      class Node {
  24.103 -      friend class FullUndirBipartiteGraphBase;
  24.104 +      friend class FullUBipartiteGraphBase;
  24.105      protected:
  24.106        int id;
  24.107  
  24.108 @@ -434,7 +434,7 @@
  24.109      };
  24.110  
  24.111      class Edge {
  24.112 -      friend class FullUndirBipartiteGraphBase;
  24.113 +      friend class FullUBipartiteGraphBase;
  24.114      protected:
  24.115        int id;
  24.116  
  24.117 @@ -575,19 +575,19 @@
  24.118    };
  24.119  
  24.120  
  24.121 -  typedef StaticMappableUndirBipartiteGraphExtender<
  24.122 -    IterableUndirBipartiteGraphExtender<
  24.123 -    AlterableUndirBipartiteGraphExtender<
  24.124 -    UndirBipartiteGraphExtender <
  24.125 -    FullUndirBipartiteGraphBase> > > >
  24.126 -  ExtendedFullUndirBipartiteGraphBase;
  24.127 +  typedef StaticMappableUBipartiteGraphExtender<
  24.128 +    IterableUBipartiteGraphExtender<
  24.129 +    AlterableUBipartiteGraphExtender<
  24.130 +    UBipartiteGraphExtender <
  24.131 +    FullUBipartiteGraphBase> > > >
  24.132 +  ExtendedFullUBipartiteGraphBase;
  24.133  
  24.134  
  24.135 -  class FullUndirBipartiteGraph : 
  24.136 -    public ExtendedFullUndirBipartiteGraphBase {
  24.137 +  class FullUBipartiteGraph : 
  24.138 +    public ExtendedFullUBipartiteGraphBase {
  24.139    public:
  24.140 -    typedef ExtendedFullUndirBipartiteGraphBase Parent;
  24.141 -    FullUndirBipartiteGraph(int upperNodeNum, int lowerNodeNum) {
  24.142 +    typedef ExtendedFullUBipartiteGraphBase Parent;
  24.143 +    FullUBipartiteGraph(int upperNodeNum, int lowerNodeNum) {
  24.144        Parent::construct(upperNodeNum, lowerNodeNum);
  24.145      }
  24.146    };
    25.1 --- a/lemon/graph_adaptor.h	Thu Jan 26 06:44:22 2006 +0000
    25.2 +++ b/lemon/graph_adaptor.h	Thu Jan 26 15:42:13 2006 +0000
    25.3 @@ -672,31 +672,31 @@
    25.4    };
    25.5  
    25.6    template <typename _Graph>
    25.7 -  class UndirGraphAdaptorBase : 
    25.8 -    public UndirGraphExtender<GraphAdaptorBase<_Graph> > {
    25.9 +  class UGraphAdaptorBase : 
   25.10 +    public UGraphExtender<GraphAdaptorBase<_Graph> > {
   25.11    public:
   25.12      typedef _Graph Graph;
   25.13 -    typedef UndirGraphExtender<GraphAdaptorBase<_Graph> > Parent;
   25.14 +    typedef UGraphExtender<GraphAdaptorBase<_Graph> > Parent;
   25.15    protected:
   25.16 -    UndirGraphAdaptorBase() : Parent() { }
   25.17 +    UGraphAdaptorBase() : Parent() { }
   25.18    public:
   25.19 -    typedef typename Parent::UndirEdge UndirEdge;
   25.20 +    typedef typename Parent::UEdge UEdge;
   25.21      typedef typename Parent::Edge Edge;
   25.22      
   25.23      template <typename T>
   25.24      class EdgeMap {
   25.25      protected:
   25.26 -      const UndirGraphAdaptorBase<_Graph>* g;
   25.27 +      const UGraphAdaptorBase<_Graph>* g;
   25.28        template <typename TT> friend class EdgeMap;
   25.29        typename _Graph::template EdgeMap<T> forward_map, backward_map; 
   25.30      public:
   25.31        typedef T Value;
   25.32        typedef Edge Key;
   25.33        
   25.34 -      EdgeMap(const UndirGraphAdaptorBase<_Graph>& _g) : g(&_g), 
   25.35 +      EdgeMap(const UGraphAdaptorBase<_Graph>& _g) : g(&_g), 
   25.36  	forward_map(*(g->graph)), backward_map(*(g->graph)) { }
   25.37  
   25.38 -      EdgeMap(const UndirGraphAdaptorBase<_Graph>& _g, T a) : g(&_g), 
   25.39 +      EdgeMap(const UGraphAdaptorBase<_Graph>& _g, T a) : g(&_g), 
   25.40  	forward_map(*(g->graph), a), backward_map(*(g->graph), a) { }
   25.41        
   25.42        void set(Edge e, T a) { 
   25.43 @@ -715,24 +715,24 @@
   25.44      };
   25.45          
   25.46      template <typename T>
   25.47 -    class UndirEdgeMap {
   25.48 -      template <typename TT> friend class UndirEdgeMap;
   25.49 +    class UEdgeMap {
   25.50 +      template <typename TT> friend class UEdgeMap;
   25.51        typename _Graph::template EdgeMap<T> map; 
   25.52      public:
   25.53        typedef T Value;
   25.54 -      typedef UndirEdge Key;
   25.55 +      typedef UEdge Key;
   25.56        
   25.57 -      UndirEdgeMap(const UndirGraphAdaptorBase<_Graph>& g) : 
   25.58 +      UEdgeMap(const UGraphAdaptorBase<_Graph>& g) : 
   25.59  	map(*(g.graph)) { }
   25.60  
   25.61 -      UndirEdgeMap(const UndirGraphAdaptorBase<_Graph>& g, T a) : 
   25.62 +      UEdgeMap(const UGraphAdaptorBase<_Graph>& g, T a) : 
   25.63  	map(*(g.graph), a) { }
   25.64        
   25.65 -      void set(UndirEdge e, T a) { 
   25.66 +      void set(UEdge e, T a) { 
   25.67  	map.set(e, a); 
   25.68        }
   25.69  
   25.70 -      T operator[](UndirEdge e) const { 
   25.71 +      T operator[](UEdge e) const { 
   25.72  	return map[e]; 
   25.73        }
   25.74      };
   25.75 @@ -746,17 +746,17 @@
   25.76    /// 
   25.77    /// \author Marton Makai
   25.78    template<typename _Graph>
   25.79 -  class UndirGraphAdaptor : 
   25.80 -    public IterableUndirGraphExtender<
   25.81 -    UndirGraphAdaptorBase<_Graph> > {
   25.82 +  class UGraphAdaptor : 
   25.83 +    public IterableUGraphExtender<
   25.84 +    UGraphAdaptorBase<_Graph> > {
   25.85    public:
   25.86      typedef _Graph Graph;
   25.87 -    typedef IterableUndirGraphExtender<
   25.88 -      UndirGraphAdaptorBase<_Graph> > Parent;
   25.89 +    typedef IterableUGraphExtender<
   25.90 +      UGraphAdaptorBase<_Graph> > Parent;
   25.91    protected:
   25.92 -    UndirGraphAdaptor() { }
   25.93 +    UGraphAdaptor() { }
   25.94    public:
   25.95 -    UndirGraphAdaptor(_Graph& _graph) { 
   25.96 +    UGraphAdaptor(_Graph& _graph) { 
   25.97        setGraph(_graph);
   25.98      }
   25.99    };
    26.1 --- a/lemon/graph_reader.h	Thu Jan 26 06:44:22 2006 +0000
    26.2 +++ b/lemon/graph_reader.h	Thu Jan 26 15:42:13 2006 +0000
    26.3 @@ -378,7 +378,7 @@
    26.4  
    26.5    /// \brief The undirected graph reader class.
    26.6    ///
    26.7 -  /// The \c UndirGraphReader class provides the graph input. 
    26.8 +  /// The \c UGraphReader class provides the graph input. 
    26.9    /// Before you read this documentation it might be useful to read the general
   26.10    /// description of  \ref graph-io-page "Graph Input-Output".
   26.11    ///
   26.12 @@ -390,8 +390,8 @@
   26.13    /// edges.
   26.14    ///
   26.15    /// If you read a graph you need not read all the maps and items just those
   26.16 -  /// that you need. The interface of the \c UndirGraphReader is very similar
   26.17 -  /// to the UndirGraphWriter but the reading method does not depend on the
   26.18 +  /// that you need. The interface of the \c UGraphReader is very similar
   26.19 +  /// to the UGraphWriter but the reading method does not depend on the
   26.20    /// order of the given commands.
   26.21    ///
   26.22    /// The reader object suppose that each not readed value does not contain 
   26.23 @@ -399,7 +399,7 @@
   26.24    /// it should skip the values when the string representation contains spaces.
   26.25    ///
   26.26    /// \code
   26.27 -  /// UndirGraphReader<UndirListGraph> reader(std::cin, graph);
   26.28 +  /// UGraphReader<ListUGraph> reader(std::cin, graph);
   26.29    /// \endcode
   26.30    ///
   26.31    /// The \c readNodeMap() function reads a map from the \c \@nodeset section.
   26.32 @@ -416,11 +416,11 @@
   26.33    /// reader.readNodeMap("color", colorMap);
   26.34    /// \endcode
   26.35    ///
   26.36 -  /// With the \c readUndirEdgeMap() member function you can give an 
   26.37 -  /// undir edge map reading command similar to the NodeMaps. 
   26.38 +  /// With the \c readUEdgeMap() member function you can give an 
   26.39 +  /// uedge map reading command similar to the NodeMaps. 
   26.40    ///
   26.41    /// \code
   26.42 -  /// reader.readUndirEdgeMap("capacity", capacityMap);
   26.43 +  /// reader.readUEdgeMap("capacity", capacityMap);
   26.44    /// \endcode
   26.45    ///
   26.46    /// The reading of the directed edge maps is just a syntactical sugar.
   26.47 @@ -432,14 +432,14 @@
   26.48    /// reader.readEdgeMap("flow", flowMap);
   26.49    /// \endcode 
   26.50    ///
   26.51 -  /// With \c readNode() and \c readUndirEdge() functions you can read 
   26.52 -  /// labeled Nodes and UndirEdges.
   26.53 +  /// With \c readNode() and \c readUEdge() functions you can read 
   26.54 +  /// labeled Nodes and UEdges.
   26.55    ///
   26.56    /// \code
   26.57    /// reader.readNode("source", sourceNode);
   26.58    /// reader.readNode("target", targetNode);
   26.59    ///
   26.60 -  /// reader.readUndirEdge("observed", undirEdge);
   26.61 +  /// reader.readUEdge("observed", uEdge);
   26.62    /// \endcode
   26.63    ///
   26.64    /// With the \c readAttribute() functions you can read an attribute
   26.65 @@ -455,69 +455,69 @@
   26.66    ///
   26.67    /// \see GraphReader
   26.68    /// \see DefaultReaderTraits
   26.69 -  /// \see \ref UndirGraphWriter
   26.70 +  /// \see \ref UGraphWriter
   26.71    /// \see \ref graph-io-page
   26.72    ///
   26.73    /// \author Balazs Dezso
   26.74    template <typename _Graph, typename _ReaderTraits = DefaultReaderTraits> 
   26.75 -  class UndirGraphReader {
   26.76 +  class UGraphReader {
   26.77    public:
   26.78      
   26.79      typedef _Graph Graph;
   26.80      typedef typename Graph::Node Node;
   26.81      typedef typename Graph::Edge Edge;
   26.82 -    typedef typename Graph::UndirEdge UndirEdge;
   26.83 +    typedef typename Graph::UEdge UEdge;
   26.84  
   26.85      typedef _ReaderTraits ReaderTraits;
   26.86      typedef typename ReaderTraits::Skipper DefaultSkipper;
   26.87  
   26.88 -    /// \brief Construct a new UndirGraphReader.
   26.89 +    /// \brief Construct a new UGraphReader.
   26.90      ///
   26.91 -    /// Construct a new UndirGraphReader. It reads into the given graph
   26.92 +    /// Construct a new UGraphReader. It reads into the given graph
   26.93      /// and it use the given reader as the default skipper.
   26.94 -    UndirGraphReader(std::istream& _is, Graph& _graph, 
   26.95 +    UGraphReader(std::istream& _is, Graph& _graph, 
   26.96  		     const DefaultSkipper& _skipper = DefaultSkipper()) 
   26.97        : reader(new LemonReader(_is)), own_reader(true), skipper(_skipper),
   26.98  	nodeset_reader(*reader, _graph, std::string(), skipper),
   26.99 -	undir_edgeset_reader(*reader, _graph, nodeset_reader, 
  26.100 +	u_edgeset_reader(*reader, _graph, nodeset_reader, 
  26.101  			     std::string(), skipper),
  26.102  	node_reader(*reader, nodeset_reader, std::string()),
  26.103 -	undir_edge_reader(*reader, undir_edgeset_reader, std::string()),
  26.104 +	u_edge_reader(*reader, u_edgeset_reader, std::string()),
  26.105  	attribute_reader(*reader, std::string()) {}
  26.106  
  26.107 -    /// \brief Construct a new UndirGraphReader.
  26.108 +    /// \brief Construct a new UGraphReader.
  26.109      ///
  26.110 -    /// Construct a new UndirGraphReader. It reads into the given graph
  26.111 +    /// Construct a new UGraphReader. It reads into the given graph
  26.112      /// and it use the given reader as the default skipper.
  26.113 -    UndirGraphReader(const std::string& _filename, Graph& _graph, 
  26.114 +    UGraphReader(const std::string& _filename, Graph& _graph, 
  26.115  		     const DefaultSkipper& _skipper = DefaultSkipper()) 
  26.116        : reader(new LemonReader(_filename)), own_reader(true), 
  26.117  	skipper(_skipper),
  26.118  	nodeset_reader(*reader, _graph, std::string(), skipper),
  26.119 -	undir_edgeset_reader(*reader, _graph, nodeset_reader, 
  26.120 +	u_edgeset_reader(*reader, _graph, nodeset_reader, 
  26.121  			     std::string(), skipper),
  26.122  	node_reader(*reader, nodeset_reader, std::string()),
  26.123 -	undir_edge_reader(*reader, undir_edgeset_reader, std::string()),
  26.124 +	u_edge_reader(*reader, u_edgeset_reader, std::string()),
  26.125  	attribute_reader(*reader, std::string()) {}
  26.126  
  26.127 -    /// \brief Construct a new UndirGraphReader.
  26.128 +    /// \brief Construct a new UGraphReader.
  26.129      ///
  26.130 -    /// Construct a new UndirGraphReader. It reads into the given graph
  26.131 +    /// Construct a new UGraphReader. It reads into the given graph
  26.132      /// and it use the given reader as the default skipper.
  26.133 -    UndirGraphReader(LemonReader& _reader, Graph& _graph, 
  26.134 +    UGraphReader(LemonReader& _reader, Graph& _graph, 
  26.135  		     const DefaultSkipper& _skipper = DefaultSkipper()) 
  26.136        : reader(_reader), own_reader(false), skipper(_skipper),
  26.137  	nodeset_reader(*reader, _graph, std::string(), skipper),
  26.138 -	undir_edgeset_reader(*reader, _graph, nodeset_reader, 
  26.139 +	u_edgeset_reader(*reader, _graph, nodeset_reader, 
  26.140  			     std::string(), skipper),
  26.141  	node_reader(*reader, nodeset_reader, std::string()),
  26.142 -	undir_edge_reader(*reader, undir_edgeset_reader, std::string()),
  26.143 +	u_edge_reader(*reader, u_edgeset_reader, std::string()),
  26.144  	attribute_reader(*reader, std::string()) {}
  26.145  
  26.146      /// \brief Destruct the graph reader.
  26.147      ///
  26.148      /// Destruct the graph reader.
  26.149 -    ~UndirGraphReader() {
  26.150 +    ~UGraphReader() {
  26.151        if (own_reader) 
  26.152  	delete reader;
  26.153      }
  26.154 @@ -526,13 +526,13 @@
  26.155      ///
  26.156      /// Give a new node map reading command to the reader.
  26.157      template <typename Map>
  26.158 -    UndirGraphReader& readNodeMap(std::string name, Map& map) {
  26.159 +    UGraphReader& readNodeMap(std::string name, Map& map) {
  26.160        nodeset_reader.readNodeMap(name, map);
  26.161        return *this;
  26.162      }
  26.163  
  26.164      template <typename Map>
  26.165 -    UndirGraphReader& readNodeMap(std::string name, const Map& map) {
  26.166 +    UGraphReader& readNodeMap(std::string name, const Map& map) {
  26.167        nodeset_reader.readNodeMap(name, map);
  26.168        return *this;
  26.169      }
  26.170 @@ -541,14 +541,14 @@
  26.171      ///
  26.172      /// Give a new node map reading command to the reader.
  26.173      template <typename Reader, typename Map>
  26.174 -    UndirGraphReader& readNodeMap(std::string name, Map& map, 
  26.175 +    UGraphReader& readNodeMap(std::string name, Map& map, 
  26.176  				  const Reader& reader = Reader()) {
  26.177        nodeset_reader.readNodeMap(name, map, reader);
  26.178        return *this;
  26.179      }
  26.180  
  26.181      template <typename Reader, typename Map>
  26.182 -    UndirGraphReader& readNodeMap(std::string name, const Map& map, 
  26.183 +    UGraphReader& readNodeMap(std::string name, const Map& map, 
  26.184  				  const Reader& reader = Reader()) {
  26.185        nodeset_reader.readNodeMap(name, map, reader);
  26.186        return *this;
  26.187 @@ -558,7 +558,7 @@
  26.188      ///
  26.189      /// Give a new node map skipping command to the reader.
  26.190      template <typename Reader>
  26.191 -    UndirGraphReader& skipNodeMap(std::string name, 
  26.192 +    UGraphReader& skipNodeMap(std::string name, 
  26.193  			     const Reader& reader = Reader()) {
  26.194        nodeset_reader.skipNodeMap(name, reader);
  26.195        return *this;
  26.196 @@ -568,14 +568,14 @@
  26.197      ///
  26.198      /// Give a new undirected edge map reading command to the reader.
  26.199      template <typename Map>
  26.200 -    UndirGraphReader& readUndirEdgeMap(std::string name, Map& map) { 
  26.201 -      undir_edgeset_reader.readUndirEdgeMap(name, map);
  26.202 +    UGraphReader& readUEdgeMap(std::string name, Map& map) { 
  26.203 +      u_edgeset_reader.readUEdgeMap(name, map);
  26.204        return *this;
  26.205      }
  26.206  
  26.207      template <typename Map>
  26.208 -    UndirGraphReader& readUndirEdgeMap(std::string name, const Map& map) { 
  26.209 -      undir_edgeset_reader.readUndirEdgeMap(name, map);
  26.210 +    UGraphReader& readUEdgeMap(std::string name, const Map& map) { 
  26.211 +      u_edgeset_reader.readUEdgeMap(name, map);
  26.212        return *this;
  26.213      }
  26.214  
  26.215 @@ -584,16 +584,16 @@
  26.216      ///
  26.217      /// Give a new undirected edge map reading command to the reader.
  26.218      template <typename Reader, typename Map>
  26.219 -    UndirGraphReader& readUndirEdgeMap(std::string name, Map& map,
  26.220 +    UGraphReader& readUEdgeMap(std::string name, Map& map,
  26.221  				       const Reader& reader = Reader()) {
  26.222 -      undir_edgeset_reader.readUndirEdgeMap(name, map, reader);
  26.223 +      u_edgeset_reader.readUEdgeMap(name, map, reader);
  26.224        return *this;
  26.225      }
  26.226  
  26.227      template <typename Reader, typename Map>
  26.228 -    UndirGraphReader& readUndirEdgeMap(std::string name, const Map& map,
  26.229 +    UGraphReader& readUEdgeMap(std::string name, const Map& map,
  26.230  				       const Reader& reader = Reader()) {
  26.231 -      undir_edgeset_reader.readUndirEdgeMap(name, map, reader);
  26.232 +      u_edgeset_reader.readUEdgeMap(name, map, reader);
  26.233        return *this;
  26.234      }
  26.235  
  26.236 @@ -601,9 +601,9 @@
  26.237      ///
  26.238      /// Give a new undirected edge map skipping command to the reader.
  26.239      template <typename Reader>
  26.240 -    UndirGraphReader& skipUndirEdgeMap(std::string name,
  26.241 +    UGraphReader& skipUEdgeMap(std::string name,
  26.242  				       const Reader& reader = Reader()) {
  26.243 -      undir_edgeset_reader.skipUndirMap(name, reader);
  26.244 +      u_edgeset_reader.skipUMap(name, reader);
  26.245        return *this;
  26.246      }
  26.247  
  26.248 @@ -612,14 +612,14 @@
  26.249      ///
  26.250      /// Give a new edge map reading command to the reader.
  26.251      template <typename Map>
  26.252 -    UndirGraphReader& readEdgeMap(std::string name, Map& map) { 
  26.253 -      undir_edgeset_reader.readEdgeMap(name, map);
  26.254 +    UGraphReader& readEdgeMap(std::string name, Map& map) { 
  26.255 +      u_edgeset_reader.readEdgeMap(name, map);
  26.256        return *this;
  26.257      }
  26.258  
  26.259      template <typename Map>
  26.260 -    UndirGraphReader& readEdgeMap(std::string name, const Map& map) { 
  26.261 -      undir_edgeset_reader.readEdgeMap(name, map);
  26.262 +    UGraphReader& readEdgeMap(std::string name, const Map& map) { 
  26.263 +      u_edgeset_reader.readEdgeMap(name, map);
  26.264        return *this;
  26.265      }
  26.266  
  26.267 @@ -628,16 +628,16 @@
  26.268      ///
  26.269      /// Give a new edge map reading command to the reader.
  26.270      template <typename Reader, typename Map>
  26.271 -    UndirGraphReader& readEdgeMap(std::string name, Map& map,
  26.272 +    UGraphReader& readEdgeMap(std::string name, Map& map,
  26.273  				       const Reader& reader = Reader()) {
  26.274 -      undir_edgeset_reader.readEdgeMap(name, map, reader);
  26.275 +      u_edgeset_reader.readEdgeMap(name, map, reader);
  26.276        return *this;
  26.277      }
  26.278  
  26.279      template <typename Reader, typename Map>
  26.280 -    UndirGraphReader& readEdgeMap(std::string name, const Map& map,
  26.281 +    UGraphReader& readEdgeMap(std::string name, const Map& map,
  26.282  				       const Reader& reader = Reader()) {
  26.283 -      undir_edgeset_reader.readEdgeMap(name, map, reader);
  26.284 +      u_edgeset_reader.readEdgeMap(name, map, reader);
  26.285        return *this;
  26.286      }
  26.287  
  26.288 @@ -645,16 +645,16 @@
  26.289      ///
  26.290      /// Give a new edge map skipping command to the reader.
  26.291      template <typename Reader>
  26.292 -    UndirGraphReader& skipEdgeMap(std::string name,
  26.293 +    UGraphReader& skipEdgeMap(std::string name,
  26.294  				       const Reader& reader = Reader()) {
  26.295 -      undir_edgeset_reader.skipEdgeMap(name, reader);
  26.296 +      u_edgeset_reader.skipEdgeMap(name, reader);
  26.297        return *this;
  26.298      }
  26.299  
  26.300      /// \brief Give a new labeled node reading command to the reader.
  26.301      ///
  26.302      /// Give a new labeled node reading command to the reader.
  26.303 -    UndirGraphReader& readNode(std::string name, Node& node) {
  26.304 +    UGraphReader& readNode(std::string name, Node& node) {
  26.305        node_reader.readNode(name, node);
  26.306        return *this;
  26.307      }
  26.308 @@ -662,23 +662,23 @@
  26.309      /// \brief Give a new labeled edge reading command to the reader.
  26.310      ///
  26.311      /// Give a new labeled edge reading command to the reader.
  26.312 -    UndirGraphReader& readEdge(std::string name, Edge& edge) {
  26.313 -      undir_edge_reader.readEdge(name, edge);
  26.314 +    UGraphReader& readEdge(std::string name, Edge& edge) {
  26.315 +      u_edge_reader.readEdge(name, edge);
  26.316      }
  26.317  
  26.318      /// \brief Give a new labeled undirected edge reading command to the
  26.319      /// reader.
  26.320      ///
  26.321      /// Give a new labeled undirected edge reading command to the reader.
  26.322 -    UndirGraphReader& readUndirEdge(std::string name, UndirEdge& edge) {
  26.323 -      undir_edge_reader.readUndirEdge(name, edge);
  26.324 +    UGraphReader& readUEdge(std::string name, UEdge& edge) {
  26.325 +      u_edge_reader.readUEdge(name, edge);
  26.326      }
  26.327  
  26.328      /// \brief Give a new attribute reading command.
  26.329      ///
  26.330      ///  Give a new attribute reading command.
  26.331      template <typename Value>
  26.332 -    UndirGraphReader& readAttribute(std::string name, Value& value) {
  26.333 +    UGraphReader& readAttribute(std::string name, Value& value) {
  26.334        attribute_reader.readAttribute(name, value);
  26.335        return *this;
  26.336      }
  26.337 @@ -687,7 +687,7 @@
  26.338      ///
  26.339      ///  Give a new attribute reading command.
  26.340      template <typename Reader, typename Value>
  26.341 -    UndirGraphReader& readAttribute(std::string name, Value& value, 
  26.342 +    UGraphReader& readAttribute(std::string name, Value& value, 
  26.343  			       const Reader& reader) {
  26.344        attribute_reader.readAttribute<Reader>(name, value, reader);
  26.345        return *this;
  26.346 @@ -716,7 +716,7 @@
  26.347      /// \brief Returns true if the reader can give back the items by its label.
  26.348      bool isLabelReader() const {
  26.349        return nodeset_reader.isLabelReader() && 
  26.350 -        undir_edgeset_reader.isLabelReader();
  26.351 +        u_edgeset_reader.isLabelReader();
  26.352      }
  26.353  
  26.354      /// \brief Gives back the node by its label.
  26.355 @@ -732,7 +732,7 @@
  26.356      /// It reads an label from the stream and gives back which edge belongs to
  26.357      /// it. It is possible only if there was read an "label" named edge map.
  26.358      void readLabel(std::istream& is, Edge& edge) const {
  26.359 -      return undir_edgeset_reader.readLabel(is, edge);
  26.360 +      return u_edgeset_reader.readLabel(is, edge);
  26.361      } 
  26.362  
  26.363      /// \brief Gives back the undirected edge by its label.
  26.364 @@ -740,8 +740,8 @@
  26.365      /// It reads an label from the stream and gives back which undirected edge 
  26.366      /// belongs to it. It is possible only if there was read an "label" named 
  26.367      /// edge map.
  26.368 -    void readLabel(std::istream& is, UndirEdge& uedge) const {
  26.369 -      return undir_edgeset_reader.readLabel(is, uedge);
  26.370 +    void readLabel(std::istream& is, UEdge& uedge) const {
  26.371 +      return u_edgeset_reader.readLabel(is, uedge);
  26.372      } 
  26.373      
  26.374  
  26.375 @@ -753,10 +753,10 @@
  26.376      DefaultSkipper skipper;
  26.377  
  26.378      NodeSetReader<Graph, ReaderTraits> nodeset_reader;
  26.379 -    UndirEdgeSetReader<Graph, ReaderTraits> undir_edgeset_reader;
  26.380 +    UEdgeSetReader<Graph, ReaderTraits> u_edgeset_reader;
  26.381  
  26.382      NodeReader<Graph> node_reader;
  26.383 -    UndirEdgeReader<Graph> undir_edge_reader;
  26.384 +    UEdgeReader<Graph> u_edge_reader;
  26.385      
  26.386      AttributeReader<ReaderTraits> attribute_reader;
  26.387    };
  26.388 @@ -764,7 +764,7 @@
  26.389    /// \brief Read an undirected graph from the input.
  26.390    ///
  26.391    /// It is a helper function to read an undirected graph from the given input
  26.392 -  /// stream. It gives back an UndirGraphReader object and this object
  26.393 +  /// stream. It gives back an UGraphReader object and this object
  26.394    /// can read more maps, labeled nodes, edges, undirected edges and
  26.395    /// attributes.
  26.396    ///
  26.397 @@ -773,14 +773,14 @@
  26.398    /// \param is The input stream.
  26.399    /// \param g The graph.
  26.400    template<typename Graph>
  26.401 -  UndirGraphReader<Graph> undirGraphReader(std::istream& is, Graph &g) {
  26.402 +  UGraphReader<Graph> uGraphReader(std::istream& is, Graph &g) {
  26.403      return GraphReader<Graph>(is, g);
  26.404    }
  26.405  
  26.406    /// \brief Read an undirected graph from the input.
  26.407    ///
  26.408    /// It is a helper function to read an undirected graph from the given input
  26.409 -  /// file. It gives back an UndirGraphReader object and this object
  26.410 +  /// file. It gives back an UGraphReader object and this object
  26.411    /// can read more maps, labeled nodes, edges, undirected edges and 
  26.412    /// attributes.
  26.413    ///
  26.414 @@ -789,7 +789,7 @@
  26.415    /// \param fn The input filename.
  26.416    /// \param g The graph.
  26.417    template<typename Graph>
  26.418 -  UndirGraphReader<Graph> undirGraphReader(const std::string& fn, Graph &g) {
  26.419 +  UGraphReader<Graph> uGraphReader(const std::string& fn, Graph &g) {
  26.420      return GraphReader<Graph>(fn, g);
  26.421    }
  26.422  
    27.1 --- a/lemon/graph_to_eps.h	Thu Jan 26 06:44:22 2006 +0000
    27.2 +++ b/lemon/graph_to_eps.h	Thu Jan 26 15:42:13 2006 +0000
    27.3 @@ -234,7 +234,7 @@
    27.4    ConstMap<typename Graph::Node,bool > _nodePsTexts;  
    27.5    char *_nodePsTextsPreamble;
    27.6    
    27.7 -  bool _undir;
    27.8 +  bool _u;
    27.9    bool _pleaseRemoveOsStream;
   27.10  
   27.11    bool _scaleToA4;
   27.12 @@ -272,7 +272,7 @@
   27.13      _enableParallel(false), _parEdgeDist(1),
   27.14      _showNodeText(false), _nodeTexts(false), _nodeTextSize(1),
   27.15      _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0),
   27.16 -    _undir(false),
   27.17 +    _u(false),
   27.18      _pleaseRemoveOsStream(_pros), _scaleToA4(false),
   27.19      _nodeTextColorType(SAME_COL), _nodeTextColors(Color(0,0,0)),
   27.20      _autoNodeScale(false),
   27.21 @@ -329,7 +329,7 @@
   27.22    using T::_nodePsTexts;  
   27.23    using T::_nodePsTextsPreamble;
   27.24    
   27.25 -  using T::_undir;
   27.26 +  using T::_u;
   27.27    using T::_pleaseRemoveOsStream;
   27.28  
   27.29    using T::_scaleToA4;
   27.30 @@ -734,12 +734,12 @@
   27.31  
   27.32    ///Sets whether the the graph is undirected
   27.33    ///
   27.34 -  GraphToEps<T> &undir(bool b=true) {_undir=b;return *this;}
   27.35 +  GraphToEps<T> &u(bool b=true) {_u=b;return *this;}
   27.36    ///Sets whether the the graph is directed
   27.37  
   27.38    ///Sets whether the the graph is directed.
   27.39    ///Use it to show the undirected edges as a pair of directed ones.
   27.40 -  GraphToEps<T> &bidir(bool b=true) {_undir=!b;return *this;}
   27.41 +  GraphToEps<T> &bidir(bool b=true) {_u=!b;return *this;}
   27.42  
   27.43    ///Sets the title.
   27.44  
   27.45 @@ -958,7 +958,7 @@
   27.46        if(_enableParallel) {
   27.47  	std::vector<Edge> el;
   27.48  	for(EdgeIt e(g);e!=INVALID;++e)
   27.49 -	  if((!_undir||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
   27.50 +	  if((!_u||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
   27.51  	    el.push_back(e);
   27.52  	std::sort(el.begin(),el.end(),edgeLess(g));
   27.53  	
   27.54 @@ -1046,7 +1046,7 @@
   27.55  	}
   27.56        }
   27.57        else for(EdgeIt e(g);e!=INVALID;++e)
   27.58 -	if((!_undir||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
   27.59 +	if((!_u||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
   27.60  	  if(_drawArrows) {
   27.61  	    xy<double> d(mycoords[g.target(e)]-mycoords[g.source(e)]);
   27.62  	    double rn=_nodeSizes[g.target(e)]*_nodeScale;
    28.1 --- a/lemon/graph_utils.h	Thu Jan 26 06:44:22 2006 +0000
    28.2 +++ b/lemon/graph_utils.h	Thu Jan 26 15:42:13 2006 +0000
    28.3 @@ -71,8 +71,8 @@
    28.4  
    28.5    ///This \c \#define creates the same convenience typedefs as defined by
    28.6    ///\ref GRAPH_TYPEDEFS(Graph) and three more, namely it creates
    28.7 -  ///\c UndirEdge, \c UndirEdgeIt, \c IncEdgeIt,
    28.8 -  ///\c BoolUndirEdgeMap, \c IntUndirEdgeMap,  \c DoubleUndirEdgeMap.  
    28.9 +  ///\c UEdge, \c UEdgeIt, \c IncEdgeIt,
   28.10 +  ///\c BoolUEdgeMap, \c IntUEdgeMap,  \c DoubleUEdgeMap.  
   28.11    ///
   28.12    ///\note If \c G it a template parameter, it should be used in this way.
   28.13    ///\code
   28.14 @@ -83,12 +83,12 @@
   28.15    ///template typedefs in C++.
   28.16  #define UNDIRGRAPH_TYPEDEFS(Graph)				\
   28.17    GRAPH_TYPEDEFS(Graph)						\
   28.18 -    typedef Graph:: UndirEdge   UndirEdge;			\
   28.19 -    typedef Graph:: UndirEdgeIt UndirEdgeIt;			\
   28.20 +    typedef Graph:: UEdge   UEdge;			\
   28.21 +    typedef Graph:: UEdgeIt UEdgeIt;			\
   28.22      typedef Graph:: IncEdgeIt   IncEdgeIt;		       
   28.23 -//     typedef Graph::template UndirEdgeMap<bool> BoolUndirEdgeMap;	 
   28.24 -//     typedef Graph::template UndirEdgeMap<int> IntUndirEdgeMap;
   28.25 -//     typedef Graph::template UndirEdgeMap<double> DoubleUndirEdgeMap;
   28.26 +//     typedef Graph::template UEdgeMap<bool> BoolUEdgeMap;	 
   28.27 +//     typedef Graph::template UEdgeMap<int> IntUEdgeMap;
   28.28 +//     typedef Graph::template UEdgeMap<double> DoubleUEdgeMap;
   28.29    
   28.30  
   28.31  
   28.32 @@ -162,13 +162,13 @@
   28.33    template <typename Graph>
   28.34    inline
   28.35    typename enable_if<typename Graph::EdgeNumTag, int>::type
   28.36 -  _countUndirEdges(const Graph &g) {
   28.37 -    return g.undirEdgeNum();
   28.38 +  _countUEdges(const Graph &g) {
   28.39 +    return g.uEdgeNum();
   28.40    }
   28.41  
   28.42    template <typename Graph>
   28.43 -  inline int _countUndirEdges(Wrap<Graph> w) {
   28.44 -    return countItems<Graph, typename Graph::UndirEdgeIt>(w.value);
   28.45 +  inline int _countUEdges(Wrap<Graph> w) {
   28.46 +    return countItems<Graph, typename Graph::UEdgeIt>(w.value);
   28.47    }
   28.48  
   28.49    /// \brief Function to count the undirected edges in the graph.
   28.50 @@ -178,8 +178,8 @@
   28.51    /// graph structures it is specialized to run in O(1).
   28.52  
   28.53    template <typename Graph>
   28.54 -  inline int countUndirEdges(const Graph& g) {
   28.55 -    return _countUndirEdges<Graph>(g);
   28.56 +  inline int countUEdges(const Graph& g) {
   28.57 +    return _countUEdges<Graph>(g);
   28.58    }
   28.59  
   28.60  
   28.61 @@ -325,19 +325,19 @@
   28.62    inline
   28.63    typename enable_if<
   28.64      typename Graph::FindEdgeTag, 
   28.65 -    typename Graph::UndirEdge>::type 
   28.66 -  _findUndirEdge(const Graph &g,
   28.67 +    typename Graph::UEdge>::type 
   28.68 +  _findUEdge(const Graph &g,
   28.69  	    typename Graph::Node u, typename Graph::Node v,
   28.70 -	    typename Graph::UndirEdge prev = INVALID) {
   28.71 -    return g.findUndirEdge(u, v, prev);
   28.72 +	    typename Graph::UEdge prev = INVALID) {
   28.73 +    return g.findUEdge(u, v, prev);
   28.74    }
   28.75  
   28.76    template <typename Graph>
   28.77 -  inline typename Graph::UndirEdge 
   28.78 -  _findUndirEdge(Wrap<Graph> w,
   28.79 +  inline typename Graph::UEdge 
   28.80 +  _findUEdge(Wrap<Graph> w,
   28.81  	    typename Graph::Node u, 
   28.82  	    typename Graph::Node v,
   28.83 -	    typename Graph::UndirEdge prev = INVALID) {
   28.84 +	    typename Graph::UEdge prev = INVALID) {
   28.85      const Graph& g = w.value;
   28.86      if (prev == INVALID) {
   28.87        typename Graph::OutEdgeIt e(g, u);
   28.88 @@ -350,9 +350,9 @@
   28.89      }
   28.90    }
   28.91  
   28.92 -  /// \brief Finds an undir edge between two nodes of a graph.
   28.93 +  /// \brief Finds an uedge between two nodes of a graph.
   28.94    ///
   28.95 -  /// Finds an undir edge from node \c u to node \c v in graph \c g.
   28.96 +  /// Finds an uedge from node \c u to node \c v in graph \c g.
   28.97    ///
   28.98    /// If \c prev is \ref INVALID (this is the default value), then
   28.99    /// it finds the first edge from \c u to \c v. Otherwise it looks for
  28.100 @@ -361,63 +361,63 @@
  28.101    ///
  28.102    /// Thus you can iterate through each edge from \c u to \c v as it follows.
  28.103    /// \code
  28.104 -  /// for(UndirEdge e = findUndirEdge(g,u,v); e != INVALID; 
  28.105 -  ///     e = findUndirEdge(g,u,v,e)) {
  28.106 +  /// for(UEdge e = findUEdge(g,u,v); e != INVALID; 
  28.107 +  ///     e = findUEdge(g,u,v,e)) {
  28.108    ///   ...
  28.109    /// }
  28.110    /// \endcode
  28.111    // /// \todo We may want to use the "GraphBase" 
  28.112    // /// interface here...
  28.113    template <typename Graph>
  28.114 -  inline typename Graph::UndirEdge 
  28.115 -  findUndirEdge(const Graph &g,
  28.116 +  inline typename Graph::UEdge 
  28.117 +  findUEdge(const Graph &g,
  28.118  		typename Graph::Node u, 
  28.119  		typename Graph::Node v,
  28.120 -		typename Graph::UndirEdge prev = INVALID) {
  28.121 -    return _findUndirEdge<Graph>(g, u, v, prev);
  28.122 +		typename Graph::UEdge prev = INVALID) {
  28.123 +    return _findUEdge<Graph>(g, u, v, prev);
  28.124    }
  28.125  
  28.126 -  /// \brief Iterator for iterating on undir edges connected the same nodes.
  28.127 +  /// \brief Iterator for iterating on uedges connected the same nodes.
  28.128    ///
  28.129 -  /// Iterator for iterating on undir edges connected the same nodes. It is 
  28.130 -  /// higher level interface for the findUndirEdge() function. You can
  28.131 +  /// Iterator for iterating on uedges connected the same nodes. It is 
  28.132 +  /// higher level interface for the findUEdge() function. You can
  28.133    /// use it the following way:
  28.134    /// \code
  28.135 -  /// for (ConUndirEdgeIt<Graph> it(g, src, trg); it != INVALID; ++it) {
  28.136 +  /// for (ConUEdgeIt<Graph> it(g, src, trg); it != INVALID; ++it) {
  28.137    ///   ...
  28.138    /// }
  28.139    /// \endcode
  28.140    ///
  28.141    /// \author Balazs Dezso 
  28.142    template <typename _Graph>
  28.143 -  class ConUndirEdgeIt : public _Graph::UndirEdge {
  28.144 +  class ConUEdgeIt : public _Graph::UEdge {
  28.145    public:
  28.146  
  28.147      typedef _Graph Graph;
  28.148 -    typedef typename Graph::UndirEdge Parent;
  28.149 +    typedef typename Graph::UEdge Parent;
  28.150  
  28.151 -    typedef typename Graph::UndirEdge UndirEdge;
  28.152 +    typedef typename Graph::UEdge UEdge;
  28.153      typedef typename Graph::Node Node;
  28.154  
  28.155      /// \brief Constructor.
  28.156      ///
  28.157 -    /// Construct a new ConUndirEdgeIt iterating on the edges which
  28.158 +    /// Construct a new ConUEdgeIt iterating on the edges which
  28.159      /// connects the \c u and \c v node.
  28.160 -    ConUndirEdgeIt(const Graph& g, Node u, Node v) : graph(g) {
  28.161 -      Parent::operator=(findUndirEdge(graph, u, v));
  28.162 +    ConUEdgeIt(const Graph& g, Node u, Node v) : graph(g) {
  28.163 +      Parent::operator=(findUEdge(graph, u, v));
  28.164      }
  28.165  
  28.166      /// \brief Constructor.
  28.167      ///
  28.168 -    /// Construct a new ConUndirEdgeIt which continues the iterating from 
  28.169 +    /// Construct a new ConUEdgeIt which continues the iterating from 
  28.170      /// the \c e edge.
  28.171 -    ConUndirEdgeIt(const Graph& g, UndirEdge e) : Parent(e), graph(g) {}
  28.172 +    ConUEdgeIt(const Graph& g, UEdge e) : Parent(e), graph(g) {}
  28.173      
  28.174      /// \brief Increment operator.
  28.175      ///
  28.176      /// It increments the iterator and gives back the next edge.
  28.177 -    ConUndirEdgeIt& operator++() {
  28.178 -      Parent::operator=(findUndirEdge(graph, graph.source(*this), 
  28.179 +    ConUEdgeIt& operator++() {
  28.180 +      Parent::operator=(findUEdge(graph, graph.source(*this), 
  28.181  				      graph.target(*this), *this));
  28.182        return *this;
  28.183      }
  28.184 @@ -596,53 +596,53 @@
  28.185    /// \brief Class to copy an undirected graph.
  28.186    ///
  28.187    /// Class to copy an undirected graph to an other graph (duplicate a graph).
  28.188 -  /// The simplest way of using it is through the \c copyUndirGraph() function.
  28.189 +  /// The simplest way of using it is through the \c copyUGraph() function.
  28.190    template <typename Target, typename Source>
  28.191 -  class UndirGraphCopy {
  28.192 +  class UGraphCopy {
  28.193    public: 
  28.194      typedef typename Source::Node Node;
  28.195      typedef typename Source::NodeIt NodeIt;
  28.196      typedef typename Source::Edge Edge;
  28.197      typedef typename Source::EdgeIt EdgeIt;
  28.198 -    typedef typename Source::UndirEdge UndirEdge;
  28.199 -    typedef typename Source::UndirEdgeIt UndirEdgeIt;
  28.200 +    typedef typename Source::UEdge UEdge;
  28.201 +    typedef typename Source::UEdgeIt UEdgeIt;
  28.202  
  28.203      typedef typename Source::
  28.204      template NodeMap<typename Target::Node> NodeRefMap;
  28.205      
  28.206      typedef typename Source::
  28.207 -    template UndirEdgeMap<typename Target::UndirEdge> UndirEdgeRefMap;
  28.208 +    template UEdgeMap<typename Target::UEdge> UEdgeRefMap;
  28.209  
  28.210    private:
  28.211  
  28.212      struct EdgeRefMap {
  28.213 -      EdgeRefMap(UndirGraphCopy& _gc) : gc(_gc) {}
  28.214 +      EdgeRefMap(UGraphCopy& _gc) : gc(_gc) {}
  28.215        typedef typename Source::Edge Key;
  28.216        typedef typename Target::Edge Value;
  28.217  
  28.218        Value operator[](const Key& key) {
  28.219 -	return gc.target.direct(gc.undirEdgeRef[key], 
  28.220 +	return gc.target.direct(gc.uEdgeRef[key], 
  28.221  				gc.target.direction(key));
  28.222        }
  28.223        
  28.224 -      UndirGraphCopy& gc;
  28.225 +      UGraphCopy& gc;
  28.226      };
  28.227      
  28.228    public:
  28.229  
  28.230 -    /// \brief Constructor for the UndirGraphCopy.
  28.231 +    /// \brief Constructor for the UGraphCopy.
  28.232      ///
  28.233      /// It copies the content of the \c _source graph into the
  28.234      /// \c _target graph. It creates also two references, one beetween
  28.235      /// the two nodeset and one beetween the two edgesets.
  28.236 -    UndirGraphCopy(Target& _target, const Source& _source) 
  28.237 +    UGraphCopy(Target& _target, const Source& _source) 
  28.238        : source(_source), target(_target), 
  28.239 -	nodeRefMap(_source), edgeRefMap(*this), undirEdgeRefMap(_source) {
  28.240 +	nodeRefMap(_source), edgeRefMap(*this), uEdgeRefMap(_source) {
  28.241        for (NodeIt it(source); it != INVALID; ++it) {
  28.242  	nodeRefMap[it] = target.addNode();
  28.243        }
  28.244 -      for (UndirEdgeIt it(source); it != INVALID; ++it) {
  28.245 -	undirEdgeRefMap[it] = target.addEdge(nodeRefMap[source.source(it)], 
  28.246 +      for (UEdgeIt it(source); it != INVALID; ++it) {
  28.247 +	uEdgeRefMap[it] = target.addEdge(nodeRefMap[source.source(it)], 
  28.248  					nodeRefMap[source.target(it)]);
  28.249        }
  28.250      }
  28.251 @@ -651,7 +651,7 @@
  28.252      ///
  28.253      /// Copies the node references into the given map.
  28.254      template <typename NodeRef>
  28.255 -    const UndirGraphCopy& nodeRef(NodeRef& map) const {
  28.256 +    const UGraphCopy& nodeRef(NodeRef& map) const {
  28.257        for (NodeIt it(source); it != INVALID; ++it) {
  28.258  	map.set(it, nodeRefMap[it]);
  28.259        }
  28.260 @@ -662,7 +662,7 @@
  28.261      ///
  28.262      /// Reverse and copies the node references into the given map.
  28.263      template <typename NodeRef>
  28.264 -    const UndirGraphCopy& nodeCrossRef(NodeRef& map) const {
  28.265 +    const UGraphCopy& nodeCrossRef(NodeRef& map) const {
  28.266        for (NodeIt it(source); it != INVALID; ++it) {
  28.267  	map.set(nodeRefMap[it], it);
  28.268        }
  28.269 @@ -673,7 +673,7 @@
  28.270      ///
  28.271      /// Copies the edge references into the given map.
  28.272      template <typename EdgeRef>
  28.273 -    const UndirGraphCopy& edgeRef(EdgeRef& map) const {
  28.274 +    const UGraphCopy& edgeRef(EdgeRef& map) const {
  28.275        for (EdgeIt it(source); it != INVALID; ++it) {
  28.276  	map.set(edgeRefMap[it], it);
  28.277        }
  28.278 @@ -685,7 +685,7 @@
  28.279      ///
  28.280      /// Reverse and copies the undirected edge references into the given map.
  28.281      template <typename EdgeRef>
  28.282 -    const UndirGraphCopy& edgeCrossRef(EdgeRef& map) const {
  28.283 +    const UGraphCopy& edgeCrossRef(EdgeRef& map) const {
  28.284        for (EdgeIt it(source); it != INVALID; ++it) {
  28.285  	map.set(it, edgeRefMap[it]);
  28.286        }
  28.287 @@ -696,9 +696,9 @@
  28.288      ///
  28.289      /// Copies the undirected edge references into the given map.
  28.290      template <typename EdgeRef>
  28.291 -    const UndirGraphCopy& undirEdgeRef(EdgeRef& map) const {
  28.292 -      for (UndirEdgeIt it(source); it != INVALID; ++it) {
  28.293 -	map.set(it, undirEdgeRefMap[it]);
  28.294 +    const UGraphCopy& uEdgeRef(EdgeRef& map) const {
  28.295 +      for (UEdgeIt it(source); it != INVALID; ++it) {
  28.296 +	map.set(it, uEdgeRefMap[it]);
  28.297        }
  28.298        return *this;
  28.299      }
  28.300 @@ -708,9 +708,9 @@
  28.301      ///
  28.302      /// Reverse and copies the undirected edge references into the given map.
  28.303      template <typename EdgeRef>
  28.304 -    const UndirGraphCopy& undirEdgeCrossRef(EdgeRef& map) const {
  28.305 -      for (UndirEdgeIt it(source); it != INVALID; ++it) {
  28.306 -	map.set(undirEdgeRefMap[it], it);
  28.307 +    const UGraphCopy& uEdgeCrossRef(EdgeRef& map) const {
  28.308 +      for (UEdgeIt it(source); it != INVALID; ++it) {
  28.309 +	map.set(uEdgeRefMap[it], it);
  28.310        }
  28.311        return *this;
  28.312      }
  28.313 @@ -722,7 +722,7 @@
  28.314      /// and the copied map's key type is the source graph's node
  28.315      /// type.  
  28.316      template <typename TargetMap, typename SourceMap>
  28.317 -    const UndirGraphCopy& nodeMap(TargetMap& tMap, 
  28.318 +    const UGraphCopy& nodeMap(TargetMap& tMap, 
  28.319  				  const SourceMap& sMap) const {
  28.320        copyMap(tMap, sMap, NodeIt(source), nodeRefMap);
  28.321        return *this;
  28.322 @@ -735,7 +735,7 @@
  28.323      /// and the copied map's key type is the source graph's edge
  28.324      /// type.  
  28.325      template <typename TargetMap, typename SourceMap>
  28.326 -    const UndirGraphCopy& edgeMap(TargetMap& tMap, 
  28.327 +    const UGraphCopy& edgeMap(TargetMap& tMap, 
  28.328  				  const SourceMap& sMap) const {
  28.329        copyMap(tMap, sMap, EdgeIt(source), edgeRefMap);
  28.330        return *this;
  28.331 @@ -748,9 +748,9 @@
  28.332      /// and the copied map's key type is the source graph's edge
  28.333      /// type.  
  28.334      template <typename TargetMap, typename SourceMap>
  28.335 -    const UndirGraphCopy& undirEdgeMap(TargetMap& tMap, 
  28.336 +    const UGraphCopy& uEdgeMap(TargetMap& tMap, 
  28.337  				  const SourceMap& sMap) const {
  28.338 -      copyMap(tMap, sMap, UndirEdgeIt(source), undirEdgeRefMap);
  28.339 +      copyMap(tMap, sMap, UEdgeIt(source), uEdgeRefMap);
  28.340        return *this;
  28.341      }
  28.342  
  28.343 @@ -768,11 +768,11 @@
  28.344        return edgeRefMap;
  28.345      }
  28.346  
  28.347 -    /// \brief Gives back the stored undir edge references.
  28.348 +    /// \brief Gives back the stored uedge references.
  28.349      ///
  28.350 -    /// Gives back the stored undir edge references.
  28.351 -    const UndirEdgeRefMap& undirEdgeRef() const {
  28.352 -      return undirEdgeRefMap;
  28.353 +    /// Gives back the stored uedge references.
  28.354 +    const UEdgeRefMap& uEdgeRef() const {
  28.355 +      return uEdgeRefMap;
  28.356      }
  28.357  
  28.358      void run() {}
  28.359 @@ -784,7 +784,7 @@
  28.360  
  28.361      NodeRefMap nodeRefMap;
  28.362      EdgeRefMap edgeRefMap;
  28.363 -    UndirEdgeRefMap undirEdgeRefMap;
  28.364 +    UEdgeRefMap uEdgeRefMap;
  28.365    };
  28.366  
  28.367    /// \brief Copy a graph to an other graph.
  28.368 @@ -801,9 +801,9 @@
  28.369    /// contain the mapping from the target graph's edges to the source's
  28.370    /// edges.
  28.371    template <typename Target, typename Source>
  28.372 -  UndirGraphCopy<Target, Source> 
  28.373 -  copyUndirGraph(Target& target, const Source& source) {
  28.374 -    return UndirGraphCopy<Target, Source>(target, source);
  28.375 +  UGraphCopy<Target, Source> 
  28.376 +  copyUGraph(Target& target, const Source& source) {
  28.377 +    return UGraphCopy<Target, Source>(target, source);
  28.378    }
  28.379  
  28.380  
  28.381 @@ -905,7 +905,7 @@
  28.382      typedef _Map Map;
  28.383      typedef _Graph Graph;
  28.384  
  28.385 -    /// The key type of InvertableMap (Node, Edge, UndirEdge).
  28.386 +    /// The key type of InvertableMap (Node, Edge, UEdge).
  28.387      typedef typename _Map::Key Key;
  28.388      /// The value type of the InvertableMap.
  28.389      typedef typename _Map::Value Value;
  28.390 @@ -1036,7 +1036,7 @@
  28.391    ///
  28.392    /// \param _Graph The graph class the \c DescriptorMap belongs to.
  28.393    /// \param _Item The Item is the Key of the Map. It may be Node, Edge or 
  28.394 -  /// UndirEdge.
  28.395 +  /// UEdge.
  28.396  #ifndef DOXYGEN
  28.397    /// \param _Map A ReadWriteMap mapping from the item type to integer.
  28.398    template <
  28.399 @@ -1055,7 +1055,7 @@
  28.400      /// The graph class of DescriptorMap.
  28.401      typedef _Graph Graph;
  28.402  
  28.403 -    /// The key type of DescriptorMap (Node, Edge, UndirEdge).
  28.404 +    /// The key type of DescriptorMap (Node, Edge, UEdge).
  28.405      typedef typename _Map::Key Key;
  28.406      /// The value type of DescriptorMap.
  28.407      typedef typename _Map::Value Value;
  28.408 @@ -1296,7 +1296,7 @@
  28.409    public:
  28.410  
  28.411      typedef typename Graph::Edge Value;
  28.412 -    typedef typename Graph::UndirEdge Key;
  28.413 +    typedef typename Graph::UEdge Key;
  28.414  
  28.415      /// \brief Constructor
  28.416      ///
  28.417 @@ -1335,7 +1335,7 @@
  28.418    public:
  28.419  
  28.420      typedef typename Graph::Edge Value;
  28.421 -    typedef typename Graph::UndirEdge Key;
  28.422 +    typedef typename Graph::UEdge Key;
  28.423  
  28.424      /// \brief Constructor
  28.425      ///
    29.1 --- a/lemon/graph_writer.h	Thu Jan 26 06:44:22 2006 +0000
    29.2 +++ b/lemon/graph_writer.h	Thu Jan 26 15:42:13 2006 +0000
    29.3 @@ -315,39 +315,39 @@
    29.4  
    29.5    /// \brief The undirected graph writer class.
    29.6    ///
    29.7 -  /// The \c UndirGraphWriter class provides the undir graph output. To write 
    29.8 +  /// The \c UGraphWriter class provides the ugraph output. To write 
    29.9    /// a graph you should first give writing commands to the writer. You can 
   29.10 -  /// declare write command as \c NodeMap, \c EdgeMap or \c UndirEdgeMap 
   29.11 -  /// writing and labeled Node, Edge or UndirEdge writing.
   29.12 +  /// declare write command as \c NodeMap, \c EdgeMap or \c UEdgeMap 
   29.13 +  /// writing and labeled Node, Edge or UEdge writing.
   29.14    ///
   29.15    /// \code
   29.16 -  /// UndirGraphWriter<UndirListGraph> writer(std::cout, graph);
   29.17 +  /// UGraphWriter<ListUGraph> writer(std::cout, graph);
   29.18    /// \endcode
   29.19    ///
   29.20    /// The \c writeNodeMap() function declares a \c NodeMap writing 
   29.21 -  /// command in the \c UndirGraphWriter. You should give as parameter 
   29.22 +  /// command in the \c UGraphWriter. You should give as parameter 
   29.23    /// the name of the map and the map object. The NodeMap writing 
   29.24    /// command with name "label" should write a unique map because it 
   29.25    /// is regarded as label map.
   29.26    ///
   29.27    /// \code
   29.28 -  /// IdMap<UndirListGraph, Node> nodeLabelMap;
   29.29 +  /// IdMap<ListUGraph, Node> nodeLabelMap;
   29.30    /// writer.writeNodeMap("label", nodeLabelMap);
   29.31    ///
   29.32    /// writer.writeNodeMap("coords", coords);
   29.33    /// writer.writeNodeMap("color", colorMap);
   29.34    /// \endcode
   29.35    ///
   29.36 -  /// With the \c writeUndirEdgeMap() member function you can give an 
   29.37 +  /// With the \c writeUEdgeMap() member function you can give an 
   29.38    /// undirected edge map writing command similar to the NodeMaps.
   29.39    ///
   29.40    /// \code
   29.41    /// DescriptorMap<ListGraph, Edge, ListGraph::EdgeMap<int> > 
   29.42    ///   edgeDescMap(graph);
   29.43 -  /// writer.writeUndirEdgeMap("descriptor", edgeDescMap);
   29.44 +  /// writer.writeUEdgeMap("descriptor", edgeDescMap);
   29.45    ///
   29.46 -  /// writer.writeUndirEdgeMap("weight", weightMap);
   29.47 -  /// writer.writeUndirEdgeMap("label", labelMap);
   29.48 +  /// writer.writeUEdgeMap("weight", weightMap);
   29.49 +  /// writer.writeUEdgeMap("label", labelMap);
   29.50    /// \endcode
   29.51    /// 
   29.52    /// The EdgeMap handling is just a syntactical sugar. It writes
   29.53 @@ -358,7 +358,7 @@
   29.54    /// \endcode
   29.55    ///
   29.56    ///
   29.57 -  /// With \c writeNode() and \c writeUndirEdge() functions you can 
   29.58 +  /// With \c writeNode() and \c writeUEdge() functions you can 
   29.59    /// designate nodes and undirected edges in the graph. For example, you can 
   29.60    /// write out the source and target of the graph.
   29.61    ///
   29.62 @@ -366,7 +366,7 @@
   29.63    /// writer.writeNode("source", sourceNode);
   29.64    /// writer.writeNode("target", targetNode);
   29.65    ///
   29.66 -  /// writer.writeUndirEdge("observed", undirEdge);
   29.67 +  /// writer.writeUEdge("observed", uEdge);
   29.68    /// \endcode
   29.69    ///
   29.70    /// After you give all write commands you must call the \c run() member
   29.71 @@ -384,56 +384,56 @@
   29.72    /// \see \ref graph-io-page
   29.73    /// \author Balazs Dezso
   29.74    template <typename _Graph, typename _WriterTraits = DefaultWriterTraits> 
   29.75 -  class UndirGraphWriter {
   29.76 +  class UGraphWriter {
   29.77    public:
   29.78      
   29.79      typedef _Graph Graph;
   29.80      typedef typename Graph::Node Node;
   29.81      typedef typename Graph::Edge Edge;
   29.82 -    typedef typename Graph::UndirEdge UndirEdge;
   29.83 +    typedef typename Graph::UEdge UEdge;
   29.84  
   29.85      typedef _WriterTraits WriterTraits;
   29.86  
   29.87 -    /// \brief Construct a new UndirGraphWriter.
   29.88 +    /// \brief Construct a new UGraphWriter.
   29.89      ///
   29.90 -    /// Construct a new UndirGraphWriter. It writes the given graph
   29.91 +    /// Construct a new UGraphWriter. It writes the given graph
   29.92      /// to the given stream.
   29.93 -    UndirGraphWriter(std::ostream& _os, const Graph& _graph) 
   29.94 +    UGraphWriter(std::ostream& _os, const Graph& _graph) 
   29.95        : writer(new LemonWriter(_os)), own_writer(true), 
   29.96  	nodeset_writer(*writer, _graph, std::string()),
   29.97 -	undir_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
   29.98 +	u_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
   29.99  	node_writer(*writer, nodeset_writer, std::string()),
  29.100 -	undir_edge_writer(*writer, undir_edgeset_writer, std::string()),
  29.101 +	u_edge_writer(*writer, u_edgeset_writer, std::string()),
  29.102  	attribute_writer(*writer, std::string()) {}
  29.103  
  29.104 -    /// \brief Construct a new UndirGraphWriter.
  29.105 +    /// \brief Construct a new UGraphWriter.
  29.106      ///
  29.107 -    /// Construct a new UndirGraphWriter. It writes the given graph
  29.108 +    /// Construct a new UGraphWriter. It writes the given graph
  29.109      /// to the given file.
  29.110 -    UndirGraphWriter(const std::string& _filename, const Graph& _graph) 
  29.111 +    UGraphWriter(const std::string& _filename, const Graph& _graph) 
  29.112        : writer(new LemonWriter(_filename)), own_writer(true), 
  29.113  	nodeset_writer(*writer, _graph, std::string()),
  29.114 -	undir_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
  29.115 +	u_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
  29.116  	node_writer(*writer, nodeset_writer, std::string()),
  29.117 -	undir_edge_writer(*writer, undir_edgeset_writer, std::string()),
  29.118 +	u_edge_writer(*writer, u_edgeset_writer, std::string()),
  29.119  	attribute_writer(*writer, std::string()) {}
  29.120  
  29.121 -    /// \brief Construct a new UndirGraphWriter.
  29.122 +    /// \brief Construct a new UGraphWriter.
  29.123      ///
  29.124 -    /// Construct a new UndirGraphWriter. It writes the given graph
  29.125 +    /// Construct a new UGraphWriter. It writes the given graph
  29.126      /// to given LemonReader.
  29.127 -    UndirGraphWriter(LemonWriter& _writer, const Graph& _graph)
  29.128 +    UGraphWriter(LemonWriter& _writer, const Graph& _graph)
  29.129        : writer(_writer), own_writer(false), 
  29.130  	nodeset_writer(*writer, _graph, std::string()),
  29.131 -	undir_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
  29.132 +	u_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
  29.133  	node_writer(*writer, nodeset_writer, std::string()),
  29.134 -	undir_edge_writer(*writer, undir_edgeset_writer, std::string()),
  29.135 +	u_edge_writer(*writer, u_edgeset_writer, std::string()),
  29.136  	attribute_writer(*writer, std::string()) {}
  29.137  
  29.138      /// \brief Destruct the graph writer.
  29.139      ///
  29.140      /// Destruct the graph writer.
  29.141 -    ~UndirGraphWriter() {
  29.142 +    ~UGraphWriter() {
  29.143        if (own_writer) 
  29.144  	delete writer;
  29.145      }
  29.146 @@ -442,7 +442,7 @@
  29.147      ///
  29.148     /// This function issues a new <i> node map writing command</i> to the writer.
  29.149      template <typename Map>
  29.150 -    UndirGraphWriter& writeNodeMap(std::string name, const Map& map) {
  29.151 +    UGraphWriter& writeNodeMap(std::string name, const Map& map) {
  29.152        nodeset_writer.writeNodeMap(name, map);
  29.153        return *this;
  29.154      }
  29.155 @@ -451,7 +451,7 @@
  29.156      ///
  29.157     /// This function issues a new <i> node map writing command</i> to the writer.
  29.158      template <typename Writer, typename Map>
  29.159 -    UndirGraphWriter& writeNodeMap(std::string name, const Map& map, 
  29.160 +    UGraphWriter& writeNodeMap(std::string name, const Map& map, 
  29.161  			      const Writer& writer = Writer()) {
  29.162        nodeset_writer.writeNodeMap(name, map, writer);
  29.163        return *this;
  29.164 @@ -461,8 +461,8 @@
  29.165      ///
  29.166     /// This function issues a new <i> edge map writing command</i> to the writer.
  29.167      template <typename Map>
  29.168 -    UndirGraphWriter& writeEdgeMap(std::string name, const Map& map) { 
  29.169 -      undir_edgeset_writer.writeEdgeMap(name, map);
  29.170 +    UGraphWriter& writeEdgeMap(std::string name, const Map& map) { 
  29.171 +      u_edgeset_writer.writeEdgeMap(name, map);
  29.172        return *this;
  29.173      }
  29.174  
  29.175 @@ -470,9 +470,9 @@
  29.176      ///
  29.177     /// This function issues a new <i> edge map writing command</i> to the writer.
  29.178      template <typename Writer, typename Map>
  29.179 -    UndirGraphWriter& writeEdgeMap(std::string name, const Map& map,
  29.180 +    UGraphWriter& writeEdgeMap(std::string name, const Map& map,
  29.181  				   const Writer& writer = Writer()) {
  29.182 -      undir_edgeset_writer.writeEdgeMap(name, map, writer);
  29.183 +      u_edgeset_writer.writeEdgeMap(name, map, writer);
  29.184        return *this;
  29.185      }
  29.186  
  29.187 @@ -481,8 +481,8 @@
  29.188      /// This function issues a new <i> undirected edge map writing
  29.189      /// command</i> to the writer.
  29.190      template <typename Map>
  29.191 -    UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map) { 
  29.192 -      undir_edgeset_writer.writeUndirEdgeMap(name, map);
  29.193 +    UGraphWriter& writeUEdgeMap(std::string name, const Map& map) { 
  29.194 +      u_edgeset_writer.writeUEdgeMap(name, map);
  29.195        return *this;
  29.196      }
  29.197  
  29.198 @@ -491,9 +491,9 @@
  29.199      /// This function issues a new <i> undirected edge map writing
  29.200      /// command</i> to the writer.
  29.201     template <typename Writer, typename Map>
  29.202 -    UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map,
  29.203 +    UGraphWriter& writeUEdgeMap(std::string name, const Map& map,
  29.204  					const Writer& writer = Writer()) {
  29.205 -      undir_edgeset_writer.writeUndirEdgeMap(name, map, writer);
  29.206 +      u_edgeset_writer.writeUEdgeMap(name, map, writer);
  29.207        return *this;
  29.208      }
  29.209  
  29.210 @@ -501,7 +501,7 @@
  29.211      ///
  29.212      /// This function issues a new <i> labeled node writing
  29.213      /// command</i> to the writer.
  29.214 -    UndirGraphWriter& writeNode(std::string name, const Node& node) {
  29.215 +    UGraphWriter& writeNode(std::string name, const Node& node) {
  29.216        node_writer.writeNode(name, node);
  29.217        return *this;
  29.218      }
  29.219 @@ -510,8 +510,8 @@
  29.220      ///
  29.221      /// This function issues a new <i> labeled edge writing
  29.222      /// command</i> to the writer.
  29.223 -    UndirGraphWriter& writeEdge(std::string name, const Edge& edge) {
  29.224 -      undir_edge_writer.writeEdge(name, edge);
  29.225 +    UGraphWriter& writeEdge(std::string name, const Edge& edge) {
  29.226 +      u_edge_writer.writeEdge(name, edge);
  29.227      }
  29.228  
  29.229      /// \brief Issue a new labeled undirected edge writing command to
  29.230 @@ -519,8 +519,8 @@
  29.231      ///
  29.232      /// Issue a new <i>labeled undirected edge writing command</i> to
  29.233      /// the writer.
  29.234 -    UndirGraphWriter& writeUndirEdge(std::string name, const UndirEdge& edge) {
  29.235 -      undir_edge_writer.writeUndirEdge(name, edge);
  29.236 +    UGraphWriter& writeUEdge(std::string name, const UEdge& edge) {
  29.237 +      u_edge_writer.writeUEdge(name, edge);
  29.238      }
  29.239  
  29.240      /// \brief Issue a new attribute writing command.
  29.241 @@ -528,7 +528,7 @@
  29.242      /// This function issues a new <i> attribute writing
  29.243      /// command</i> to the writer.
  29.244      template <typename Value>
  29.245 -    UndirGraphWriter& writeAttribute(std::string name, const Value& value) {
  29.246 +    UGraphWriter& writeAttribute(std::string name, const Value& value) {
  29.247        attribute_writer.writeAttribute(name, value);
  29.248        return *this;
  29.249      }
  29.250 @@ -538,7 +538,7 @@
  29.251      /// This function issues a new <i> attribute writing
  29.252      /// command</i> to the writer.
  29.253      template <typename Writer, typename Value>
  29.254 -    UndirGraphWriter& writeAttribute(std::string name, const Value& value, 
  29.255 +    UGraphWriter& writeAttribute(std::string name, const Value& value, 
  29.256  			       const Writer& writer) {
  29.257        attribute_writer.writeAttribute<Writer>(name, value, writer);
  29.258        return *this;
  29.259 @@ -574,7 +574,7 @@
  29.260      /// It writes the label of the given edge. If there was written an "label"
  29.261      /// named edge map then it will write the map value belonging to the edge.
  29.262      void writeLabel(std::ostream& os, const Edge& item) const {
  29.263 -      undir_edgeset_writer.writeLabel(os, item);
  29.264 +      u_edgeset_writer.writeLabel(os, item);
  29.265      } 
  29.266  
  29.267      /// \brief Write the label of the given undirected edge.
  29.268 @@ -582,8 +582,8 @@
  29.269      /// It writes the label of the given undirected edge. If there was written 
  29.270      /// an "label" named edge map then it will write the map value belonging to 
  29.271      /// the edge.
  29.272 -    void writeLabel(std::ostream& os, const UndirEdge& item) const {
  29.273 -      undir_edgeset_writer.writeLabel(os, item);
  29.274 +    void writeLabel(std::ostream& os, const UEdge& item) const {
  29.275 +      u_edgeset_writer.writeLabel(os, item);
  29.276      } 
  29.277  
  29.278  
  29.279 @@ -593,10 +593,10 @@
  29.280      bool own_writer;
  29.281  
  29.282      NodeSetWriter<Graph, WriterTraits> nodeset_writer;
  29.283 -    UndirEdgeSetWriter<Graph, WriterTraits> undir_edgeset_writer;
  29.284 +    UEdgeSetWriter<Graph, WriterTraits> u_edgeset_writer;
  29.285  
  29.286      NodeWriter<Graph> node_writer;
  29.287 -    UndirEdgeWriter<Graph> undir_edge_writer;
  29.288 +    UEdgeWriter<Graph> u_edge_writer;
  29.289      
  29.290      AttributeWriter<WriterTraits> attribute_writer;
  29.291    };
  29.292 @@ -604,21 +604,21 @@
  29.293    /// \brief Write an undirected graph to the output.
  29.294    ///
  29.295    /// It is a helper function to write an undirected graph to the given output
  29.296 -  /// stream. It gives back an UndirGraphWriter object and this object
  29.297 +  /// stream. It gives back an UGraphWriter object and this object
  29.298    /// can write more maps, labeled nodes and edges and attributes.
  29.299    /// \warning Do not forget to call the \c run() function.
  29.300    ///
  29.301    /// \param os The output stream.
  29.302    /// \param g The graph.
  29.303    template <typename Graph>
  29.304 -  UndirGraphWriter<Graph> undirGraphWriter(std::ostream& os, const Graph &g) {
  29.305 -    return UndirGraphWriter<Graph>(os, g);
  29.306 +  UGraphWriter<Graph> uGraphWriter(std::ostream& os, const Graph &g) {
  29.307 +    return UGraphWriter<Graph>(os, g);
  29.308    }
  29.309  
  29.310    /// \brief Write an undirected graph to the output.
  29.311    ///
  29.312    /// It is a helper function to write an undirected graph to the given output
  29.313 -  /// file. It gives back an UndirGraphWriter object and this object
  29.314 +  /// file. It gives back an UGraphWriter object and this object
  29.315    /// can write more maps, labeled nodes, edges, undirected edges and 
  29.316    /// attributes.
  29.317    ///
  29.318 @@ -627,9 +627,9 @@
  29.319    /// \param fn The output file.
  29.320    /// \param g The graph.
  29.321    template <typename Graph>
  29.322 -  UndirGraphWriter<Graph> undirGraphWriter(const std::string& fn, 
  29.323 +  UGraphWriter<Graph> uGraphWriter(const std::string& fn, 
  29.324  					   const Graph &g) {
  29.325 -    return UndirGraphWriter<Graph>(fn, g);
  29.326 +    return UGraphWriter<Graph>(fn, g);
  29.327    }
  29.328  
  29.329    /// @}
    30.1 --- a/lemon/grid_graph.h	Thu Jan 26 06:44:22 2006 +0000
    30.2 +++ b/lemon/grid_graph.h	Thu Jan 26 15:42:13 2006 +0000
    30.3 @@ -338,10 +338,10 @@
    30.4    };
    30.5  
    30.6  
    30.7 -  typedef StaticMappableUndirGraphExtender<
    30.8 -    IterableUndirGraphExtender<
    30.9 -    AlterableUndirGraphExtender<
   30.10 -    UndirGraphExtender<GridGraphBase> > > > ExtendedGridGraphBase;
   30.11 +  typedef StaticMappableUGraphExtender<
   30.12 +    IterableUGraphExtender<
   30.13 +    AlterableUGraphExtender<
   30.14 +    UGraphExtender<GridGraphBase> > > > ExtendedGridGraphBase;
   30.15  
   30.16    /// \ingroup graphs
   30.17    ///
   30.18 @@ -364,7 +364,7 @@
   30.19    /// }
   30.20    /// \endcode
   30.21    ///
   30.22 -  /// The graph type is fully conform to the \ref concept::UndirGraph
   30.23 +  /// The graph type is fully conform to the \ref concept::UGraph
   30.24    /// "Undirected Graph" concept.
   30.25    ///
   30.26    /// \author Balazs Dezso
   30.27 @@ -463,7 +463,7 @@
   30.28      /// Gives back the edge goes down from the node. If there is not
   30.29      /// outgoing edge then it gives back INVALID.
   30.30      Edge down(Node n) const {
   30.31 -      UndirEdge ue = _down(n);
   30.32 +      UEdge ue = _down(n);
   30.33        return ue != INVALID ? direct(ue, true) : INVALID;
   30.34      }
   30.35      
   30.36 @@ -472,7 +472,7 @@
   30.37      /// Gives back the edge goes up from the node. If there is not
   30.38      /// outgoing edge then it gives back INVALID.
   30.39      Edge up(Node n) const {
   30.40 -      UndirEdge ue = _up(n);
   30.41 +      UEdge ue = _up(n);
   30.42        return ue != INVALID ? direct(ue, false) : INVALID;
   30.43      }
   30.44  
   30.45 @@ -481,7 +481,7 @@
   30.46      /// Gives back the edge goes right from the node. If there is not
   30.47      /// outgoing edge then it gives back INVALID.
   30.48      Edge right(Node n) const {
   30.49 -      UndirEdge ue = _right(n);
   30.50 +      UEdge ue = _right(n);
   30.51        return ue != INVALID ? direct(ue, true) : INVALID;
   30.52      }
   30.53  
   30.54 @@ -490,7 +490,7 @@
   30.55      /// Gives back the edge goes left from the node. If there is not
   30.56      /// outgoing edge then it gives back INVALID.
   30.57      Edge left(Node n) const {
   30.58 -      UndirEdge ue = _left(n);
   30.59 +      UEdge ue = _left(n);
   30.60        return ue != INVALID ? direct(ue, false) : INVALID;
   30.61      }
   30.62      
    31.1 --- a/lemon/hypercube_graph.h	Thu Jan 26 06:44:22 2006 +0000
    31.2 +++ b/lemon/hypercube_graph.h	Thu Jan 26 15:42:13 2006 +0000
    31.3 @@ -254,7 +254,7 @@
    31.4    /// is 26. 
    31.5    ///
    31.6    /// The graph type is fully conform to the \ref concept::StaticGraph
    31.7 -  /// concept but it does not conform to the \ref concept::UndirGraph.
    31.8 +  /// concept but it does not conform to the \ref concept::UGraph.
    31.9    ///
   31.10    /// \see HyperCubeGraphBase
   31.11    /// \author Balazs Dezso
    32.1 --- a/lemon/kruskal.h	Thu Jan 26 06:44:22 2006 +0000
    32.2 +++ b/lemon/kruskal.h	Thu Jan 26 15:42:13 2006 +0000
    32.3 @@ -51,7 +51,7 @@
    32.4    ///
    32.5    /// \param g The graph the algorithm runs on.
    32.6    /// It can be either \ref concept::StaticGraph "directed" or 
    32.7 -  /// \ref concept::UndirGraph "undirected".
    32.8 +  /// \ref concept::UGraph "undirected".
    32.9    /// If the graph is directed, the algorithm consider it to be 
   32.10    /// undirected by disregarding the direction of the edges.
   32.11    ///
   32.12 @@ -89,15 +89,15 @@
   32.13    /// \return The cost of the found tree.
   32.14    ///
   32.15    /// \warning If kruskal is run on an
   32.16 -  /// \ref lemon::concept::UndirGraph "undirected graph", be sure that the
   32.17 +  /// \ref lemon::concept::UGraph "undirected graph", be sure that the
   32.18    /// map storing the tree is also undirected
   32.19 -  /// (e.g. UndirListGraph::UndirEdgeMap<bool>, otherwise the values of the
   32.20 +  /// (e.g. ListUGraph::UEdgeMap<bool>, otherwise the values of the
   32.21    /// half of the edges will not be set.
   32.22    ///
   32.23    /// \todo Discuss the case of undirected graphs: In this case the algorithm
   32.24 -  /// also require <tt>Edge</tt>s instead of <tt>UndirEdge</tt>s, as some
   32.25 +  /// also require <tt>Edge</tt>s instead of <tt>UEdge</tt>s, as some
   32.26    /// people would expect. So, one should be careful not to add both of the
   32.27 -  /// <tt>Edge</tt>s belonging to a certain <tt>UndirEdge</tt>.
   32.28 +  /// <tt>Edge</tt>s belonging to a certain <tt>UEdge</tt>.
   32.29    /// (\ref kruskal() and \ref KruskalMapInput are kind enough to do so.)
   32.30  
   32.31  #ifdef DOXYGEN
   32.32 @@ -225,15 +225,15 @@
   32.33      };
   32.34  
   32.35      template<class _GR>
   32.36 -    typename enable_if<typename _GR::UndirTag,void>::type
   32.37 +    typename enable_if<typename _GR::UTag,void>::type
   32.38      fillWithEdges(const _GR& g, const Map& m,dummy<0> = 0) 
   32.39      {
   32.40 -      for(typename GR::UndirEdgeIt e(g);e!=INVALID;++e) 
   32.41 +      for(typename GR::UEdgeIt e(g);e!=INVALID;++e) 
   32.42  	push_back(value_type(g.direct(e, true), m[e]));
   32.43      }
   32.44  
   32.45      template<class _GR>
   32.46 -    typename disable_if<typename _GR::UndirTag,void>::type
   32.47 +    typename disable_if<typename _GR::UTag,void>::type
   32.48      fillWithEdges(const _GR& g, const Map& m,dummy<1> = 1) 
   32.49      {
   32.50        for(typename GR::EdgeIt e(g);e!=INVALID;++e) 
    33.1 --- a/lemon/lemon_reader.h	Thu Jan 26 06:44:22 2006 +0000
    33.2 +++ b/lemon/lemon_reader.h	Thu Jan 26 15:42:13 2006 +0000
    33.3 @@ -104,7 +104,7 @@
    33.4      template <typename Graph, typename Map>
    33.5      class ForwardComposeMap {
    33.6      public:
    33.7 -      typedef typename Graph::UndirEdge Key;
    33.8 +      typedef typename Graph::UEdge Key;
    33.9        typedef typename Map::Value Value;
   33.10  
   33.11        ForwardComposeMap(const Graph& _graph, typename Arg<Map>::Type _map) 
   33.12 @@ -134,7 +134,7 @@
   33.13      template <typename Graph, typename Map>
   33.14      class BackwardComposeMap {
   33.15      public:
   33.16 -      typedef typename Graph::UndirEdge Key;
   33.17 +      typedef typename Graph::UEdge Key;
   33.18        typedef typename Map::Value Value;
   33.19  
   33.20        BackwardComposeMap(const Graph& _graph, typename Arg<Map>::Type _map) 
   33.21 @@ -1167,8 +1167,8 @@
   33.22    /// \brief SectionReader for reading a undirected graph's edgeset.
   33.23    ///
   33.24    /// The lemon format can store multiple undirected edgesets with several 
   33.25 -  /// maps. The undirected edgeset section's header line is \c \@undiredgeset 
   33.26 -  /// \c undiredgeset_name, but the \c undiredgeset_name may be empty.
   33.27 +  /// maps. The undirected edgeset section's header line is \c \@uedgeset 
   33.28 +  /// \c uedgeset_name, but the \c uedgeset_name may be empty.
   33.29    ///
   33.30    /// The first line of the section contains the names of the maps separated
   33.31    /// with white spaces. Each next lines describes an edge in the edgeset. The
   33.32 @@ -1183,7 +1183,7 @@
   33.33    /// If the edgeset contains an \c "label" named map then it will be regarded
   33.34    /// as id map. This map should contain only unique values and when the 
   33.35    /// \c readLabel() member will read a value from the given stream it will
   33.36 -  /// give back that undiricted edge which is mapped to this value.
   33.37 +  /// give back that uicted edge which is mapped to this value.
   33.38    ///
   33.39    /// The undirected edgeset reader needs a node id reader to identify which 
   33.40    /// nodes have to be connected. If a NodeSetReader reads an "label" named map,
   33.41 @@ -1191,7 +1191,7 @@
   33.42    ///
   33.43    /// \relates LemonReader
   33.44    template <typename _Graph, typename _Traits = DefaultReaderTraits>
   33.45 -  class UndirEdgeSetReader : public LemonReader::SectionReader {
   33.46 +  class UEdgeSetReader : public LemonReader::SectionReader {
   33.47      typedef LemonReader::SectionReader Parent;
   33.48    public:
   33.49  
   33.50 @@ -1199,19 +1199,19 @@
   33.51      typedef _Traits Traits;
   33.52      typedef typename Graph::Node Node;
   33.53      typedef typename Graph::Edge Edge;
   33.54 -    typedef typename Graph::UndirEdge UndirEdge;
   33.55 +    typedef typename Graph::UEdge UEdge;
   33.56      typedef typename Traits::Skipper DefaultSkipper;
   33.57  
   33.58      /// \brief Constructor.
   33.59      ///
   33.60 -    /// Constructor for UndirEdgeSetReader. It creates the UndirEdgeSetReader 
   33.61 +    /// Constructor for UEdgeSetReader. It creates the UEdgeSetReader 
   33.62      /// and attach it into the given LemonReader. The undirected edgeset 
   33.63      /// reader will add the readed undirected edges to the given Graph. It 
   33.64      /// will use the given node id reader to read the source and target 
   33.65      /// nodes of the edges. The reader will read the section only if the 
   33.66 -    /// \c _name and the \c undiredgset_name are the same. 
   33.67 +    /// \c _name and the \c uedgset_name are the same. 
   33.68      template <typename NodeLabelReader>
   33.69 -    UndirEdgeSetReader(LemonReader& _reader, 
   33.70 +    UEdgeSetReader(LemonReader& _reader, 
   33.71  		       Graph& _graph, 
   33.72  		       const NodeLabelReader& _nodeLabelReader, 
   33.73  		       const std::string& _name = std::string(),
   33.74 @@ -1223,8 +1223,8 @@
   33.75      }
   33.76      /// \brief Destructor.
   33.77      ///
   33.78 -    /// Destructor for UndirEdgeSetReader.
   33.79 -    virtual ~UndirEdgeSetReader() {
   33.80 +    /// Destructor for UEdgeSetReader.
   33.81 +    virtual ~UEdgeSetReader() {
   33.82        for (typename MapReaders::iterator it = readers.begin(); 
   33.83  	   it != readers.end(); ++it) {
   33.84  	delete it->second;
   33.85 @@ -1232,8 +1232,8 @@
   33.86      }
   33.87  
   33.88    private:
   33.89 -    UndirEdgeSetReader(const UndirEdgeSetReader&);
   33.90 -    void operator=(const UndirEdgeSetReader&);
   33.91 +    UEdgeSetReader(const UEdgeSetReader&);
   33.92 +    void operator=(const UEdgeSetReader&);
   33.93  
   33.94    public:
   33.95  
   33.96 @@ -1241,14 +1241,14 @@
   33.97      ///
   33.98      /// Add a new edge undirected map reader command for the reader.
   33.99      template <typename Map>
  33.100 -    UndirEdgeSetReader& readUndirEdgeMap(std::string name, Map& map) {
  33.101 +    UEdgeSetReader& readUEdgeMap(std::string name, Map& map) {
  33.102        return _readMap<
  33.103  	typename Traits::template Reader<typename Map::Value>, Map, 
  33.104  	typename _reader_bits::Arg<Map>::Type>(name, map);
  33.105      }
  33.106  
  33.107      template <typename Map>
  33.108 -    UndirEdgeSetReader& readUndirEdgeMap(std::string name, const Map& map) {
  33.109 +    UEdgeSetReader& readUEdgeMap(std::string name, const Map& map) {
  33.110        return _readMap<
  33.111  	typename Traits::template Reader<typename Map::Value>, Map, 
  33.112  	typename _reader_bits::Arg<Map>::Type>(name, map);
  33.113 @@ -1258,14 +1258,14 @@
  33.114      ///
  33.115      /// Add a new edge undirected map reader command for the reader.
  33.116      template <typename Reader, typename Map>
  33.117 -    UndirEdgeSetReader& readUndirEdgeMap(std::string name, Map& map, 
  33.118 +    UEdgeSetReader& readUEdgeMap(std::string name, Map& map, 
  33.119  					 const Reader& reader = Reader()) {
  33.120        return _readMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
  33.121  	(name, map, reader);
  33.122      }
  33.123  
  33.124      template <typename Reader, typename Map>
  33.125 -    UndirEdgeSetReader& readUndirEdgeMap(std::string name, const Map& map, 
  33.126 +    UEdgeSetReader& readUEdgeMap(std::string name, const Map& map, 
  33.127  					 const Reader& reader = Reader()) {
  33.128        return _readMap<Reader, Map, typename _reader_bits::Arg<Map>::Type >
  33.129  	(name, map, reader);
  33.130 @@ -1274,9 +1274,9 @@
  33.131    private:
  33.132  
  33.133      template <typename Reader, typename Map, typename MapParameter>
  33.134 -    UndirEdgeSetReader& _readMap(std::string name, MapParameter map,
  33.135 +    UEdgeSetReader& _readMap(std::string name, MapParameter map,
  33.136  				 const Reader& reader = Reader()) {
  33.137 -      checkConcept<concept::WriteMap<UndirEdge, typename Map::Value>, Map>();
  33.138 +      checkConcept<concept::WriteMap<UEdge, typename Map::Value>, Map>();
  33.139        checkConcept<_reader_bits::ItemReader<typename Map::Value>, Reader>();
  33.140        if (readers.find(name) != readers.end()) {
  33.141  	ErrorMessage msg;
  33.142 @@ -1285,7 +1285,7 @@
  33.143        }
  33.144        readers.insert(
  33.145  	make_pair(name, new _reader_bits::
  33.146 -		  MapReader<UndirEdge, Map, Reader>(map, reader)));
  33.147 +		  MapReader<UEdge, Map, Reader>(map, reader)));
  33.148        return *this;
  33.149      }
  33.150  
  33.151 @@ -1295,7 +1295,7 @@
  33.152      ///
  33.153      /// Add a new undirected edge map skipper command for the reader.
  33.154      template <typename Reader>
  33.155 -    UndirEdgeSetReader& skipUndirEdgeMap(std::string name, 
  33.156 +    UEdgeSetReader& skipUEdgeMap(std::string name, 
  33.157  					 const Reader& reader = Reader()) {
  33.158        if (readers.find(name) != readers.end()) {
  33.159  	ErrorMessage msg;
  33.160 @@ -1303,7 +1303,7 @@
  33.161  	throw IOParameterError(msg.message());
  33.162        }
  33.163        readers.insert(make_pair(name, new _reader_bits::
  33.164 -			       SkipReader<UndirEdge, Reader>(reader)));
  33.165 +			       SkipReader<UEdge, Reader>(reader)));
  33.166        return *this;
  33.167      }
  33.168  
  33.169 @@ -1311,14 +1311,14 @@
  33.170      ///
  33.171      /// Add a new directed edge map reader command for the reader.
  33.172      template <typename Map>
  33.173 -    UndirEdgeSetReader& readEdgeMap(std::string name, Map& map) {
  33.174 +    UEdgeSetReader& readEdgeMap(std::string name, Map& map) {
  33.175        return _readDirMap<
  33.176  	typename Traits::template Reader<typename Map::Value>, Map,
  33.177  	typename _reader_bits::Arg<Map>::Type>(name, map);
  33.178      }
  33.179  
  33.180      template <typename Map>
  33.181 -    UndirEdgeSetReader& readEdgeMap(std::string name, const Map& map) {
  33.182 +    UEdgeSetReader& readEdgeMap(std::string name, const Map& map) {
  33.183        return _readDirMap<
  33.184  	typename Traits::template Reader<typename Map::Value>, Map,
  33.185  	typename _reader_bits::Arg<Map>::Type>(name, map);
  33.186 @@ -1328,14 +1328,14 @@
  33.187      ///
  33.188      /// Add a new directed edge map reader command for the reader.
  33.189      template <typename Reader, typename Map>
  33.190 -    UndirEdgeSetReader& readEdgeMap(std::string name, Map& map, 
  33.191 +    UEdgeSetReader& readEdgeMap(std::string name, Map& map, 
  33.192  				    const Reader& reader = Reader()) {
  33.193        return _readDirMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
  33.194  	(name, map, reader);
  33.195      }
  33.196  
  33.197      template <typename Reader, typename Map>
  33.198 -    UndirEdgeSetReader& readEdgeMap(std::string name, const Map& map, 
  33.199 +    UEdgeSetReader& readEdgeMap(std::string name, const Map& map, 
  33.200  				    const Reader& reader = Reader()) {
  33.201        return _readDirMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
  33.202  	(name, map, reader);
  33.203 @@ -1344,7 +1344,7 @@
  33.204    private:
  33.205  
  33.206      template <typename Reader, typename Map, typename MapParameter>
  33.207 -    UndirEdgeSetReader& _readDirMap(std::string name, MapParameter map,
  33.208 +    UEdgeSetReader& _readDirMap(std::string name, MapParameter map,
  33.209  				    const Reader& reader = Reader()) { 
  33.210        checkConcept<_reader_bits::ItemReader<typename Map::Value>, Reader>();
  33.211        checkConcept<concept::WriteMap<Edge, typename Map::Value>, Map>();
  33.212 @@ -1361,7 +1361,7 @@
  33.213      ///
  33.214      /// Add a new directed edge map skipper command for the reader.
  33.215      template <typename Reader>
  33.216 -    UndirEdgeSetReader& skipEdgeMap(std::string name, 
  33.217 +    UEdgeSetReader& skipEdgeMap(std::string name, 
  33.218  				    const Reader& reader = Reader()) {
  33.219        skipMap("+" + name, reader);
  33.220        skipMap("-" + name, reader);
  33.221 @@ -1373,14 +1373,14 @@
  33.222      /// \brief Gives back true when the SectionReader can process 
  33.223      /// the section with the given header line.
  33.224      ///
  33.225 -    /// It gives back true when the header line starts with \c \@undiredgeset,
  33.226 +    /// It gives back true when the header line starts with \c \@uedgeset,
  33.227      /// and the header line's name and the edgeset's name are the same.
  33.228      virtual bool header(const std::string& line) {
  33.229        std::istringstream ls(line);
  33.230        std::string command;
  33.231        std::string id;
  33.232        ls >> command >> name;
  33.233 -      return command == "@undiredgeset" && name == id;
  33.234 +      return command == "@uedgeset" && name == id;
  33.235      }
  33.236  
  33.237      /// \brief Reader function of the section.
  33.238 @@ -1390,7 +1390,7 @@
  33.239        if (!nodeLabelReader->isLabelReader()) {
  33.240  	throw DataFormatError("Cannot find nodeset or label map");
  33.241        }
  33.242 -      std::vector<_reader_bits::MapReaderBase<UndirEdge>* > index;
  33.243 +      std::vector<_reader_bits::MapReaderBase<UEdge>* > index;
  33.244        std::string line;
  33.245  
  33.246        getline(is, line);
  33.247 @@ -1421,7 +1421,7 @@
  33.248  	std::istringstream ls(line);
  33.249  	Node from = nodeLabelReader->read(ls);
  33.250  	Node to = nodeLabelReader->read(ls);
  33.251 -	UndirEdge edge = graph.addEdge(from, to);
  33.252 +	UEdge edge = graph.addEdge(from, to);
  33.253  	for (int i = 0; i < (int)index.size(); ++i) {
  33.254  	  index[i]->read(ls, edge);
  33.255  	}
  33.256 @@ -1442,8 +1442,8 @@
  33.257      ///
  33.258      /// It reads an id from the stream and gives back which undirected edge 
  33.259      /// belongs to it. It is possible only if there was read an "label" named map.
  33.260 -    void readLabel(std::istream& is, UndirEdge& undirEdge) const {
  33.261 -      undirEdge = inverter->read(is);
  33.262 +    void readLabel(std::istream& is, UEdge& uEdge) const {
  33.263 +      uEdge = inverter->read(is);
  33.264      } 
  33.265  
  33.266      /// \brief Gives back the directed edge by its label.
  33.267 @@ -1455,11 +1455,11 @@
  33.268      void readLabel(std::istream& is, Edge& edge) const {
  33.269        char c;
  33.270        is >> c;
  33.271 -      UndirEdge undirEdge = inverter->read(is);
  33.272 +      UEdge uEdge = inverter->read(is);
  33.273        if (c == '+') {
  33.274 -	edge = graph.direct(undirEdge, true);
  33.275 +	edge = graph.direct(uEdge, true);
  33.276        } else if (c == '-') {
  33.277 -        edge = graph.direct(undirEdge, false);
  33.278 +        edge = graph.direct(uEdge, false);
  33.279        } else {
  33.280  	throw DataFormatError("Wrong id format for edge "
  33.281  			      "in undirected edgeset");
  33.282 @@ -1469,14 +1469,14 @@
  33.283    private:
  33.284  
  33.285      typedef std::map<std::string, 
  33.286 -		     _reader_bits::MapReaderBase<UndirEdge>*> MapReaders;
  33.287 +		     _reader_bits::MapReaderBase<UEdge>*> MapReaders;
  33.288      MapReaders readers;
  33.289     
  33.290      Graph& graph;   
  33.291      std::string name;
  33.292 -    _reader_bits::SkipReader<UndirEdge, DefaultSkipper> skipper;
  33.293 +    _reader_bits::SkipReader<UEdge, DefaultSkipper> skipper;
  33.294  
  33.295 -    std::auto_ptr<_reader_bits::MapInverterBase<UndirEdge> > inverter;
  33.296 +    std::auto_ptr<_reader_bits::MapInverterBase<UEdge> > inverter;
  33.297      std::auto_ptr<_reader_bits::LabelReaderBase<Node> > nodeLabelReader;
  33.298    };
  33.299  
  33.300 @@ -1696,66 +1696,66 @@
  33.301    /// \ingroup io_group
  33.302    /// \brief SectionReader for reading labeled undirected edges.
  33.303    ///
  33.304 -  /// The undirected edges section's header line is \c \@undiredges 
  33.305 -  /// \c undiredges_name, but the \c undiredges_name may be empty.
  33.306 +  /// The undirected edges section's header line is \c \@uedges 
  33.307 +  /// \c uedges_name, but the \c uedges_name may be empty.
  33.308    ///
  33.309    /// Each line in the section contains the name of the undirected edge 
  33.310    /// and then the undirected edge id. 
  33.311    ///
  33.312    /// \relates LemonReader
  33.313    template <typename _Graph>
  33.314 -  class UndirEdgeReader : public LemonReader::SectionReader {
  33.315 +  class UEdgeReader : public LemonReader::SectionReader {
  33.316      typedef LemonReader::SectionReader Parent;
  33.317      typedef _Graph Graph;
  33.318      typedef typename Graph::Edge Edge;
  33.319 -    typedef typename Graph::UndirEdge UndirEdge;
  33.320 +    typedef typename Graph::UEdge UEdge;
  33.321    public:
  33.322      
  33.323      /// \brief Constructor.
  33.324      ///
  33.325 -    /// Constructor for UndirEdgeReader. It creates the UndirEdgeReader and
  33.326 +    /// Constructor for UEdgeReader. It creates the UEdgeReader and
  33.327      /// attach it into the given LemonReader. It will use the given
  33.328      /// undirected edge id reader to give back the edges. The reader will 
  33.329 -    /// read the section only if the \c _name and the \c undiredges_name are 
  33.330 +    /// read the section only if the \c _name and the \c uedges_name are 
  33.331      /// the same. 
  33.332      template <typename _LabelReader>
  33.333 -    UndirEdgeReader(LemonReader& _reader, const _LabelReader& _labelReader, 
  33.334 +    UEdgeReader(LemonReader& _reader, const _LabelReader& _labelReader, 
  33.335  	       const std::string& _name = std::string()) 
  33.336        : Parent(_reader), name(_name) {
  33.337 -      checkConcept<_reader_bits::ItemLabelReader<UndirEdge>, _LabelReader>();
  33.338 +      checkConcept<_reader_bits::ItemLabelReader<UEdge>, _LabelReader>();
  33.339        checkConcept<_reader_bits::ItemLabelReader<Edge>, _LabelReader>();
  33.340 -      undirEdgeLabelReader.reset(new _reader_bits::
  33.341 -			      LabelReader<UndirEdge, _LabelReader>(_labelReader));
  33.342 +      uEdgeLabelReader.reset(new _reader_bits::
  33.343 +			      LabelReader<UEdge, _LabelReader>(_labelReader));
  33.344        edgeLabelReader.reset(new _reader_bits::
  33.345  			 LabelReader<Edge, _LabelReader>(_labelReader));
  33.346      }
  33.347  
  33.348      /// \brief Destructor.
  33.349      ///
  33.350 -    /// Destructor for UndirEdgeReader.
  33.351 -    virtual ~UndirEdgeReader() {}
  33.352 +    /// Destructor for UEdgeReader.
  33.353 +    virtual ~UEdgeReader() {}
  33.354    private:
  33.355 -    UndirEdgeReader(const UndirEdgeReader&);
  33.356 -    void operator=(const UndirEdgeReader&);
  33.357 +    UEdgeReader(const UEdgeReader&);
  33.358 +    void operator=(const UEdgeReader&);
  33.359  
  33.360    public:
  33.361  
  33.362 -    /// \brief Add an undirected edge reader command for the UndirEdgeReader.
  33.363 +    /// \brief Add an undirected edge reader command for the UEdgeReader.
  33.364      ///
  33.365 -    /// Add an undirected edge reader command for the UndirEdgeReader.
  33.366 -    void readUndirEdge(const std::string& name, UndirEdge& item) {
  33.367 -      if (undirEdgeReaders.find(name) != undirEdgeReaders.end()) {
  33.368 +    /// Add an undirected edge reader command for the UEdgeReader.
  33.369 +    void readUEdge(const std::string& name, UEdge& item) {
  33.370 +      if (uEdgeReaders.find(name) != uEdgeReaders.end()) {
  33.371  	ErrorMessage msg;
  33.372  	msg << "Multiple read rule for undirected edge: " << name;
  33.373  	throw IOParameterError(msg.message());
  33.374        }
  33.375 -      undirEdgeReaders.insert(make_pair(name, _reader_bits::
  33.376 -					ItemStore<UndirEdge>(item)));
  33.377 +      uEdgeReaders.insert(make_pair(name, _reader_bits::
  33.378 +					ItemStore<UEdge>(item)));
  33.379      }
  33.380  
  33.381 -    /// \brief Add an edge reader command for the UndirEdgeReader.
  33.382 +    /// \brief Add an edge reader command for the UEdgeReader.
  33.383      ///
  33.384 -    /// Add an edge reader command for the UndirEdgeReader.
  33.385 +    /// Add an edge reader command for the UEdgeReader.
  33.386      void readEdge(const std::string& name, Edge& item) {
  33.387        if (edgeReaders.find(name) != edgeReaders.end()) {
  33.388  	ErrorMessage msg;
  33.389 @@ -1777,7 +1777,7 @@
  33.390        std::string command;
  33.391        std::string id;
  33.392        ls >> command >> name;
  33.393 -      return command == "@undiredges" && name == id;
  33.394 +      return command == "@uedges" && name == id;
  33.395      }
  33.396  
  33.397      /// \brief Reader function of the section.
  33.398 @@ -1787,7 +1787,7 @@
  33.399        if (!edgeLabelReader->isLabelReader()) {
  33.400  	throw DataFormatError("Cannot find undirected edgeset or label map");
  33.401        }
  33.402 -      if (!undirEdgeLabelReader->isLabelReader()) {
  33.403 +      if (!uEdgeLabelReader->isLabelReader()) {
  33.404  	throw DataFormatError("Cannot find undirected edgeset or label map");
  33.405        }
  33.406        std::string line;
  33.407 @@ -1796,9 +1796,9 @@
  33.408  	std::string id;
  33.409  	ls >> id;
  33.410  	{
  33.411 -	  typename UndirEdgeReaders::iterator it = undirEdgeReaders.find(id);
  33.412 -	  if (it != undirEdgeReaders.end()) {
  33.413 -	    it->second.read(undirEdgeLabelReader->read(ls));
  33.414 +	  typename UEdgeReaders::iterator it = uEdgeReaders.find(id);
  33.415 +	  if (it != uEdgeReaders.end()) {
  33.416 +	    it->second.read(uEdgeLabelReader->read(ls));
  33.417  	    it->second.touch();
  33.418  	    continue;
  33.419  	  }	
  33.420 @@ -1819,11 +1819,11 @@
  33.421  	  throw IOParameterError(msg.message());
  33.422  	}
  33.423        }
  33.424 -      for (typename UndirEdgeReaders::iterator it = undirEdgeReaders.begin();
  33.425 -	   it != undirEdgeReaders.end(); ++it) {
  33.426 +      for (typename UEdgeReaders::iterator it = uEdgeReaders.begin();
  33.427 +	   it != uEdgeReaders.end(); ++it) {
  33.428  	if (!it->second.touched()) {
  33.429  	  ErrorMessage msg;
  33.430 -	  msg << "UndirEdge not found in file: " << it->first;
  33.431 +	  msg << "UEdge not found in file: " << it->first;
  33.432  	  throw IOParameterError(msg.message());
  33.433  	}
  33.434        }
  33.435 @@ -1834,9 +1834,9 @@
  33.436      std::string name;
  33.437  
  33.438      typedef std::map<std::string, 
  33.439 -		     _reader_bits::ItemStore<UndirEdge> > UndirEdgeReaders;
  33.440 -    UndirEdgeReaders undirEdgeReaders;
  33.441 -    std::auto_ptr<_reader_bits::LabelReaderBase<UndirEdge> > undirEdgeLabelReader;
  33.442 +		     _reader_bits::ItemStore<UEdge> > UEdgeReaders;
  33.443 +    UEdgeReaders uEdgeReaders;
  33.444 +    std::auto_ptr<_reader_bits::LabelReaderBase<UEdge> > uEdgeLabelReader;
  33.445  
  33.446      typedef std::map<std::string, _reader_bits::ItemStore<Edge> > EdgeReaders;
  33.447      EdgeReaders edgeReaders;
  33.448 @@ -2025,24 +2025,24 @@
  33.449      /// \brief Gives back how many undirected edgesets are in the file.
  33.450      ///
  33.451      /// Gives back how many undirected edgesets are in the file.
  33.452 -    int undirEdgeSetNum() const {
  33.453 -      return undiredgesets.size();
  33.454 +    int uEdgeSetNum() const {
  33.455 +      return uedgesets.size();
  33.456      }
  33.457  
  33.458      /// \brief Gives back the name of undirected edgeset on the indiced 
  33.459      /// position.
  33.460      ///
  33.461      /// Gives back the name of undirected edgeset on the indiced position.
  33.462 -    std::string undirEdgeSetName(int index) const {
  33.463 -      return undiredgesets[index].name;
  33.464 +    std::string uEdgeSetName(int index) const {
  33.465 +      return uedgesets[index].name;
  33.466      }
  33.467  
  33.468      /// \brief Gives back the map names of undirected edgeset on the indiced 
  33.469      /// position.
  33.470      ///
  33.471      /// Gives back the map names of undirected edgeset on the indiced position.
  33.472 -    const std::vector<std::string>& undirEdgeSetMaps(int index) const {
  33.473 -      return undiredgesets[index].items;
  33.474 +    const std::vector<std::string>& uEdgeSetMaps(int index) const {
  33.475 +      return uedgesets[index].items;
  33.476      }
  33.477  
  33.478      /// \brief Gives back how many labeled nodes section are in the file.
  33.479 @@ -2095,8 +2095,8 @@
  33.480      /// in the file.
  33.481      ///
  33.482      /// Gives back how many labeled undirected edges section are in the file.
  33.483 -    int undirEdgesNum() const {
  33.484 -      return undiredges.size();
  33.485 +    int uEdgesNum() const {
  33.486 +      return uedges.size();
  33.487      }
  33.488  
  33.489      /// \brief Gives back the name of labeled undirected edges section 
  33.490 @@ -2104,8 +2104,8 @@
  33.491      ///
  33.492      /// Gives back the name of labeled undirected edges section on the 
  33.493      /// indiced position.
  33.494 -    std::string undirEdgesName(int index) const {
  33.495 -      return undiredges[index].name;
  33.496 +    std::string uEdgesName(int index) const {
  33.497 +      return uedges[index].name;
  33.498      }
  33.499  
  33.500      /// \brief Gives back the names of the labeled undirected edges in 
  33.501 @@ -2113,8 +2113,8 @@
  33.502      ///
  33.503      /// Gives back the names of the labeled undirected edges in the 
  33.504      /// indiced section.
  33.505 -    const std::vector<std::string>& undirEdgesItems(int index) const {
  33.506 -      return undiredges[index].items;
  33.507 +    const std::vector<std::string>& uEdgesItems(int index) const {
  33.508 +      return uedges[index].items;
  33.509      }
  33.510  
  33.511   
  33.512 @@ -2160,18 +2160,18 @@
  33.513        } else if (command == "@edgeset") {
  33.514  	current = command;
  33.515  	edgesets.push_back(SectionInfo(name));
  33.516 -      } else if (command == "@undiredgeset") {
  33.517 +      } else if (command == "@uedgeset") {
  33.518  	current = command;
  33.519 -	undiredgesets.push_back(SectionInfo(name));
  33.520 +	uedgesets.push_back(SectionInfo(name));
  33.521        } else if (command == "@nodes") {
  33.522  	current = command;
  33.523  	nodes.push_back(SectionInfo(name));
  33.524        } else if (command == "@edges") {
  33.525  	current = command;
  33.526  	edges.push_back(SectionInfo(name));
  33.527 -      } else if (command == "@undiredges") {
  33.528 +      } else if (command == "@uedges") {
  33.529  	current = command;
  33.530 -	undiredges.push_back(SectionInfo(name));
  33.531 +	uedges.push_back(SectionInfo(name));
  33.532        } else if (command == "@attributes") {
  33.533  	current = command;
  33.534  	attributes.push_back(SectionInfo(name));
  33.535 @@ -2190,14 +2190,14 @@
  33.536  	readMapNames(is, nodesets.back().items);
  33.537        } else if (current == "@edgeset") {
  33.538  	readMapNames(is, edgesets.back().items);
  33.539 -      } else if (current == "@undiredgeset") {
  33.540 -	readMapNames(is, undiredgesets.back().items);
  33.541 +      } else if (current == "@uedgeset") {
  33.542 +	readMapNames(is, uedgesets.back().items);
  33.543        } else if (current == "@nodes") {
  33.544  	readItemNames(is, nodes.back().items);
  33.545        } else if (current == "@edges") {
  33.546  	readItemNames(is, edges.back().items);
  33.547 -      } else if (current == "@undiredges") {
  33.548 -	readItemNames(is, undiredges.back().items);
  33.549 +      } else if (current == "@uedges") {
  33.550 +	readItemNames(is, uedges.back().items);
  33.551        } else if (current == "@attributes") {
  33.552  	readItemNames(is, attributes.back().items);
  33.553        }
  33.554 @@ -2233,11 +2233,11 @@
  33.555  
  33.556      std::vector<SectionInfo> nodesets;
  33.557      std::vector<SectionInfo> edgesets;
  33.558 -    std::vector<SectionInfo> undiredgesets;
  33.559 +    std::vector<SectionInfo> uedgesets;
  33.560  
  33.561      std::vector<SectionInfo> nodes;
  33.562      std::vector<SectionInfo> edges;
  33.563 -    std::vector<SectionInfo> undiredges;
  33.564 +    std::vector<SectionInfo> uedges;
  33.565  
  33.566      std::vector<SectionInfo> attributes;
  33.567  
    34.1 --- a/lemon/lemon_writer.h	Thu Jan 26 06:44:22 2006 +0000
    34.2 +++ b/lemon/lemon_writer.h	Thu Jan 26 15:42:13 2006 +0000
    34.3 @@ -91,7 +91,7 @@
    34.4      template <typename Graph, typename Map>
    34.5      class ForwardComposeMap {
    34.6      public:
    34.7 -      typedef typename Graph::UndirEdge Key;
    34.8 +      typedef typename Graph::UEdge Key;
    34.9        typedef typename Map::Value Value;
   34.10  
   34.11        ForwardComposeMap(const Graph& _graph, const Map& _map) 
   34.12 @@ -115,7 +115,7 @@
   34.13      template <typename Graph, typename Map>
   34.14      class BackwardComposeMap {
   34.15      public:
   34.16 -      typedef typename Graph::UndirEdge Key;
   34.17 +      typedef typename Graph::UEdge Key;
   34.18        typedef typename Map::Value Value;
   34.19  
   34.20        BackwardComposeMap(const Graph& _graph, const Map& _map) 
   34.21 @@ -708,8 +708,8 @@
   34.22    /// \brief SectionWriter for writing a undirected edgeset.
   34.23    ///
   34.24    /// The lemon format can store multiple undirected edgesets with several 
   34.25 -  /// maps. The undirected edgeset section's header line is \c \@undiredgeset 
   34.26 -  /// \c undiredgeset_name, but the \c undiredgeset_name may be empty.
   34.27 +  /// maps. The undirected edgeset section's header line is \c \@uedgeset 
   34.28 +  /// \c uedgeset_name, but the \c uedgeset_name may be empty.
   34.29    ///
   34.30    /// The first line of the section contains the names of the maps separated
   34.31    /// with white spaces. Each next lines describes an undirected edge in the 
   34.32 @@ -734,7 +734,7 @@
   34.33    ///
   34.34    /// \relates LemonWriter
   34.35    template <typename _Graph, typename _Traits = DefaultWriterTraits>
   34.36 -  class UndirEdgeSetWriter : public LemonWriter::SectionWriter {
   34.37 +  class UEdgeSetWriter : public LemonWriter::SectionWriter {
   34.38      typedef LemonWriter::SectionWriter Parent;
   34.39    public:
   34.40  
   34.41 @@ -742,17 +742,17 @@
   34.42      typedef _Traits Traits;
   34.43      typedef typename Graph::Node Node;
   34.44      typedef typename Graph::Edge Edge;
   34.45 -    typedef typename Graph::UndirEdge UndirEdge;
   34.46 +    typedef typename Graph::UEdge UEdge;
   34.47  
   34.48      /// \brief Constructor.
   34.49      ///
   34.50 -    /// Constructor for UndirEdgeSetWriter. It creates the UndirEdgeSetWriter
   34.51 +    /// Constructor for UEdgeSetWriter. It creates the UEdgeSetWriter
   34.52      /// and attach it into the given LemonWriter. It will write node labels by
   34.53      /// the \c _nodeLabelWriter. If the \c _forceLabelMap parameter is true 
   34.54      /// then the writer will write own label map if the user does not give 
   34.55      /// "label" named map.
   34.56      template <typename NodeLabelWriter>
   34.57 -    UndirEdgeSetWriter(LemonWriter& _writer, const Graph& _graph, 
   34.58 +    UEdgeSetWriter(LemonWriter& _writer, const Graph& _graph, 
   34.59  		       const NodeLabelWriter& _nodeLabelWriter, 
   34.60  		       const std::string& _name = std::string(),
   34.61  		       bool _forceLabelMap = true)
   34.62 @@ -765,8 +765,8 @@
   34.63  
   34.64      /// \brief Destructor.
   34.65      ///
   34.66 -    /// Destructor for UndirEdgeSetWriter.
   34.67 -    virtual ~UndirEdgeSetWriter() {
   34.68 +    /// Destructor for UEdgeSetWriter.
   34.69 +    virtual ~UEdgeSetWriter() {
   34.70        typename MapWriters::iterator it;
   34.71        for (it = writers.begin(); it != writers.end(); ++it) {
   34.72  	delete it->second;
   34.73 @@ -774,8 +774,8 @@
   34.74      }
   34.75  
   34.76    private:
   34.77 -    UndirEdgeSetWriter(const UndirEdgeSetWriter&);
   34.78 -    void operator=(const UndirEdgeSetWriter&);
   34.79 +    UEdgeSetWriter(const UEdgeSetWriter&);
   34.80 +    void operator=(const UEdgeSetWriter&);
   34.81  
   34.82    public:
   34.83  
   34.84 @@ -783,8 +783,8 @@
   34.85      ///
   34.86      /// Add a new undirected map writer command for the writer.
   34.87      template <typename Map>
   34.88 -    UndirEdgeSetWriter& writeUndirEdgeMap(std::string name, const Map& map) {
   34.89 -      return writeUndirEdgeMap<typename Traits::
   34.90 +    UEdgeSetWriter& writeUEdgeMap(std::string name, const Map& map) {
   34.91 +      return writeUEdgeMap<typename Traits::
   34.92  	template Writer<typename Map::Value>, Map>(name, map);
   34.93      }
   34.94  
   34.95 @@ -792,13 +792,13 @@
   34.96      ///
   34.97      /// Add a new undirected map writer command for the writer.
   34.98      template <typename Writer, typename Map>
   34.99 -    UndirEdgeSetWriter& writeUndirEdgeMap(std::string name, const Map& map, 
  34.100 +    UEdgeSetWriter& writeUEdgeMap(std::string name, const Map& map, 
  34.101  					  const Writer& writer = Writer()) {
  34.102 -      checkConcept<concept::ReadMap<UndirEdge, typename Map::Value>, Map>();
  34.103 +      checkConcept<concept::ReadMap<UEdge, typename Map::Value>, Map>();
  34.104        checkConcept<_writer_bits::ItemWriter<typename Map::Value>, Writer>();
  34.105        writers.push_back(
  34.106  	make_pair(name, new _writer_bits::
  34.107 -		  MapWriter<UndirEdge, Map, Writer>(map, writer)));
  34.108 +		  MapWriter<UEdge, Map, Writer>(map, writer)));
  34.109        return *this;
  34.110      }
  34.111  
  34.112 @@ -806,7 +806,7 @@
  34.113      ///
  34.114      /// Add a new directed map writer command for the writer.
  34.115      template <typename Map>
  34.116 -    UndirEdgeSetWriter& writeEdgeMap(std::string name, const Map& map) {
  34.117 +    UEdgeSetWriter& writeEdgeMap(std::string name, const Map& map) {
  34.118        return writeEdgeMap<typename Traits::
  34.119  	template Writer<typename Map::Value>, Map>(name, map);
  34.120      }
  34.121 @@ -815,13 +815,13 @@
  34.122      ///
  34.123      /// Add a new directed map writer command for the writer.
  34.124      template <typename Writer, typename Map>
  34.125 -    UndirEdgeSetWriter& writeEdgeMap(std::string name, const Map& map, 
  34.126 +    UEdgeSetWriter& writeEdgeMap(std::string name, const Map& map, 
  34.127  				     const Writer& writer = Writer()) {
  34.128        checkConcept<concept::ReadMap<Edge, typename Map::Value>, Map>();
  34.129        checkConcept<_writer_bits::ItemWriter<typename Map::Value>, Writer>();
  34.130 -      writeUndirEdge("+" + name, 
  34.131 +      writeUEdge("+" + name, 
  34.132  		     _writer_bits::forwardComposeMap(graph, map), writer);
  34.133 -      writeUndirEdge("-" + name, 
  34.134 +      writeUEdge("-" + name, 
  34.135  		     _writer_bits::backwardComposeMap(graph, map), writer);
  34.136        return *this;
  34.137      }
  34.138 @@ -832,7 +832,7 @@
  34.139      ///
  34.140      /// It gives back the header of the section.
  34.141      virtual std::string header() {
  34.142 -      return "@undiredgeset " + name;
  34.143 +      return "@uedgeset " + name;
  34.144      }
  34.145  
  34.146      /// \brief  Writer function of the section.
  34.147 @@ -857,7 +857,7 @@
  34.148  	os << writers[i].first << '\t';
  34.149        }
  34.150        os << std::endl;
  34.151 -      for (typename Graph::UndirEdgeIt it(graph); it != INVALID; ++it) {
  34.152 +      for (typename Graph::UEdgeIt it(graph); it != INVALID; ++it) {
  34.153  	nodeLabelWriter->write(os, graph.source(it));
  34.154  	os << '\t';
  34.155  	nodeLabelWriter->write(os, graph.target(it));
  34.156 @@ -891,7 +891,7 @@
  34.157      /// an "label" named map then it will write the map value belongs to the 
  34.158      /// undirected edge. Otherwise if the \c forceLabel parameter was true it 
  34.159      /// will write its id in the graph. 
  34.160 -    void writeLabel(std::ostream& os, const UndirEdge& item) const {
  34.161 +    void writeLabel(std::ostream& os, const UEdge& item) const {
  34.162        if (forceLabelMap) {
  34.163  	os << graph.id(item);
  34.164        } else {
  34.165 @@ -922,10 +922,10 @@
  34.166    private:
  34.167  
  34.168      typedef std::vector<std::pair<std::string, _writer_bits::
  34.169 -				  MapWriterBase<UndirEdge>*> > MapWriters;
  34.170 +				  MapWriterBase<UEdge>*> > MapWriters;
  34.171      MapWriters writers;
  34.172  
  34.173 -    _writer_bits::MapWriterBase<UndirEdge>* labelMap;
  34.174 +    _writer_bits::MapWriterBase<UEdge>* labelMap;
  34.175      bool forceLabelMap;
  34.176     
  34.177      const Graph& graph;   
  34.178 @@ -1099,62 +1099,62 @@
  34.179    /// \ingroup io_group
  34.180    /// \brief SectionWriter for writing named undirected edges.
  34.181    ///
  34.182 -  /// The undirected edges section's header line is \c \@undiredges 
  34.183 -  /// \c undiredges_name, but the \c undiredges_name may be empty.
  34.184 +  /// The undirected edges section's header line is \c \@uedges 
  34.185 +  /// \c uedges_name, but the \c uedges_name may be empty.
  34.186    ///
  34.187    /// Each line in the section contains the name of the undirected edge and 
  34.188    /// then the undirected edge label. 
  34.189    ///
  34.190    /// \relates LemonWriter
  34.191    template <typename _Graph>
  34.192 -  class UndirEdgeWriter : public LemonWriter::SectionWriter {
  34.193 +  class UEdgeWriter : public LemonWriter::SectionWriter {
  34.194      typedef LemonWriter::SectionWriter Parent;
  34.195      typedef _Graph Graph;
  34.196      typedef typename Graph::Node Node;
  34.197      typedef typename Graph::Edge Edge;
  34.198 -    typedef typename Graph::UndirEdge UndirEdge;
  34.199 +    typedef typename Graph::UEdge UEdge;
  34.200    public:
  34.201      
  34.202      /// \brief Constructor.
  34.203      ///
  34.204 -    /// Constructor for UndirEdgeWriter. It creates the UndirEdgeWriter and
  34.205 +    /// Constructor for UEdgeWriter. It creates the UEdgeWriter and
  34.206      /// attach it into the given LemonWriter. The given \c _LabelWriter
  34.207      /// will write the undirected edges' label what can be an undirected 
  34.208      /// edgeset writer.
  34.209      template <typename _LabelWriter>
  34.210 -    UndirEdgeWriter(LemonWriter& _writer, const _LabelWriter& _labelWriter, 
  34.211 +    UEdgeWriter(LemonWriter& _writer, const _LabelWriter& _labelWriter, 
  34.212  	       const std::string& _name = std::string()) 
  34.213        : Parent(_writer), name(_name) {
  34.214        checkConcept<_writer_bits::ItemLabelWriter<Edge>, _LabelWriter>();
  34.215 -      checkConcept<_writer_bits::ItemLabelWriter<UndirEdge>, _LabelWriter>();
  34.216 -      undirEdgeLabelWriter.reset(new _writer_bits::
  34.217 -			      LabelWriter<UndirEdge, _LabelWriter>(_labelWriter));
  34.218 +      checkConcept<_writer_bits::ItemLabelWriter<UEdge>, _LabelWriter>();
  34.219 +      uEdgeLabelWriter.reset(new _writer_bits::
  34.220 +			      LabelWriter<UEdge, _LabelWriter>(_labelWriter));
  34.221        edgeLabelWriter.reset(new _writer_bits::
  34.222  			 LabelWriter<Edge, _LabelWriter>(_labelWriter));
  34.223      }
  34.224  
  34.225      /// \brief Destructor.
  34.226      ///
  34.227 -    /// Destructor for UndirEdgeWriter.
  34.228 -    virtual ~UndirEdgeWriter() {}
  34.229 +    /// Destructor for UEdgeWriter.
  34.230 +    virtual ~UEdgeWriter() {}
  34.231    private:
  34.232 -    UndirEdgeWriter(const UndirEdgeWriter&);
  34.233 -    void operator=(const UndirEdgeWriter&);
  34.234 +    UEdgeWriter(const UEdgeWriter&);
  34.235 +    void operator=(const UEdgeWriter&);
  34.236  
  34.237    public:
  34.238  
  34.239 -    /// \brief Add an edge writer command for the UndirEdgeWriter.
  34.240 +    /// \brief Add an edge writer command for the UEdgeWriter.
  34.241      ///
  34.242 -    /// Add an edge writer command for the UndirEdgeWriter.
  34.243 +    /// Add an edge writer command for the UEdgeWriter.
  34.244      void writeEdge(const std::string& name, const Edge& item) {
  34.245        edgeWriters.push_back(make_pair(name, &item));
  34.246      }
  34.247  
  34.248 -    /// \brief Add an undirected edge writer command for the UndirEdgeWriter.
  34.249 +    /// \brief Add an undirected edge writer command for the UEdgeWriter.
  34.250      ///
  34.251 -    /// Add an undirected edge writer command for the UndirEdgeWriter.
  34.252 -    void writeUndirEdge(const std::string& name, const UndirEdge& item) {
  34.253 -      undirEdgeWriters.push_back(make_pair(name, &item));
  34.254 +    /// Add an undirected edge writer command for the UEdgeWriter.
  34.255 +    void writeUEdge(const std::string& name, const UEdge& item) {
  34.256 +      uEdgeWriters.push_back(make_pair(name, &item));
  34.257      }
  34.258  
  34.259    protected:
  34.260 @@ -1163,7 +1163,7 @@
  34.261      ///
  34.262      /// It gives back the header of the section.
  34.263      virtual std::string header() {
  34.264 -      return "@undiredges " + name;
  34.265 +      return "@uedges " + name;
  34.266      }
  34.267  
  34.268      /// \brief  Writer function of the section.
  34.269 @@ -1173,12 +1173,12 @@
  34.270        if (!edgeLabelWriter->isLabelWriter()) {
  34.271  	throw DataFormatError("Cannot find undirected edgeset or label map");
  34.272        }
  34.273 -      if (!undirEdgeLabelWriter->isLabelWriter()) {
  34.274 +      if (!uEdgeLabelWriter->isLabelWriter()) {
  34.275  	throw DataFormatError("Cannot find undirected edgeset or label map");
  34.276        }
  34.277 -      for (int i = 0; i < (int)undirEdgeWriters.size(); ++i) {
  34.278 -	os << undirEdgeWriters[i].first << ' ';
  34.279 -	undirEdgeLabelWriter->write(os, *(undirEdgeWriters[i].second));
  34.280 +      for (int i = 0; i < (int)uEdgeWriters.size(); ++i) {
  34.281 +	os << uEdgeWriters[i].first << ' ';
  34.282 +	uEdgeLabelWriter->write(os, *(uEdgeWriters[i].second));
  34.283  	os << std::endl;
  34.284        }
  34.285        for (int i = 0; i < (int)edgeWriters.size(); ++i) {
  34.286 @@ -1193,9 +1193,9 @@
  34.287      std::string name;
  34.288  
  34.289      typedef std::vector<std::pair<std::string, 
  34.290 -				  const UndirEdge*> > UndirEdgeWriters;
  34.291 -    UndirEdgeWriters undirEdgeWriters;
  34.292 -    std::auto_ptr<_writer_bits::LabelWriterBase<UndirEdge> > undirEdgeLabelWriter;
  34.293 +				  const UEdge*> > UEdgeWriters;
  34.294 +    UEdgeWriters uEdgeWriters;
  34.295 +    std::auto_ptr<_writer_bits::LabelWriterBase<UEdge> > uEdgeLabelWriter;
  34.296  
  34.297      typedef std::vector<std::pair<std::string, const Edge*> > EdgeWriters;
  34.298      EdgeWriters edgeWriters;
    35.1 --- a/lemon/list_graph.h	Thu Jan 26 06:44:22 2006 +0000
    35.2 +++ b/lemon/list_graph.h	Thu Jan 26 15:42:13 2006 +0000
    35.3 @@ -19,7 +19,7 @@
    35.4  
    35.5  ///\ingroup graphs
    35.6  ///\file
    35.7 -///\brief ListGraph, UndirListGraph classes.
    35.8 +///\brief ListGraph, ListUGraph classes.
    35.9  
   35.10  #include <lemon/bits/erasable_graph_extender.h>
   35.11  #include <lemon/bits/clearable_graph_extender.h>
   35.12 @@ -576,13 +576,13 @@
   35.13  
   35.14    /**************** Undirected List Graph ****************/
   35.15  
   35.16 -  typedef ErasableUndirGraphExtender<
   35.17 -    ClearableUndirGraphExtender<
   35.18 -    ExtendableUndirGraphExtender<
   35.19 -    MappableUndirGraphExtender<
   35.20 -    IterableUndirGraphExtender<
   35.21 -    AlterableUndirGraphExtender<
   35.22 -    UndirGraphExtender<ListGraphBase> > > > > > > ExtendedUndirListGraphBase;
   35.23 +  typedef ErasableUGraphExtender<
   35.24 +    ClearableUGraphExtender<
   35.25 +    ExtendableUGraphExtender<
   35.26 +    MappableUGraphExtender<
   35.27 +    IterableUGraphExtender<
   35.28 +    AlterableUGraphExtender<
   35.29 +    UGraphExtender<ListGraphBase> > > > > > > ExtendedListUGraphBase;
   35.30  
   35.31    /// \addtogroup graphs
   35.32    /// @{
   35.33 @@ -592,16 +592,16 @@
   35.34    ///This is a simple and fast erasable undirected graph implementation.
   35.35    ///
   35.36    ///It conforms to the
   35.37 -  ///\ref concept::UndirGraph "UndirGraph" concept.
   35.38 +  ///\ref concept::UGraph "UGraph" concept.
   35.39    ///
   35.40 -  ///\sa concept::UndirGraph.
   35.41 +  ///\sa concept::UGraph.
   35.42    ///
   35.43    ///\todo Snapshot, reverseEdge(), changeTarget(), changeSource(), contract()
   35.44    ///haven't been implemented yet.
   35.45    ///
   35.46 -  class UndirListGraph : public ExtendedUndirListGraphBase {
   35.47 +  class ListUGraph : public ExtendedListUGraphBase {
   35.48    public:
   35.49 -    typedef ExtendedUndirListGraphBase Parent;
   35.50 +    typedef ExtendedListUGraphBase Parent;
   35.51      /// \brief Changes the target of \c e to \c n
   35.52      ///
   35.53      /// Changes the target of \c e to \c n
   35.54 @@ -609,7 +609,7 @@
   35.55      /// \note The <tt>Edge</tt>'s and <tt>OutEdge</tt>'s
   35.56      /// referencing the changed edge remain
   35.57      /// valid. However <tt>InEdge</tt>'s are invalidated.
   35.58 -    void changeTarget(UndirEdge e, Node n) { 
   35.59 +    void changeTarget(UEdge e, Node n) { 
   35.60        _changeTarget(e,n); 
   35.61      }
   35.62      /// Changes the source of \c e to \c n
   35.63 @@ -619,7 +619,7 @@
   35.64      ///\note The <tt>Edge</tt>'s and <tt>InEdge</tt>'s
   35.65      ///referencing the changed edge remain
   35.66      ///valid. However <tt>OutEdge</tt>'s are invalidated.
   35.67 -    void changeSource(UndirEdge e, Node n) { 
   35.68 +    void changeSource(UEdge e, Node n) { 
   35.69        _changeSource(e,n); 
   35.70      }
   35.71      /// \brief Contract two nodes.
    36.1 --- a/lemon/max_matching.h	Thu Jan 26 06:44:22 2006 +0000
    36.2 +++ b/lemon/max_matching.h	Thu Jan 26 15:42:13 2006 +0000
    36.3 @@ -59,8 +59,8 @@
    36.4  
    36.5      typedef typename Graph::Node Node;
    36.6      typedef typename Graph::Edge Edge;
    36.7 -    typedef typename Graph::UndirEdge UndirEdge;
    36.8 -    typedef typename Graph::UndirEdgeIt UndirEdgeIt;
    36.9 +    typedef typename Graph::UEdge UEdge;
   36.10 +    typedef typename Graph::UEdgeIt UEdgeIt;
   36.11      typedef typename Graph::NodeIt NodeIt;
   36.12      typedef typename Graph::IncEdgeIt IncEdgeIt;
   36.13  
   36.14 @@ -98,7 +98,7 @@
   36.15      ///2*number of nodes), and a heuristical Edmonds' algorithm with a
   36.16      ///heuristic of postponing shrinks for dense graphs. 
   36.17      void run() {
   36.18 -      if ( countUndirEdges(g) < HEUR_density*countNodes(g) ) {
   36.19 +      if ( countUEdges(g) < HEUR_density*countNodes(g) ) {
   36.20  	greedyMatching();
   36.21  	runEdmonds(0);
   36.22        } else runEdmonds(1);
   36.23 @@ -212,26 +212,26 @@
   36.24        } 
   36.25      } 
   36.26  
   36.27 -    ///Reads a matching from an \c UndirEdge valued \c Node map.
   36.28 +    ///Reads a matching from an \c UEdge valued \c Node map.
   36.29  
   36.30 -    ///Reads a matching from an \c UndirEdge valued \c Node map. \c
   36.31 -    ///map[v] must be an \c UndirEdge incident to \c v. This map must
   36.32 +    ///Reads a matching from an \c UEdge valued \c Node map. \c
   36.33 +    ///map[v] must be an \c UEdge incident to \c v. This map must
   36.34      ///have the property that if \c g.oppositeNode(u,map[u])==v then
   36.35      ///\c \c g.oppositeNode(v,map[v])==u holds, and now some edge
   36.36      ///joining \c u to \c v will be an edge of the matching.
   36.37      template<typename NMapE>
   36.38      void readNMapEdge(NMapE& map) {
   36.39       for(NodeIt v(g); v!=INVALID; ++v) {
   36.40 -       UndirEdge e=map[v];
   36.41 +       UEdge e=map[v];
   36.42  	if ( e!=INVALID )
   36.43  	  _mate.set(v,g.oppositeNode(v,e));
   36.44        } 
   36.45      } 
   36.46      
   36.47 -    ///Writes the matching stored to an \c UndirEdge valued \c Node map.
   36.48 +    ///Writes the matching stored to an \c UEdge valued \c Node map.
   36.49  
   36.50 -    ///Writes the stored matching to an \c UndirEdge valued \c Node
   36.51 -    ///map. \c map[v] will be an \c UndirEdge incident to \c v. This
   36.52 +    ///Writes the stored matching to an \c UEdge valued \c Node
   36.53 +    ///map. \c map[v] will be an \c UEdge incident to \c v. This
   36.54      ///map will have the property that if \c g.oppositeNode(u,map[u])
   36.55      ///== v then \c map[u]==map[v] holds, and now this edge is an edge
   36.56      ///of the matching.
   36.57 @@ -263,7 +263,7 @@
   36.58      ///map[e]==true form the matching.
   36.59      template<typename EMapB>
   36.60      void readEMapBool(EMapB& map) {
   36.61 -      for(UndirEdgeIt e(g); e!=INVALID; ++e) {
   36.62 +      for(UEdgeIt e(g); e!=INVALID; ++e) {
   36.63  	if ( map[e] ) {
   36.64  	  Node u=g.source(e);	  
   36.65  	  Node v=g.target(e);
   36.66 @@ -282,7 +282,7 @@
   36.67      ///edges \c e with \c map[e]==true form the matching.
   36.68      template<typename EMapB>
   36.69      void writeEMapBool (EMapB& map) const {
   36.70 -      for(UndirEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);
   36.71 +      for(UEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);
   36.72  
   36.73        typename Graph::template NodeMap<bool> todo(g,true); 
   36.74        for(NodeIt v(g); v!=INVALID; ++v) {
    37.1 --- a/lemon/path.h	Thu Jan 26 06:44:22 2006 +0000
    37.2 +++ b/lemon/path.h	Thu Jan 26 15:42:13 2006 +0000
    37.3 @@ -385,7 +385,7 @@
    37.4    //! \todo Thoroughfully check all the range and consistency tests.
    37.5    /// \todo May we need just path for undirected graph instead of this.
    37.6    template<typename Graph>
    37.7 -  class UndirPath {
    37.8 +  class UPath {
    37.9    public:
   37.10      /// Edge type of the underlying graph.
   37.11      typedef typename Graph::Edge GraphEdge;
   37.12 @@ -403,13 +403,13 @@
   37.13  
   37.14      /// \param _G The graph in which the path is.
   37.15      ///
   37.16 -    UndirPath(const Graph &_G) : gr(&_G) {}
   37.17 +    UPath(const Graph &_G) : gr(&_G) {}
   37.18  
   37.19      /// \brief Subpath constructor.
   37.20      ///
   37.21      /// Subpath defined by two nodes.
   37.22      /// \warning It is an error if the two edges are not in order!
   37.23 -    UndirPath(const UndirPath &P, const NodeIt &a, const NodeIt &b) {
   37.24 +    UPath(const UPath &P, const NodeIt &a, const NodeIt &b) {
   37.25        gr = P.gr;
   37.26        edges.insert(edges.end(), P.edges.begin()+a.idx, P.edges.begin()+b.idx);
   37.27      }
   37.28 @@ -418,7 +418,7 @@
   37.29      ///
   37.30      /// Subpath defined by two edges. Contains edges in [a,b)
   37.31      /// \warning It is an error if the two edges are not in order!
   37.32 -    UndirPath(const UndirPath &P, const EdgeIt &a, const EdgeIt &b) {
   37.33 +    UPath(const UPath &P, const EdgeIt &a, const EdgeIt &b) {
   37.34        gr = P.gr;
   37.35        edges.insert(edges.end(), P.edges.begin()+a.idx, P.edges.begin()+b.idx);
   37.36      }
   37.37 @@ -500,17 +500,17 @@
   37.38       * Yes, it shouldn't.
   37.39       */
   37.40      class EdgeIt {
   37.41 -      friend class UndirPath;
   37.42 +      friend class UPath;
   37.43  
   37.44        int idx;
   37.45 -      const UndirPath *p;
   37.46 +      const UPath *p;
   37.47      public:
   37.48        /// Default constructor
   37.49        EdgeIt() {}
   37.50        /// Invalid constructor
   37.51        EdgeIt(Invalid) : idx(-1), p(0) {}
   37.52        /// Constructor with starting point
   37.53 -      EdgeIt(const UndirPath &_p, int _idx = 0) :
   37.54 +      EdgeIt(const UPath &_p, int _idx = 0) :
   37.55  	idx(_idx), p(&_p) { validate(); }
   37.56  
   37.57        ///Validity check
   37.58 @@ -547,17 +547,17 @@
   37.59       * Yes, it shouldn't.
   37.60       */
   37.61      class NodeIt {
   37.62 -      friend class UndirPath;
   37.63 +      friend class UPath;
   37.64  
   37.65        int idx;
   37.66 -      const UndirPath *p;
   37.67 +      const UPath *p;
   37.68      public:
   37.69        /// Default constructor
   37.70        NodeIt() {}
   37.71        /// Invalid constructor
   37.72        NodeIt(Invalid) : idx(-1), p(0) {}
   37.73        /// Constructor with starting point
   37.74 -      NodeIt(const UndirPath &_p, int _idx = 0) :
   37.75 +      NodeIt(const UPath &_p, int _idx = 0) :
   37.76  	idx(_idx), p(&_p) { validate(); }
   37.77  
   37.78        ///Validity check
   37.79 @@ -600,17 +600,17 @@
   37.80       * PathConcept) while the builder is active (after the first modifying
   37.81       * operation and until the commit()) the original Path is in a
   37.82       * "transitional" state (operations ot it have undefined result). But
   37.83 -     * in the case of UndirPath the original path is unchanged until the
   37.84 +     * in the case of UPath the original path is unchanged until the
   37.85       * commit. However we don't recomend that you use this feature.
   37.86       */
   37.87      class Builder {
   37.88 -      UndirPath &P;
   37.89 +      UPath &P;
   37.90        Container front, back;
   37.91  
   37.92      public:
   37.93        ///\param _p the path you want to fill in.
   37.94        ///
   37.95 -      Builder(UndirPath &_p) : P(_p) {}
   37.96 +      Builder(UPath &_p) : P(_p) {}
   37.97  
   37.98        /// Sets the starting node of the path.
   37.99  
    38.1 --- a/lemon/smart_graph.h	Thu Jan 26 06:44:22 2006 +0000
    38.2 +++ b/lemon/smart_graph.h	Thu Jan 26 15:42:13 2006 +0000
    38.3 @@ -19,7 +19,7 @@
    38.4  
    38.5  ///\ingroup graphs
    38.6  ///\file
    38.7 -///\brief SmartGraph and UndirSmartGraph classes.
    38.8 +///\brief SmartGraph and SmartUGraph classes.
    38.9  
   38.10  #include <vector>
   38.11  
   38.12 @@ -353,35 +353,37 @@
   38.13  
   38.14    /**************** Undirected List Graph ****************/
   38.15  
   38.16 -  typedef ClearableUndirGraphExtender<
   38.17 -    ExtendableUndirGraphExtender<
   38.18 -    MappableUndirGraphExtender<
   38.19 -    IterableUndirGraphExtender<
   38.20 -    AlterableUndirGraphExtender<
   38.21 -    UndirGraphExtender<SmartGraphBase> > > > > > ExtendedUndirSmartGraphBase;
   38.22 +  typedef ClearableUGraphExtender<
   38.23 +    ExtendableUGraphExtender<
   38.24 +    MappableUGraphExtender<
   38.25 +    IterableUGraphExtender<
   38.26 +    AlterableUGraphExtender<
   38.27 +    UGraphExtender<SmartGraphBase> > > > > > ExtendedSmartUGraphBase;
   38.28  
   38.29 -  ///A smart undirected graph class.
   38.30 -
   38.31 -  ///This is a simple and fast undirected graph implementation.
   38.32 -  ///It is also quite memory efficient, but at the price
   38.33 -  ///that <b> it does support only limited (only stack-like)
   38.34 -  ///node and edge deletions</b>.
   38.35 -  ///Except from this it conforms to 
   38.36 -  ///the \ref concept::UndirGraph "UndirGraph" concept.
   38.37 -  ///\sa concept::UndirGraph.
   38.38 +  /// \ingroup graphs
   38.39    ///
   38.40 -  ///\todo Snapshot hasn't been implemented yet.
   38.41 +  /// \brief A smart undirected graph class.
   38.42    ///
   38.43 -  class UndirSmartGraph : public ExtendedUndirSmartGraphBase {
   38.44 +  /// This is a simple and fast undirected graph implementation.
   38.45 +  /// It is also quite memory efficient, but at the price
   38.46 +  /// that <b> it does support only limited (only stack-like)
   38.47 +  /// node and edge deletions</b>.
   38.48 +  /// Except from this it conforms to 
   38.49 +  /// the \ref concept::UGraph "UGraph" concept.
   38.50 +  /// \sa concept::UGraph.
   38.51 +  ///
   38.52 +  /// \todo Snapshot hasn't been implemented yet.
   38.53 +  ///
   38.54 +  class SmartUGraph : public ExtendedSmartUGraphBase {
   38.55    };
   38.56  
   38.57  
   38.58 -  class SmartUndirBipartiteGraphBase {
   38.59 +  class SmartUBipartiteGraphBase {
   38.60    public:
   38.61  
   38.62      class NodeSetError : public LogicError {
   38.63        virtual const char* exceptionName() const { 
   38.64 -	return "lemon::FullUndirBipartiteGraph::NodeSetError";
   38.65 +	return "lemon::FullUBipartiteGraph::NodeSetError";
   38.66        }
   38.67      };
   38.68  
   38.69 @@ -406,7 +408,7 @@
   38.70    public:
   38.71    
   38.72      class Node {
   38.73 -      friend class SmartUndirBipartiteGraphBase;
   38.74 +      friend class SmartUBipartiteGraphBase;
   38.75      protected:
   38.76        int id;
   38.77  
   38.78 @@ -420,7 +422,7 @@
   38.79      };
   38.80  
   38.81      class Edge {
   38.82 -      friend class SmartUndirBipartiteGraphBase;
   38.83 +      friend class SmartUBipartiteGraphBase;
   38.84      protected:
   38.85        int id;
   38.86  
   38.87 @@ -583,18 +585,18 @@
   38.88    };
   38.89  
   38.90  
   38.91 -  typedef ClearableUndirBipartiteGraphExtender<
   38.92 -    ExtendableUndirBipartiteGraphExtender<
   38.93 -    MappableUndirBipartiteGraphExtender<
   38.94 -    IterableUndirBipartiteGraphExtender<
   38.95 -    AlterableUndirBipartiteGraphExtender<
   38.96 -    UndirBipartiteGraphExtender <
   38.97 -    SmartUndirBipartiteGraphBase> > > > > >
   38.98 -  ExtendedSmartUndirBipartiteGraphBase;
   38.99 +  typedef ClearableUBipartiteGraphExtender<
  38.100 +    ExtendableUBipartiteGraphExtender<
  38.101 +    MappableUBipartiteGraphExtender<
  38.102 +    IterableUBipartiteGraphExtender<
  38.103 +    AlterableUBipartiteGraphExtender<
  38.104 +    UBipartiteGraphExtender <
  38.105 +    SmartUBipartiteGraphBase> > > > > >
  38.106 +  ExtendedSmartUBipartiteGraphBase;
  38.107  
  38.108  
  38.109 -  class SmartUndirBipartiteGraph : 
  38.110 -    public ExtendedSmartUndirBipartiteGraphBase {
  38.111 +  class SmartUBipartiteGraph : 
  38.112 +    public ExtendedSmartUBipartiteGraphBase {
  38.113    };
  38.114  
  38.115    
    39.1 --- a/lemon/sub_graph.h	Thu Jan 26 06:44:22 2006 +0000
    39.2 +++ b/lemon/sub_graph.h	Thu Jan 26 15:42:13 2006 +0000
    39.3 @@ -694,13 +694,13 @@
    39.4  // 	   typename CapacityMap, typename FlowMap>
    39.5  //   class ResGraph
    39.6  //     : public IterableGraphExtender<EdgeSubGraphBase<
    39.7 -//     UndirGraphAdaptor<Graph> > > {
    39.8 +//     UGraphAdaptor<Graph> > > {
    39.9  //   public:
   39.10  //     typedef IterableGraphExtender<EdgeSubGraphBase<
   39.11 -//       UndirGraphAdaptor<Graph> > > Parent;
   39.12 +//       UGraphAdaptor<Graph> > > Parent;
   39.13  
   39.14  //   protected:
   39.15 -//     UndirGraphAdaptor<Graph> undir;
   39.16 +//     UGraphAdaptor<Graph> u;
   39.17  
   39.18  //     const CapacityMap* capacity;
   39.19  //     FlowMap* flow;
   39.20 @@ -718,15 +718,15 @@
   39.21  
   39.22  //   public:
   39.23  
   39.24 -//     typedef typename UndirGraphAdaptor<Graph>::Node Node;
   39.25 -//     typedef typename UndirGraphAdaptor<Graph>::Edge Edge;
   39.26 -//     typedef typename UndirGraphAdaptor<Graph>::UndirEdge UndirEdge;
   39.27 +//     typedef typename UGraphAdaptor<Graph>::Node Node;
   39.28 +//     typedef typename UGraphAdaptor<Graph>::Edge Edge;
   39.29 +//     typedef typename UGraphAdaptor<Graph>::UEdge UEdge;
   39.30  
   39.31  //     ResGraphAdaptor(Graph& _graph, 
   39.32  // 		    const CapacityMap& _capacity, FlowMap& _flow) 
   39.33 -//       : Parent(), undir(_graph), capacity(&_capacity), flow(&_flow),
   39.34 +//       : Parent(), u(_graph), capacity(&_capacity), flow(&_flow),
   39.35  // 	nodes(*this, _graph), edges(*this, _graph) {
   39.36 -//       Parent::construct(undir, nodes, edges);
   39.37 +//       Parent::construct(u, nodes, edges);
   39.38  //       setFlowMap(_flow);
   39.39  //       setCapacityMap(_capacity);
   39.40  //       typename Graph::Edge edge; 
   39.41 @@ -770,11 +770,11 @@
   39.42  //       return Parent::getGraph().direction(edge);
   39.43  //     }
   39.44  
   39.45 -//     Edge direct(const UndirEdge& edge, bool direction) const {
   39.46 +//     Edge direct(const UEdge& edge, bool direction) const {
   39.47  //       return Parent::getGraph().direct(edge, direction);
   39.48  //     }
   39.49  
   39.50 -//     Edge direct(const UndirEdge& edge, const Node& node) const {
   39.51 +//     Edge direct(const UEdge& edge, const Node& node) const {
   39.52  //       return Parent::getGraph().direct(edge, node);
   39.53  //     }
   39.54  
    40.1 --- a/lemon/topology.h	Thu Jan 26 06:44:22 2006 +0000
    40.2 +++ b/lemon/topology.h	Thu Jan 26 15:42:13 2006 +0000
    40.3 @@ -24,7 +24,7 @@
    40.4  #include <lemon/maps.h>
    40.5  
    40.6  #include <lemon/concept/graph.h>
    40.7 -#include <lemon/concept/undir_graph.h>
    40.8 +#include <lemon/concept/ugraph.h>
    40.9  #include <lemon/concept_check.h>
   40.10  
   40.11  #include <lemon/bin_heap.h>
   40.12 @@ -49,12 +49,12 @@
   40.13    /// \param graph The undirected graph.
   40.14    /// \return %True when there is path between any two nodes in the graph.
   40.15    /// \note By definition, the empty graph is connected.
   40.16 -  template <typename UndirGraph>
   40.17 -  bool connected(const UndirGraph& graph) {
   40.18 -    checkConcept<concept::UndirGraph, UndirGraph>();
   40.19 -    typedef typename UndirGraph::NodeIt NodeIt;
   40.20 +  template <typename UGraph>
   40.21 +  bool connected(const UGraph& graph) {
   40.22 +    checkConcept<concept::UGraph, UGraph>();
   40.23 +    typedef typename UGraph::NodeIt NodeIt;
   40.24      if (NodeIt(graph) == INVALID) return true;
   40.25 -    Dfs<UndirGraph> dfs(graph);
   40.26 +    Dfs<UGraph> dfs(graph);
   40.27      dfs.run(NodeIt(graph));
   40.28      for (NodeIt it(graph); it != INVALID; ++it) {
   40.29        if (!dfs.reached(it)) {
   40.30 @@ -74,17 +74,17 @@
   40.31    /// \return The number of components
   40.32    /// \note By definition, the empty graph consists
   40.33    /// of zero connected components.
   40.34 -  template <typename UndirGraph>
   40.35 -  int countConnectedComponents(const UndirGraph &graph) {
   40.36 -    checkConcept<concept::UndirGraph, UndirGraph>();
   40.37 -    typedef typename UndirGraph::Node Node;
   40.38 -    typedef typename UndirGraph::Edge Edge;
   40.39 +  template <typename UGraph>
   40.40 +  int countConnectedComponents(const UGraph &graph) {
   40.41 +    checkConcept<concept::UGraph, UGraph>();
   40.42 +    typedef typename UGraph::Node Node;
   40.43 +    typedef typename UGraph::Edge Edge;
   40.44  
   40.45      typedef NullMap<Node, Edge> PredMap;
   40.46      typedef NullMap<Node, int> DistMap;
   40.47  
   40.48      int compNum = 0;
   40.49 -    typename Bfs<UndirGraph>::
   40.50 +    typename Bfs<UGraph>::
   40.51        template DefPredMap<PredMap>::
   40.52        template DefDistMap<DistMap>::
   40.53        Create bfs(graph);
   40.54 @@ -96,7 +96,7 @@
   40.55      bfs.distMap(distMap);
   40.56  
   40.57      bfs.init();
   40.58 -    for(typename UndirGraph::NodeIt n(graph); n != INVALID; ++n) {
   40.59 +    for(typename UGraph::NodeIt n(graph); n != INVALID; ++n) {
   40.60        if (!bfs.reached(n)) {
   40.61  	bfs.addSource(n);
   40.62  	bfs.start();
   40.63 @@ -122,18 +122,18 @@
   40.64    /// set continuously.
   40.65    /// \return The number of components
   40.66    ///
   40.67 -  template <class UndirGraph, class NodeMap>
   40.68 -  int connectedComponents(const UndirGraph &graph, NodeMap &compMap) {
   40.69 -    checkConcept<concept::UndirGraph, UndirGraph>();
   40.70 -    typedef typename UndirGraph::Node Node;
   40.71 -    typedef typename UndirGraph::Edge Edge;
   40.72 +  template <class UGraph, class NodeMap>
   40.73 +  int connectedComponents(const UGraph &graph, NodeMap &compMap) {
   40.74 +    checkConcept<concept::UGraph, UGraph>();
   40.75 +    typedef typename UGraph::Node Node;
   40.76 +    typedef typename UGraph::Edge Edge;
   40.77      checkConcept<concept::WriteMap<Node, int>, NodeMap>();
   40.78  
   40.79      typedef NullMap<Node, Edge> PredMap;
   40.80      typedef NullMap<Node, int> DistMap;
   40.81  
   40.82      int compNum = 0;
   40.83 -    typename Bfs<UndirGraph>::
   40.84 +    typename Bfs<UGraph>::
   40.85        template DefPredMap<PredMap>::
   40.86        template DefDistMap<DistMap>::
   40.87        Create bfs(graph);
   40.88 @@ -145,7 +145,7 @@
   40.89      bfs.distMap(distMap);
   40.90      
   40.91      bfs.init();
   40.92 -    for(typename UndirGraph::NodeIt n(graph); n != INVALID; ++n) {
   40.93 +    for(typename UGraph::NodeIt n(graph); n != INVALID; ++n) {
   40.94        if(!bfs.reached(n)) {
   40.95  	bfs.addSource(n);
   40.96  	while (!bfs.emptyQueue()) {
   40.97 @@ -484,7 +484,7 @@
   40.98      public:
   40.99        typedef typename Graph::Node Node;
  40.100        typedef typename Graph::Edge Edge;
  40.101 -      typedef typename Graph::UndirEdge UndirEdge;
  40.102 +      typedef typename Graph::UEdge UEdge;
  40.103  
  40.104        CountBiNodeConnectedComponentsVisitor(const Graph& graph, int &compNum) 
  40.105  	: _graph(graph), _compNum(compNum), 
  40.106 @@ -542,7 +542,7 @@
  40.107      public:
  40.108        typedef typename Graph::Node Node;
  40.109        typedef typename Graph::Edge Edge;
  40.110 -      typedef typename Graph::UndirEdge UndirEdge;
  40.111 +      typedef typename Graph::UEdge UEdge;
  40.112  
  40.113        BiNodeConnectedComponentsVisitor(const Graph& graph, 
  40.114  				       EdgeMap& compMap, int &compNum) 
  40.115 @@ -612,7 +612,7 @@
  40.116        typename Graph::template NodeMap<int> _numMap;
  40.117        typename Graph::template NodeMap<int> _retMap;
  40.118        typename Graph::template NodeMap<Edge> _predMap;
  40.119 -      std::stack<UndirEdge> _edgeStack;
  40.120 +      std::stack<UEdge> _edgeStack;
  40.121        int _num;
  40.122      };
  40.123  
  40.124 @@ -622,7 +622,7 @@
  40.125      public:
  40.126        typedef typename Graph::Node Node;
  40.127        typedef typename Graph::Edge Edge;
  40.128 -      typedef typename Graph::UndirEdge UndirEdge;
  40.129 +      typedef typename Graph::UEdge UEdge;
  40.130  
  40.131        BiNodeConnectedCutNodesVisitor(const Graph& graph, NodeMap& cutMap,
  40.132  				     int& cutNum) 
  40.133 @@ -688,15 +688,15 @@
  40.134        typename Graph::template NodeMap<int> _numMap;
  40.135        typename Graph::template NodeMap<int> _retMap;
  40.136        typename Graph::template NodeMap<Node> _predMap;
  40.137 -      std::stack<UndirEdge> _edgeStack;
  40.138 +      std::stack<UEdge> _edgeStack;
  40.139        int _num;
  40.140        bool rootCut;
  40.141      };
  40.142  
  40.143    }
  40.144  
  40.145 -  template <typename UndirGraph>
  40.146 -  int countBiNodeConnectedComponents(const UndirGraph& graph);
  40.147 +  template <typename UGraph>
  40.148 +  int countBiNodeConnectedComponents(const UGraph& graph);
  40.149  
  40.150    /// \ingroup topology
  40.151    ///
  40.152 @@ -709,8 +709,8 @@
  40.153    /// \param graph The graph.
  40.154    /// \return %True when the graph bi-node-connected.
  40.155    /// \todo Make it faster.
  40.156 -  template <typename UndirGraph>
  40.157 -  bool biNodeConnected(const UndirGraph& graph) {
  40.158 +  template <typename UGraph>
  40.159 +  bool biNodeConnected(const UGraph& graph) {
  40.160      return countBiNodeConnectedComponents(graph) == 1;
  40.161    }
  40.162  
  40.163 @@ -725,19 +725,19 @@
  40.164    ///
  40.165    /// \param graph The graph.
  40.166    /// \return The number of components.
  40.167 -  template <typename UndirGraph>
  40.168 -  int countBiNodeConnectedComponents(const UndirGraph& graph) {
  40.169 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.170 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.171 +  template <typename UGraph>
  40.172 +  int countBiNodeConnectedComponents(const UGraph& graph) {
  40.173 +    checkConcept<concept::UGraph, UGraph>();
  40.174 +    typedef typename UGraph::NodeIt NodeIt;
  40.175  
  40.176      using namespace _topology_bits;
  40.177  
  40.178 -    typedef CountBiNodeConnectedComponentsVisitor<UndirGraph> Visitor;
  40.179 +    typedef CountBiNodeConnectedComponentsVisitor<UGraph> Visitor;
  40.180  
  40.181      int compNum = 0;
  40.182      Visitor visitor(graph, compNum);
  40.183  
  40.184 -    DfsVisit<UndirGraph, Visitor> dfs(graph, visitor);
  40.185 +    DfsVisit<UGraph, Visitor> dfs(graph, visitor);
  40.186      dfs.init();
  40.187      
  40.188      for (NodeIt it(graph); it != INVALID; ++it) {
  40.189 @@ -762,28 +762,28 @@
  40.190    /// \image latex node_biconnected_components.eps "bi-node-connected components" width=\textwidth
  40.191    ///
  40.192    /// \param graph The graph.
  40.193 -  /// \retval compMap A writable undir edge map. The values will be set from 0
  40.194 +  /// \retval compMap A writable uedge map. The values will be set from 0
  40.195    /// to the number of the biconnected components minus one. Each values 
  40.196    /// of the map will be set exactly once, the values of a certain component 
  40.197    /// will be set continuously.
  40.198    /// \return The number of components.
  40.199    ///
  40.200 -  template <typename UndirGraph, typename UndirEdgeMap>
  40.201 -  int biNodeConnectedComponents(const UndirGraph& graph, 
  40.202 -				UndirEdgeMap& compMap) {
  40.203 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.204 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.205 -    typedef typename UndirGraph::UndirEdge UndirEdge;
  40.206 -    checkConcept<concept::WriteMap<UndirEdge, int>, UndirEdgeMap>();
  40.207 +  template <typename UGraph, typename UEdgeMap>
  40.208 +  int biNodeConnectedComponents(const UGraph& graph, 
  40.209 +				UEdgeMap& compMap) {
  40.210 +    checkConcept<concept::UGraph, UGraph>();
  40.211 +    typedef typename UGraph::NodeIt NodeIt;
  40.212 +    typedef typename UGraph::UEdge UEdge;
  40.213 +    checkConcept<concept::WriteMap<UEdge, int>, UEdgeMap>();
  40.214  
  40.215      using namespace _topology_bits;
  40.216  
  40.217 -    typedef BiNodeConnectedComponentsVisitor<UndirGraph, UndirEdgeMap> Visitor;
  40.218 +    typedef BiNodeConnectedComponentsVisitor<UGraph, UEdgeMap> Visitor;
  40.219      
  40.220      int compNum = 0;
  40.221      Visitor visitor(graph, compMap, compNum);
  40.222  
  40.223 -    DfsVisit<UndirGraph, Visitor> dfs(graph, visitor);
  40.224 +    DfsVisit<UGraph, Visitor> dfs(graph, visitor);
  40.225      dfs.init();
  40.226      
  40.227      for (NodeIt it(graph); it != INVALID; ++it) {
  40.228 @@ -809,21 +809,21 @@
  40.229    /// \retval cutMap A writable edge map. The values will be set true when
  40.230    /// the node separate two or more components.
  40.231    /// \return The number of the cut nodes.
  40.232 -  template <typename UndirGraph, typename NodeMap>
  40.233 -  int biNodeConnectedCutNodes(const UndirGraph& graph, NodeMap& cutMap) {
  40.234 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.235 -    typedef typename UndirGraph::Node Node;
  40.236 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.237 +  template <typename UGraph, typename NodeMap>
  40.238 +  int biNodeConnectedCutNodes(const UGraph& graph, NodeMap& cutMap) {
  40.239 +    checkConcept<concept::UGraph, UGraph>();
  40.240 +    typedef typename UGraph::Node Node;
  40.241 +    typedef typename UGraph::NodeIt NodeIt;
  40.242      checkConcept<concept::WriteMap<Node, bool>, NodeMap>();
  40.243  
  40.244      using namespace _topology_bits;
  40.245  
  40.246 -    typedef BiNodeConnectedCutNodesVisitor<UndirGraph, NodeMap> Visitor;
  40.247 +    typedef BiNodeConnectedCutNodesVisitor<UGraph, NodeMap> Visitor;
  40.248      
  40.249      int cutNum = 0;
  40.250      Visitor visitor(graph, cutMap, cutNum);
  40.251  
  40.252 -    DfsVisit<UndirGraph, Visitor> dfs(graph, visitor);
  40.253 +    DfsVisit<UGraph, Visitor> dfs(graph, visitor);
  40.254      dfs.init();
  40.255      
  40.256      for (NodeIt it(graph); it != INVALID; ++it) {
  40.257 @@ -842,7 +842,7 @@
  40.258      public:
  40.259        typedef typename Graph::Node Node;
  40.260        typedef typename Graph::Edge Edge;
  40.261 -      typedef typename Graph::UndirEdge UndirEdge;
  40.262 +      typedef typename Graph::UEdge UEdge;
  40.263  
  40.264        CountBiEdgeConnectedComponentsVisitor(const Graph& graph, int &compNum) 
  40.265  	: _graph(graph), _compNum(compNum), 
  40.266 @@ -898,7 +898,7 @@
  40.267      public:
  40.268        typedef typename Graph::Node Node;
  40.269        typedef typename Graph::Edge Edge;
  40.270 -      typedef typename Graph::UndirEdge UndirEdge;
  40.271 +      typedef typename Graph::UEdge UEdge;
  40.272  
  40.273        BiEdgeConnectedComponentsVisitor(const Graph& graph, 
  40.274  				       NodeMap& compMap, int &compNum) 
  40.275 @@ -965,7 +965,7 @@
  40.276      public:
  40.277        typedef typename Graph::Node Node;
  40.278        typedef typename Graph::Edge Edge;
  40.279 -      typedef typename Graph::UndirEdge UndirEdge;
  40.280 +      typedef typename Graph::UEdge UEdge;
  40.281  
  40.282        BiEdgeConnectedCutEdgesVisitor(const Graph& graph, 
  40.283  				     EdgeMap& cutMap, int &cutNum) 
  40.284 @@ -1022,8 +1022,8 @@
  40.285      };
  40.286    }
  40.287  
  40.288 -  template <typename UndirGraph>
  40.289 -  int countbiEdgeConnectedComponents(const UndirGraph& graph);
  40.290 +  template <typename UGraph>
  40.291 +  int countbiEdgeConnectedComponents(const UGraph& graph);
  40.292  
  40.293    /// \ingroup topology
  40.294    ///
  40.295 @@ -1036,8 +1036,8 @@
  40.296    /// \param graph The undirected graph.
  40.297    /// \return The number of components.
  40.298    /// \todo Make it faster.
  40.299 -  template <typename UndirGraph>
  40.300 -  bool biEdgeConnected(const UndirGraph& graph) { 
  40.301 +  template <typename UGraph>
  40.302 +  bool biEdgeConnected(const UGraph& graph) { 
  40.303      return countBiEdgeConnectedComponents(graph) == 1;
  40.304    }
  40.305  
  40.306 @@ -1052,19 +1052,19 @@
  40.307    ///
  40.308    /// \param graph The undirected graph.
  40.309    /// \return The number of components.
  40.310 -  template <typename UndirGraph>
  40.311 -  int countBiEdgeConnectedComponents(const UndirGraph& graph) { 
  40.312 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.313 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.314 +  template <typename UGraph>
  40.315 +  int countBiEdgeConnectedComponents(const UGraph& graph) { 
  40.316 +    checkConcept<concept::UGraph, UGraph>();
  40.317 +    typedef typename UGraph::NodeIt NodeIt;
  40.318  
  40.319      using namespace _topology_bits;
  40.320  
  40.321 -    typedef CountBiEdgeConnectedComponentsVisitor<UndirGraph> Visitor;
  40.322 +    typedef CountBiEdgeConnectedComponentsVisitor<UGraph> Visitor;
  40.323      
  40.324      int compNum = 0;
  40.325      Visitor visitor(graph, compNum);
  40.326  
  40.327 -    DfsVisit<UndirGraph, Visitor> dfs(graph, visitor);
  40.328 +    DfsVisit<UGraph, Visitor> dfs(graph, visitor);
  40.329      dfs.init();
  40.330      
  40.331      for (NodeIt it(graph); it != INVALID; ++it) {
  40.332 @@ -1095,21 +1095,21 @@
  40.333    /// will be set continuously.
  40.334    /// \return The number of components.
  40.335    ///
  40.336 -  template <typename UndirGraph, typename NodeMap>
  40.337 -  int biEdgeConnectedComponents(const UndirGraph& graph, NodeMap& compMap) { 
  40.338 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.339 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.340 -    typedef typename UndirGraph::Node Node;
  40.341 +  template <typename UGraph, typename NodeMap>
  40.342 +  int biEdgeConnectedComponents(const UGraph& graph, NodeMap& compMap) { 
  40.343 +    checkConcept<concept::UGraph, UGraph>();
  40.344 +    typedef typename UGraph::NodeIt NodeIt;
  40.345 +    typedef typename UGraph::Node Node;
  40.346      checkConcept<concept::WriteMap<Node, int>, NodeMap>();
  40.347  
  40.348      using namespace _topology_bits;
  40.349  
  40.350 -    typedef BiEdgeConnectedComponentsVisitor<UndirGraph, NodeMap> Visitor;
  40.351 +    typedef BiEdgeConnectedComponentsVisitor<UGraph, NodeMap> Visitor;
  40.352      
  40.353      int compNum = 0;
  40.354      Visitor visitor(graph, compMap, compNum);
  40.355  
  40.356 -    DfsVisit<UndirGraph, Visitor> dfs(graph, visitor);
  40.357 +    DfsVisit<UGraph, Visitor> dfs(graph, visitor);
  40.358      dfs.init();
  40.359      
  40.360      for (NodeIt it(graph); it != INVALID; ++it) {
  40.361 @@ -1136,21 +1136,21 @@
  40.362    /// \retval cutMap A writable node map. The values will be set true when the
  40.363    /// edge is a cut edge.
  40.364    /// \return The number of cut edges.
  40.365 -  template <typename UndirGraph, typename UndirEdgeMap>
  40.366 -  int biEdgeConnectedCutEdges(const UndirGraph& graph, UndirEdgeMap& cutMap) { 
  40.367 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.368 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.369 -    typedef typename UndirGraph::UndirEdge UndirEdge;
  40.370 -    checkConcept<concept::WriteMap<UndirEdge, bool>, UndirEdgeMap>();
  40.371 +  template <typename UGraph, typename UEdgeMap>
  40.372 +  int biEdgeConnectedCutEdges(const UGraph& graph, UEdgeMap& cutMap) { 
  40.373 +    checkConcept<concept::UGraph, UGraph>();
  40.374 +    typedef typename UGraph::NodeIt NodeIt;
  40.375 +    typedef typename UGraph::UEdge UEdge;
  40.376 +    checkConcept<concept::WriteMap<UEdge, bool>, UEdgeMap>();
  40.377  
  40.378      using namespace _topology_bits;
  40.379  
  40.380 -    typedef BiEdgeConnectedCutEdgesVisitor<UndirGraph, UndirEdgeMap> Visitor;
  40.381 +    typedef BiEdgeConnectedCutEdgesVisitor<UGraph, UEdgeMap> Visitor;
  40.382      
  40.383      int cutNum = 0;
  40.384      Visitor visitor(graph, cutMap, cutNum);
  40.385  
  40.386 -    DfsVisit<UndirGraph, Visitor> dfs(graph, visitor);
  40.387 +    DfsVisit<UGraph, Visitor> dfs(graph, visitor);
  40.388      dfs.init();
  40.389      
  40.390      for (NodeIt it(graph); it != INVALID; ++it) {
  40.391 @@ -1326,13 +1326,13 @@
  40.392    /// \param graph The undirected graph.
  40.393    /// \return %True when there is no circle in the graph.
  40.394    /// \see dag
  40.395 -  template <typename UndirGraph>
  40.396 -  bool acyclic(const UndirGraph& graph) {
  40.397 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.398 -    typedef typename UndirGraph::Node Node;
  40.399 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.400 -    typedef typename UndirGraph::Edge Edge;
  40.401 -    Dfs<UndirGraph> dfs(graph);
  40.402 +  template <typename UGraph>
  40.403 +  bool acyclic(const UGraph& graph) {
  40.404 +    checkConcept<concept::UGraph, UGraph>();
  40.405 +    typedef typename UGraph::Node Node;
  40.406 +    typedef typename UGraph::NodeIt NodeIt;
  40.407 +    typedef typename UGraph::Edge Edge;
  40.408 +    Dfs<UGraph> dfs(graph);
  40.409      dfs.init();
  40.410      for (NodeIt it(graph); it != INVALID; ++it) {
  40.411        if (!dfs.reached(it)) {
  40.412 @@ -1359,13 +1359,13 @@
  40.413    /// Check that the given undirected graph is tree.
  40.414    /// \param graph The undirected graph.
  40.415    /// \return %True when the graph is acyclic and connected.
  40.416 -  template <typename UndirGraph>
  40.417 -  bool tree(const UndirGraph& graph) {
  40.418 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.419 -    typedef typename UndirGraph::Node Node;
  40.420 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.421 -    typedef typename UndirGraph::Edge Edge;
  40.422 -    Dfs<UndirGraph> dfs(graph);
  40.423 +  template <typename UGraph>
  40.424 +  bool tree(const UGraph& graph) {
  40.425 +    checkConcept<concept::UGraph, UGraph>();
  40.426 +    typedef typename UGraph::Node Node;
  40.427 +    typedef typename UGraph::NodeIt NodeIt;
  40.428 +    typedef typename UGraph::Edge Edge;
  40.429 +    Dfs<UGraph> dfs(graph);
  40.430      dfs.init();
  40.431      dfs.addSource(NodeIt(graph));
  40.432      while (!dfs.emptyQueue()) {
  40.433 @@ -1397,14 +1397,14 @@
  40.434    /// \sa bipartitePartitions
  40.435    ///
  40.436    /// \author Balazs Attila Mihaly  
  40.437 -  template<typename UndirGraph>
  40.438 -  inline bool bipartite(const UndirGraph &graph){
  40.439 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.440 +  template<typename UGraph>
  40.441 +  inline bool bipartite(const UGraph &graph){
  40.442 +    checkConcept<concept::UGraph, UGraph>();
  40.443      
  40.444 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.445 -    typedef typename UndirGraph::EdgeIt EdgeIt;
  40.446 +    typedef typename UGraph::NodeIt NodeIt;
  40.447 +    typedef typename UGraph::EdgeIt EdgeIt;
  40.448      
  40.449 -    Bfs<UndirGraph> bfs(graph);
  40.450 +    Bfs<UGraph> bfs(graph);
  40.451      bfs.init();
  40.452      for(NodeIt i(graph);i!=INVALID;++i){
  40.453        if(!bfs.reached(i)){
  40.454 @@ -1434,15 +1434,15 @@
  40.455    ///
  40.456    /// \image html bipartite_partitions.png
  40.457    /// \image latex bipartite_partitions.eps "Bipartite partititions" width=\textwidth
  40.458 -  template<typename UndirGraph, typename NodeMap>
  40.459 -  inline bool bipartitePartitions(const UndirGraph &graph, NodeMap &partMap){
  40.460 -    checkConcept<concept::UndirGraph, UndirGraph>();
  40.461 +  template<typename UGraph, typename NodeMap>
  40.462 +  inline bool bipartitePartitions(const UGraph &graph, NodeMap &partMap){
  40.463 +    checkConcept<concept::UGraph, UGraph>();
  40.464      
  40.465 -    typedef typename UndirGraph::Node Node;
  40.466 -    typedef typename UndirGraph::NodeIt NodeIt;
  40.467 -    typedef typename UndirGraph::EdgeIt EdgeIt;
  40.468 +    typedef typename UGraph::Node Node;
  40.469 +    typedef typename UGraph::NodeIt NodeIt;
  40.470 +    typedef typename UGraph::EdgeIt EdgeIt;
  40.471    
  40.472 -    Bfs<UndirGraph> bfs(graph);
  40.473 +    Bfs<UGraph> bfs(graph);
  40.474      bfs.init();
  40.475      for(NodeIt i(graph);i!=INVALID;++i){
  40.476        if(!bfs.reached(i)){
    41.1 --- a/lemon/traits.h	Thu Jan 26 06:44:22 2006 +0000
    41.2 +++ b/lemon/traits.h	Thu Jan 26 15:42:13 2006 +0000
    41.3 @@ -72,18 +72,18 @@
    41.4    };
    41.5  
    41.6    template <typename _Graph>
    41.7 -  class ItemSetTraits<_Graph, typename _Graph::UndirEdge> {
    41.8 +  class ItemSetTraits<_Graph, typename _Graph::UEdge> {
    41.9    public:
   41.10      
   41.11      typedef _Graph Graph;
   41.12  
   41.13 -    typedef typename Graph::UndirEdge Item;
   41.14 -    typedef typename Graph::UndirEdgeIt ItemIt;
   41.15 +    typedef typename Graph::UEdge Item;
   41.16 +    typedef typename Graph::UEdgeIt ItemIt;
   41.17  
   41.18      template <typename _Value>
   41.19 -    class Map : public Graph::template UndirEdgeMap<_Value> {
   41.20 +    class Map : public Graph::template UEdgeMap<_Value> {
   41.21      public:
   41.22 -      typedef typename Graph::template UndirEdgeMap<_Value> Parent; 
   41.23 +      typedef typename Graph::template UEdgeMap<_Value> Parent; 
   41.24        typedef typename Parent::Value Value;
   41.25  
   41.26        Map(const Graph& _graph) : Parent(_graph) {}
    42.1 --- a/test/Makefile.am	Thu Jan 26 06:44:22 2006 +0000
    42.2 +++ b/test/Makefile.am	Thu Jan 26 15:42:13 2006 +0000
    42.3 @@ -33,7 +33,7 @@
    42.4  	test_tools_pass \
    42.5  	time_measure_test \
    42.6  	unionfind_test \
    42.7 -	undir_graph_test \
    42.8 +	ugraph_test \
    42.9  	xy_test \
   42.10  	heap_test
   42.11  
   42.12 @@ -70,7 +70,7 @@
   42.13  test_tools_pass_SOURCES = test_tools_pass.cc
   42.14  unionfind_test_SOURCES = unionfind_test.cc
   42.15  xy_test_SOURCES = xy_test.cc
   42.16 -undir_graph_test_SOURCES = undir_graph_test.cc
   42.17 +ugraph_test_SOURCES = ugraph_test.cc
   42.18  heap_test_SOURCES = heap_test.cc
   42.19  
   42.20  lp_test_SOURCES = lp_test.cc
    43.1 --- a/test/graph_adaptor_test.cc	Thu Jan 26 06:44:22 2006 +0000
    43.2 +++ b/test/graph_adaptor_test.cc	Thu Jan 26 15:42:13 2006 +0000
    43.3 @@ -19,7 +19,7 @@
    43.4  
    43.5  #include<lemon/smart_graph.h>
    43.6  #include<lemon/concept/graph.h>
    43.7 -#include<lemon/concept/undir_graph.h>
    43.8 +#include<lemon/concept/ugraph.h>
    43.9  
   43.10  #include<lemon/list_graph.h>
   43.11  #include<lemon/full_graph.h>
   43.12 @@ -65,9 +65,9 @@
   43.13        Graph::NodeMap<Graph::Edge> > >(); 
   43.14  
   43.15      /// \bug why does not compile with StaticGraph
   43.16 -    checkConcept<BaseIterableUndirGraphConcept, UndirGraphAdaptor<ListGraph> >();
   43.17 -    checkConcept<IterableUndirGraphConcept, UndirGraphAdaptor<ListGraph> >();
   43.18 -    checkConcept<MappableUndirGraphConcept, UndirGraphAdaptor<ListGraph> >();
   43.19 +    checkConcept<BaseIterableUGraphConcept, UGraphAdaptor<ListGraph> >();
   43.20 +    checkConcept<IterableUGraphConcept, UGraphAdaptor<ListGraph> >();
   43.21 +    checkConcept<MappableUGraphConcept, UGraphAdaptor<ListGraph> >();
   43.22    }
   43.23    std::cout << __FILE__ ": All tests passed.\n";
   43.24  
    44.1 --- a/test/max_matching_test.cc	Thu Jan 26 06:44:22 2006 +0000
    44.2 +++ b/test/max_matching_test.cc	Thu Jan 26 15:42:13 2006 +0000
    44.3 @@ -31,10 +31,10 @@
    44.4  
    44.5  int main() {
    44.6  
    44.7 -  typedef UndirListGraph Graph;
    44.8 +  typedef ListUGraph Graph;
    44.9  
   44.10    typedef Graph::Edge Edge;
   44.11 -  typedef Graph::UndirEdgeIt UndirEdgeIt;
   44.12 +  typedef Graph::UEdgeIt UEdgeIt;
   44.13    typedef Graph::IncEdgeIt IncEdgeIt;
   44.14    typedef Graph::NodeIt NodeIt;
   44.15    typedef Graph::Node Node;
   44.16 @@ -138,7 +138,7 @@
   44.17    check ( coincide, "The decompositions do not coincide! " );
   44.18  
   44.19    bool noedge=true;
   44.20 -  for(UndirEdgeIt e(g); e!=INVALID; ++e) {
   44.21 +  for(UEdgeIt e(g); e!=INVALID; ++e) {
   44.22     if ( (pos[g.target(e)]==max_matching.C && pos[g.source(e)]==max_matching.D) || 
   44.23  	 (pos[g.target(e)]==max_matching.D && pos[g.source(e)]==max_matching.C) )
   44.24        noedge=false; 
    45.1 --- a/test/path_test.cc	Thu Jan 26 06:44:22 2006 +0000
    45.2 +++ b/test/path_test.cc	Thu Jan 26 15:42:13 2006 +0000
    45.3 @@ -89,7 +89,7 @@
    45.4  
    45.5  template void checkCompilePath< concept::Path<ListGraph> >(concept::Path<ListGraph> &);
    45.6  template void checkCompilePath< DirPath<ListGraph> >(DirPath<ListGraph> &);
    45.7 -template void checkCompilePath< UndirPath<ListGraph> >(UndirPath<ListGraph> &);
    45.8 +template void checkCompilePath< UPath<ListGraph> >(UPath<ListGraph> &);
    45.9  
   45.10  int main() 
   45.11  {
    46.1 --- a/test/test_tools.h	Thu Jan 26 06:44:22 2006 +0000
    46.2 +++ b/test/test_tools.h	Thu Jan 26 15:42:13 2006 +0000
    46.3 @@ -133,22 +133,22 @@
    46.4    }  
    46.5  }
    46.6  
    46.7 -///Structure returned by \ref addUndirPetersen().
    46.8 +///Structure returned by \ref addUPetersen().
    46.9  
   46.10 -///Structure returned by \ref addUndirPetersen().
   46.11 +///Structure returned by \ref addUPetersen().
   46.12  ///
   46.13 -template<class Graph> struct UndirPetStruct
   46.14 +template<class Graph> struct UPetStruct
   46.15  {
   46.16    ///Vector containing the outer nodes.
   46.17    std::vector<typename Graph::Node> outer;
   46.18    ///Vector containing the inner nodes.
   46.19    std::vector<typename Graph::Node> inner;
   46.20    ///Vector containing the edges of the inner circle.
   46.21 -  std::vector<typename Graph::UndirEdge> incir;
   46.22 +  std::vector<typename Graph::UEdge> incir;
   46.23    ///Vector containing the edges of the outer circle.
   46.24 -  std::vector<typename Graph::UndirEdge> outcir;
   46.25 +  std::vector<typename Graph::UEdge> outcir;
   46.26    ///Vector containing the chord edges.
   46.27 -  std::vector<typename Graph::UndirEdge> chords;
   46.28 +  std::vector<typename Graph::UEdge> chords;
   46.29  };
   46.30  
   46.31  ///Adds a Petersen graph to the undirected \c G.
   46.32 @@ -157,9 +157,9 @@
   46.33  ///\return The nodes and edges of the generated graph.
   46.34  
   46.35  template<typename Graph>
   46.36 -UndirPetStruct<Graph> addUndirPetersen(Graph &G,int num=5)
   46.37 +UPetStruct<Graph> addUPetersen(Graph &G,int num=5)
   46.38  {
   46.39 -  UndirPetStruct<Graph> n;
   46.40 +  UPetStruct<Graph> n;
   46.41  
   46.42    for(int i=0;i<num;i++) {
   46.43      n.outer.push_back(G.addNode());
    47.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.2 +++ b/test/ugraph_test.cc	Thu Jan 26 15:42:13 2006 +0000
    47.3 @@ -0,0 +1,201 @@
    47.4 +// -*- C++ -*-
    47.5 +
    47.6 +#include <lemon/bits/graph_extender.h>
    47.7 +#include <lemon/concept/ugraph.h>
    47.8 +#include <lemon/list_graph.h>
    47.9 +#include <lemon/smart_graph.h>
   47.10 +#include <lemon/full_graph.h>
   47.11 +#include <lemon/grid_graph.h>
   47.12 +
   47.13 +#include <lemon/graph_utils.h>
   47.14 +
   47.15 +#include "test_tools.h"
   47.16 +
   47.17 +
   47.18 +using namespace lemon;
   47.19 +using namespace lemon::concept;
   47.20 +
   47.21 +void check_concepts() {
   47.22 +  typedef UGraphExtender<ListGraphBase> ListUGraphBase;
   47.23 +
   47.24 +  typedef IterableUGraphExtender<
   47.25 +    AlterableUGraphExtender<ListUGraphBase> > IterableListUGraph;
   47.26 +
   47.27 +  typedef MappableUGraphExtender<IterableListUGraph>
   47.28 +    MappableListUGraph;
   47.29 +
   47.30 +  typedef ErasableUGraphExtender<
   47.31 +    ClearableUGraphExtender<
   47.32 +    ExtendableUGraphExtender<MappableListUGraph> > > Graph;
   47.33 +
   47.34 +  checkConcept<BaseIterableUGraphConcept, Graph>();
   47.35 +  checkConcept<IterableUGraphConcept, Graph>();
   47.36 +  checkConcept<MappableUGraphConcept, Graph>();
   47.37 +
   47.38 +  checkConcept<UGraph, Graph>();
   47.39 +  checkConcept<ErasableUGraph, Graph>();
   47.40 +
   47.41 +  checkConcept<UGraph, ListUGraph>();
   47.42 +  checkConcept<ErasableUGraph, ListUGraph>();
   47.43 +
   47.44 +  checkConcept<UGraph, SmartUGraph>();
   47.45 +  checkConcept<ExtendableUGraph, SmartUGraph>();
   47.46 +
   47.47 +  checkConcept<UGraph, FullUGraph>();
   47.48 +
   47.49 +  checkConcept<UGraph, UGraph>();
   47.50 +
   47.51 +  checkConcept<UGraph, GridGraph>();
   47.52 +}
   47.53 +
   47.54 +template <typename Graph>
   47.55 +void check_item_counts(Graph &g, int n, int e) {
   47.56 +  int nn = 0;
   47.57 +  for (typename Graph::NodeIt it(g); it != INVALID; ++it) {
   47.58 +    ++nn;
   47.59 +  }
   47.60 +
   47.61 +  check(nn == n, "Wrong node number.");
   47.62 +  check(countNodes(g) == n, "Wrong node number.");
   47.63 +
   47.64 +  int ee = 0;
   47.65 +  for (typename Graph::EdgeIt it(g); it != INVALID; ++it) {
   47.66 +    ++ee;
   47.67 +  }
   47.68 +
   47.69 +  check(ee == 2*e, "Wrong edge number.");
   47.70 +  check(countEdges(g) == 2*e, "Wrong edge number.");
   47.71 +
   47.72 +  int uee = 0;
   47.73 +  for (typename Graph::UEdgeIt it(g); it != INVALID; ++it) {
   47.74 +    ++uee;
   47.75 +  }
   47.76 +
   47.77 +  check(uee == e, "Wrong uedge number.");
   47.78 +  check(countUEdges(g) == e, "Wrong uedge number.");
   47.79 +}
   47.80 +
   47.81 +template <typename Graph>
   47.82 +void print_items(Graph &g) {
   47.83 +
   47.84 +  typedef typename Graph::NodeIt NodeIt;
   47.85 +  typedef typename Graph::UEdgeIt UEdgeIt;
   47.86 +  typedef typename Graph::EdgeIt EdgeIt;
   47.87 +
   47.88 +  std::cout << "Nodes" << std::endl;
   47.89 +  int i=0;
   47.90 +  for(NodeIt it(g); it!=INVALID; ++it, ++i) {
   47.91 +    std::cout << "  " << i << ": " << g.id(it) << std::endl;
   47.92 +  }
   47.93 +
   47.94 +  std::cout << "UEdge" << std::endl;
   47.95 +  i=0;
   47.96 +  for(UEdgeIt it(g); it!=INVALID; ++it, ++i) {
   47.97 +    std::cout << "  " << i << ": " << g.id(it) 
   47.98 +	 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 
   47.99 +	 << ")" << std::endl;
  47.100 +  }
  47.101 +
  47.102 +  std::cout << "Edge" << std::endl;
  47.103 +  i=0;
  47.104 +  for(EdgeIt it(g); it!=INVALID; ++it, ++i) {
  47.105 +    std::cout << "  " << i << ": " << g.id(it)
  47.106 +	 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 
  47.107 +	 << ")" << std::endl;
  47.108 +  }
  47.109 +
  47.110 +}
  47.111 +
  47.112 +template <typename Graph>
  47.113 +void check_graph() {
  47.114 +
  47.115 +  typedef typename Graph::Node Node;
  47.116 +  typedef typename Graph::UEdge UEdge;
  47.117 +  typedef typename Graph::Edge Edge;
  47.118 +  typedef typename Graph::NodeIt NodeIt;
  47.119 +  typedef typename Graph::UEdgeIt UEdgeIt;
  47.120 +  typedef typename Graph::EdgeIt EdgeIt;
  47.121 +
  47.122 +  Graph g;
  47.123 +
  47.124 +  check_item_counts(g,0,0);
  47.125 +
  47.126 +  Node
  47.127 +    n1 = g.addNode(),
  47.128 +    n2 = g.addNode(),
  47.129 +    n3 = g.addNode();
  47.130 +
  47.131 +  UEdge
  47.132 +    e1 = g.addEdge(n1, n2),
  47.133 +    e2 = g.addEdge(n2, n3);
  47.134 +
  47.135 +  // print_items(g);
  47.136 +
  47.137 +  check_item_counts(g,3,2);
  47.138 +}
  47.139 +
  47.140 +void checkGridGraph(const GridGraph& g, int w, int h) {
  47.141 +  check(g.width() == w, "Wrong width");
  47.142 +  check(g.height() == h, "Wrong height");
  47.143 +
  47.144 +  for (int i = 0; i < w; ++i) {
  47.145 +    for (int j = 0; j < h; ++j) {
  47.146 +      check(g.col(g(i, j)) == i, "Wrong col");
  47.147 +      check(g.row(g(i, j)) == j, "Wrong row");
  47.148 +    }
  47.149 +  }
  47.150 +  
  47.151 +  for (int i = 0; i < w; ++i) {
  47.152 +    for (int j = 0; j < h - 1; ++j) {
  47.153 +      check(g.source(g.down(g(i, j))) == g(i, j), "Wrong down");
  47.154 +      check(g.target(g.down(g(i, j))) == g(i, j + 1), "Wrong down");
  47.155 +    }
  47.156 +    check(g.down(g(i, h - 1)) == INVALID, "Wrong down");
  47.157 +  }
  47.158 +
  47.159 +  for (int i = 0; i < w; ++i) {
  47.160 +    for (int j = 1; j < h; ++j) {
  47.161 +      check(g.source(g.up(g(i, j))) == g(i, j), "Wrong up");
  47.162 +      check(g.target(g.up(g(i, j))) == g(i, j - 1), "Wrong up");
  47.163 +    }
  47.164 +    check(g.up(g(i, 0)) == INVALID, "Wrong up");
  47.165 +  }
  47.166 +
  47.167 +  for (int j = 0; j < h; ++j) {
  47.168 +    for (int i = 0; i < w - 1; ++i) {
  47.169 +      check(g.source(g.right(g(i, j))) == g(i, j), "Wrong right");
  47.170 +      check(g.target(g.right(g(i, j))) == g(i + 1, j), "Wrong right");      
  47.171 +    }
  47.172 +    check(g.right(g(w - 1, j)) == INVALID, "Wrong right");    
  47.173 +  }
  47.174 +
  47.175 +  for (int j = 0; j < h; ++j) {
  47.176 +    for (int i = 1; i < w; ++i) {
  47.177 +      check(g.source(g.left(g(i, j))) == g(i, j), "Wrong left");
  47.178 +      check(g.target(g.left(g(i, j))) == g(i - 1, j), "Wrong left");      
  47.179 +    }
  47.180 +    check(g.left(g(0, j)) == INVALID, "Wrong left");    
  47.181 +  }
  47.182 +}
  47.183 +
  47.184 +int main() {
  47.185 +  check_concepts();
  47.186 +
  47.187 +  check_graph<ListUGraph>();
  47.188 +  check_graph<SmartUGraph>();
  47.189 +
  47.190 +  {
  47.191 +    FullUGraph g(5);
  47.192 +    check_item_counts(g, 5, 10);
  47.193 +  }
  47.194 +
  47.195 +  {
  47.196 +    GridGraph g(5, 6);
  47.197 +    check_item_counts(g, 30, 49);
  47.198 +    checkGridGraph(g, 5, 6);
  47.199 +  }
  47.200 +
  47.201 +  std::cout << __FILE__ ": All tests passed.\n";
  47.202 +
  47.203 +  return 0;
  47.204 +}
    48.1 --- a/test/undir_graph_test.cc	Thu Jan 26 06:44:22 2006 +0000
    48.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.3 @@ -1,201 +0,0 @@
    48.4 -// -*- C++ -*-
    48.5 -
    48.6 -#include <lemon/bits/graph_extender.h>
    48.7 -#include <lemon/concept/undir_graph.h>
    48.8 -#include <lemon/list_graph.h>
    48.9 -#include <lemon/smart_graph.h>
   48.10 -#include <lemon/full_graph.h>
   48.11 -#include <lemon/grid_graph.h>
   48.12 -
   48.13 -#include <lemon/graph_utils.h>
   48.14 -
   48.15 -#include "test_tools.h"
   48.16 -
   48.17 -
   48.18 -using namespace lemon;
   48.19 -using namespace lemon::concept;
   48.20 -
   48.21 -void check_concepts() {
   48.22 -  typedef UndirGraphExtender<ListGraphBase> UndirListGraphBase;
   48.23 -
   48.24 -  typedef IterableUndirGraphExtender<
   48.25 -    AlterableUndirGraphExtender<UndirListGraphBase> > IterableUndirListGraph;
   48.26 -
   48.27 -  typedef MappableUndirGraphExtender<IterableUndirListGraph>
   48.28 -    MappableUndirListGraph;
   48.29 -
   48.30 -  typedef ErasableUndirGraphExtender<
   48.31 -    ClearableUndirGraphExtender<
   48.32 -    ExtendableUndirGraphExtender<MappableUndirListGraph> > > Graph;
   48.33 -
   48.34 -  checkConcept<BaseIterableUndirGraphConcept, Graph>();
   48.35 -  checkConcept<IterableUndirGraphConcept, Graph>();
   48.36 -  checkConcept<MappableUndirGraphConcept, Graph>();
   48.37 -
   48.38 -  checkConcept<UndirGraph, Graph>();
   48.39 -  checkConcept<ErasableUndirGraph, Graph>();
   48.40 -
   48.41 -  checkConcept<UndirGraph, UndirListGraph>();
   48.42 -  checkConcept<ErasableUndirGraph, UndirListGraph>();
   48.43 -
   48.44 -  checkConcept<UndirGraph, UndirSmartGraph>();
   48.45 -  checkConcept<ExtendableUndirGraph, UndirSmartGraph>();
   48.46 -
   48.47 -  checkConcept<UndirGraph, UndirFullGraph>();
   48.48 -
   48.49 -  checkConcept<UndirGraph, UndirGraph>();
   48.50 -
   48.51 -  checkConcept<UndirGraph, GridGraph>();
   48.52 -}
   48.53 -
   48.54 -template <typename Graph>
   48.55 -void check_item_counts(Graph &g, int n, int e) {
   48.56 -  int nn = 0;
   48.57 -  for (typename Graph::NodeIt it(g); it != INVALID; ++it) {
   48.58 -    ++nn;
   48.59 -  }
   48.60 -
   48.61 -  check(nn == n, "Wrong node number.");
   48.62 -  check(countNodes(g) == n, "Wrong node number.");
   48.63 -
   48.64 -  int ee = 0;
   48.65 -  for (typename Graph::EdgeIt it(g); it != INVALID; ++it) {
   48.66 -    ++ee;
   48.67 -  }
   48.68 -
   48.69 -  check(ee == 2*e, "Wrong edge number.");
   48.70 -  check(countEdges(g) == 2*e, "Wrong edge number.");
   48.71 -
   48.72 -  int uee = 0;
   48.73 -  for (typename Graph::UndirEdgeIt it(g); it != INVALID; ++it) {
   48.74 -    ++uee;
   48.75 -  }
   48.76 -
   48.77 -  check(uee == e, "Wrong undir edge number.");
   48.78 -  check(countUndirEdges(g) == e, "Wrong undir edge number.");
   48.79 -}
   48.80 -
   48.81 -template <typename Graph>
   48.82 -void print_items(Graph &g) {
   48.83 -
   48.84 -  typedef typename Graph::NodeIt NodeIt;
   48.85 -  typedef typename Graph::UndirEdgeIt UEdgeIt;
   48.86 -  typedef typename Graph::EdgeIt EdgeIt;
   48.87 -
   48.88 -  std::cout << "Nodes" << std::endl;
   48.89 -  int i=0;
   48.90 -  for(NodeIt it(g); it!=INVALID; ++it, ++i) {
   48.91 -    std::cout << "  " << i << ": " << g.id(it) << std::endl;
   48.92 -  }
   48.93 -
   48.94 -  std::cout << "UndirEdge" << std::endl;
   48.95 -  i=0;
   48.96 -  for(UEdgeIt it(g); it!=INVALID; ++it, ++i) {
   48.97 -    std::cout << "  " << i << ": " << g.id(it) 
   48.98 -	 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 
   48.99 -	 << ")" << std::endl;
  48.100 -  }
  48.101 -
  48.102 -  std::cout << "Edge" << std::endl;
  48.103 -  i=0;
  48.104 -  for(EdgeIt it(g); it!=INVALID; ++it, ++i) {
  48.105 -    std::cout << "  " << i << ": " << g.id(it)
  48.106 -	 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 
  48.107 -	 << ")" << std::endl;
  48.108 -  }
  48.109 -
  48.110 -}
  48.111 -
  48.112 -template <typename Graph>
  48.113 -void check_graph() {
  48.114 -
  48.115 -  typedef typename Graph::Node Node;
  48.116 -  typedef typename Graph::UndirEdge UEdge;
  48.117 -  typedef typename Graph::Edge Edge;
  48.118 -  typedef typename Graph::NodeIt NodeIt;
  48.119 -  typedef typename Graph::UndirEdgeIt UEdgeIt;
  48.120 -  typedef typename Graph::EdgeIt EdgeIt;
  48.121 -
  48.122 -  Graph g;
  48.123 -
  48.124 -  check_item_counts(g,0,0);
  48.125 -
  48.126 -  Node
  48.127 -    n1 = g.addNode(),
  48.128 -    n2 = g.addNode(),
  48.129 -    n3 = g.addNode();
  48.130 -
  48.131 -  UEdge
  48.132 -    e1 = g.addEdge(n1, n2),
  48.133 -    e2 = g.addEdge(n2, n3);
  48.134 -
  48.135 -  // print_items(g);
  48.136 -
  48.137 -  check_item_counts(g,3,2);
  48.138 -}
  48.139 -
  48.140 -void checkGridGraph(const GridGraph& g, int w, int h) {
  48.141 -  check(g.width() == w, "Wrong width");
  48.142 -  check(g.height() == h, "Wrong height");
  48.143 -
  48.144 -  for (int i = 0; i < w; ++i) {
  48.145 -    for (int j = 0; j < h; ++j) {
  48.146 -      check(g.col(g(i, j)) == i, "Wrong col");
  48.147 -      check(g.row(g(i, j)) == j, "Wrong row");
  48.148 -    }
  48.149 -  }
  48.150 -  
  48.151 -  for (int i = 0; i < w; ++i) {
  48.152 -    for (int j = 0; j < h - 1; ++j) {
  48.153 -      check(g.source(g.down(g(i, j))) == g(i, j), "Wrong down");
  48.154 -      check(g.target(g.down(g(i, j))) == g(i, j + 1), "Wrong down");
  48.155 -    }
  48.156 -    check(g.down(g(i, h - 1)) == INVALID, "Wrong down");
  48.157 -  }
  48.158 -
  48.159 -  for (int i = 0; i < w; ++i) {
  48.160 -    for (int j = 1; j < h; ++j) {
  48.161 -      check(g.source(g.up(g(i, j))) == g(i, j), "Wrong up");
  48.162 -      check(g.target(g.up(g(i, j))) == g(i, j - 1), "Wrong up");
  48.163 -    }
  48.164 -    check(g.up(g(i, 0)) == INVALID, "Wrong up");
  48.165 -  }
  48.166 -
  48.167 -  for (int j = 0; j < h; ++j) {
  48.168 -    for (int i = 0; i < w - 1; ++i) {
  48.169 -      check(g.source(g.right(g(i, j))) == g(i, j), "Wrong right");
  48.170 -      check(g.target(g.right(g(i, j))) == g(i + 1, j), "Wrong right");      
  48.171 -    }
  48.172 -    check(g.right(g(w - 1, j)) == INVALID, "Wrong right");    
  48.173 -  }
  48.174 -
  48.175 -  for (int j = 0; j < h; ++j) {
  48.176 -    for (int i = 1; i < w; ++i) {
  48.177 -      check(g.source(g.left(g(i, j))) == g(i, j), "Wrong left");
  48.178 -      check(g.target(g.left(g(i, j))) == g(i - 1, j), "Wrong left");      
  48.179 -    }
  48.180 -    check(g.left(g(0, j)) == INVALID, "Wrong left");    
  48.181 -  }
  48.182 -}
  48.183 -
  48.184 -int main() {
  48.185 -  check_concepts();
  48.186 -
  48.187 -  check_graph<UndirListGraph>();
  48.188 -  check_graph<UndirSmartGraph>();
  48.189 -
  48.190 -  {
  48.191 -    UndirFullGraph g(5);
  48.192 -    check_item_counts(g, 5, 10);
  48.193 -  }
  48.194 -
  48.195 -  {
  48.196 -    GridGraph g(5, 6);
  48.197 -    check_item_counts(g, 30, 49);
  48.198 -    checkGridGraph(g, 5, 6);
  48.199 -  }
  48.200 -
  48.201 -  std::cout << __FILE__ ": All tests passed.\n";
  48.202 -
  48.203 -  return 0;
  48.204 -}