COIN-OR::LEMON - Graph Library

Changeset 1909:2d806130e700 in lemon-0.x


Ignore:
Timestamp:
01/26/06 16:42:13 (14 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
Message:

Undir -> U transition

Files:
44 edited
2 moved

Legend:

Unmodified
Added
Removed
  • demo/coloring.cc

    r1875 r1909  
    4141int main() {
    4242
    43   typedef UndirSmartGraph Graph;
     43  typedef SmartUGraph Graph;
    4444  typedef Graph::Node Node;
    4545  typedef Graph::NodeIt NodeIt;
    46   typedef Graph::UndirEdge UndirEdge;
     46  typedef Graph::UEdge UEdge;
    4747  typedef Graph::IncEdgeIt IncEdgeIt;
    4848
     
    5353  Graph graph;
    5454
    55   UndirGraphReader<Graph> reader("coloring.lgf", graph);
     55  UGraphReader<Graph> reader("coloring.lgf", graph);
    5656  Graph::NodeMap<xy<double> > coords(graph);
    5757  reader.readNodeMap("coords", coords);
  • demo/coloring.lgf

    r1901 r1909  
    1212(157, -150)     1       
    1313(-282, -149)    0       
    14 @undiredgeset
     14@uedgeset
    1515                label   
    16169       10      17     
  • demo/partitions.lgf

    r1901 r1909  
    2424-607.82         -246.651        2       
    2525-274            -131            1       
    26 @undiredgeset
     26@uedgeset
    2727                label   
    282812      23      15     
  • demo/topology_demo.cc

    r1875 r1909  
    4444
    4545void drawConnectedComponents() {
    46   typedef UndirListGraph Graph;
     46  typedef ListUGraph Graph;
    4747  typedef Graph::Node Node;
    4848
     
    5050  Graph::NodeMap<xy<double> > coords(graph);
    5151
    52   UndirGraphReader<Graph>("undir_components.lgf", graph).
     52  UGraphReader<Graph>("u_components.lgf", graph).
    5353    readNodeMap("coordinates_x", xMap(coords)).
    5454    readNodeMap("coordinates_y", yMap(coords)).
     
    6060  connectedComponents(graph, compMap);
    6161
    62   graphToEps(graph, "connected_components.eps").undir().
     62  graphToEps(graph, "connected_components.eps").u().
    6363    coords(coords).scaleToA4().enableParallel().
    6464    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
     
    9898
    9999void drawNodeBiconnectedComponents() {
    100   typedef UndirListGraph Graph;
     100  typedef ListUGraph Graph;
    101101  typedef Graph::Node Node;
    102   typedef Graph::UndirEdge UndirEdge;
     102  typedef Graph::UEdge UEdge;
    103103
    104104  Graph graph;
    105105  Graph::NodeMap<xy<double> > coords(graph);
    106106
    107   UndirGraphReader<Graph>("undir_components.lgf", graph).
     107  UGraphReader<Graph>("u_components.lgf", graph).
    108108    readNodeMap("coordinates_x", xMap(coords)).
    109109    readNodeMap("coordinates_y", yMap(coords)).
     
    112112  ColorSet colorSet;
    113113
    114   Graph::UndirEdgeMap<int> compMap(graph);
     114  Graph::UEdgeMap<int> compMap(graph);
    115115  Graph::NodeMap<bool> cutMap(graph);
    116116  biNodeConnectedComponents(graph, compMap);
    117117  biNodeConnectedCutNodes(graph, cutMap);
    118   graphToEps(graph, "bi_node_connected_components.eps").undir().
     118  graphToEps(graph, "bi_node_connected_components.eps").u().
    119119    coords(coords).scaleToA4().enableParallel().
    120120    parEdgeDist(20.0).edgeWidthScale(5.0).nodeScale(20.0).
     
    127127
    128128void drawEdgeBiconnectedComponents() {
    129   typedef UndirListGraph Graph;
     129  typedef ListUGraph Graph;
    130130  typedef Graph::Node Node;
    131   typedef Graph::UndirEdge UndirEdge;
     131  typedef Graph::UEdge UEdge;
    132132
    133133  Graph graph;
    134134  Graph::NodeMap<xy<double> > coords(graph);
    135135
    136   UndirGraphReader<Graph>("undir_components.lgf", graph).
     136  UGraphReader<Graph>("u_components.lgf", graph).
    137137    readNodeMap("coordinates_x", xMap(coords)).
    138138    readNodeMap("coordinates_y", yMap(coords)).
     
    142142
    143143  Graph::NodeMap<int> compMap(graph);
    144   Graph::UndirEdgeMap<bool> cutMap(graph);
     144  Graph::UEdgeMap<bool> cutMap(graph);
    145145  biEdgeConnectedComponents(graph, compMap);
    146146  biEdgeConnectedCutEdges(graph, cutMap);
    147147
    148   graphToEps(graph, "bi_edge_connected_components.eps").undir().
     148  graphToEps(graph, "bi_edge_connected_components.eps").u().
    149149    coords(coords).scaleToA4().enableParallel().
    150150    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
     
    156156
    157157void drawBipartitePartitions() {
    158   typedef UndirListGraph Graph;
     158  typedef ListUGraph Graph;
    159159  typedef Graph::Node Node;
    160   typedef Graph::UndirEdge UndirEdge;
     160  typedef Graph::UEdge UEdge;
    161161
    162162  Graph graph;
    163163  Graph::NodeMap<xy<double> > coords(graph);
    164164
    165   UndirGraphReader<Graph>("partitions.lgf", graph).
     165  UGraphReader<Graph>("partitions.lgf", graph).
    166166    readNodeMap("coordinates_x", xMap(coords)).
    167167    readNodeMap("coordinates_y", yMap(coords)).
     
    173173  bipartitePartitions(graph, partMap);
    174174
    175   graphToEps(graph, "bipartite_partitions.eps").undir().
     175  graphToEps(graph, "bipartite_partitions.eps").u().
    176176    coords(coords).scaleToA4().enableParallel().
    177177    parEdgeDist(20.0).edgeWidthScale(2.0).nodeScale(20.0).
  • demo/undir_components.lgf

    r1901 r1909  
    4444-689.204        -237.261        32     
    4545-567.302        43.6423 33     
    46 @undiredgeset
     46@uedgeset
    4747                label   
    484841      42      44     
  • doc/Makefile.am

    r1671 r1909  
    2020        namespaces.dox \
    2121        quicktour.dox \
    22         undir_graphs.dox
     22        ugraphs.dox
    2323
    2424html/index.html:
  • doc/graph_io.dox

    r1901 r1909  
    318318The specialization of writing is very similar to that of reading.
    319319
    320 \section undir Undirected graphs
    321 
    322 In a file describing an undirected graph (undir graph, for short) you find an
    323 \c undiredgeset section instead of the \c edgeset section. The first line of
     320\section u Undirected graphs
     321
     322In a file describing an undirected graph (ugraph, for short) you find an
     323\c uedgeset section instead of the \c edgeset section. The first line of
    324324the section describes the names of the maps on the undirected egdes and all
    325325next lines describe one undirected edge with the the incident nodes and the
     
    331331
    332332\code
    333 @undiredgeset
     333@uedgeset
    334334             label      capacity        +flow   -flow
    33533532   2       1          4.3             2.0     0.0
     
    338338\endcode
    339339
    340 The \c edges section is changed to \c undiredges section. This section
     340The \c edges section is changed to \c uedges section. This section
    341341describes labeled edges and undirected edges. The directed edge label
    342342should start with a \c '+' or a \c '-' prefix to decide the direction
     
    344344
    345345\code
    346 @undiredges
    347 undiredge 1
     346@uedges
     347uedge 1
    348348+edge 5
    349349-back 5
     
    353353\ref lemon::GraphWriter "GraphWriter" which
    354354handle the undirected graphs. These classes are
    355 the \ref lemon::UndirGraphReader "UndirGraphReader"
    356 and \ref lemon::UndirGraphWriter "UndirGraphWriter".
    357 
    358 The \ref lemon::UndirGraphReader::readUndirEdgeMap() "readUndirEdgeMap()"
     355the \ref lemon::UGraphReader "UGraphReader"
     356and \ref lemon::UGraphWriter "UGraphWriter".
     357
     358The \ref lemon::UGraphReader::readUEdgeMap() "readUEdgeMap()"
    359359function reads an undirected map and the
    360 \ref lemon::UndirGraphReader::readUndirEdge() "readUndirEdge()"
     360\ref lemon::UGraphReader::readUEdge() "readUEdge()"
    361361reads an undirected edge from the file,
    362362
    363363\code
    364 reader.readUndirEdgeMap("capacity", capacityMap);
     364reader.readUEdgeMap("capacity", capacityMap);
    365365reader.readEdgeMap("flow", flowMap);
    366366...
    367 reader.readUndirEdge("undir_edge", undir_edge);
     367reader.readUEdge("u_edge", u_edge);
    368368reader.readEdge("edge", edge);
    369369\endcode
     
    440440
    441441\code
    442 UndirListGraph network;
    443 UndirListGraph::UndirEdgeMap<double> capacity;
    444 ListEdgeSet<UndirListGraph> traffic(network);
    445 ListEdgeSet<UndirListGraph>::EdgeMap<double> request(network);
     442ListUGraph network;
     443ListUGraph::UEdgeMap<double> capacity;
     444ListEdgeSet<ListUGraph> traffic(network);
     445ListEdgeSet<ListUGraph>::EdgeMap<double> request(network);
    446446
    447447LemonReader reader(std::cin);
    448 NodeSetReader<UndirListGraph> nodesetReader(reader, network);
    449 UndirEdgeSetReader<UndirListGraph>
    450   undirEdgesetReader(reader, network, nodesetReader);
    451 undirEdgesetReader.readEdgeMap("capacity", capacity);
    452 EdgeSetReader<ListEdgeSet<UndirListGraph> >
     448NodeSetReader<ListUGraph> nodesetReader(reader, network);
     449UEdgeSetReader<ListUGraph>
     450  uEdgesetReader(reader, network, nodesetReader);
     451uEdgesetReader.readEdgeMap("capacity", capacity);
     452EdgeSetReader<ListEdgeSet<ListUGraph> >
    453453  edgesetReader(reader, traffic, nodesetReader, "traffic");
    454454edgesetReader.readEdgeMap("request", request);
     
    458458
    459459Because both the \ref lemon::GraphReader "GraphReader"
    460 and the \ref lemon::UndirGraphReader "UndirGraphReader" can be converted
     460and the \ref lemon::UGraphReader "UGraphReader" can be converted
    461461to \ref lemon::LemonReader "LemonReader"
    462462and it can resolve the label's of the items, the previous
    463 result can be achived with the \ref lemon::UndirGraphReader "UndirGraphReader"
     463result can be achived with the \ref lemon::UGraphReader "UGraphReader"
    464464class, too.
    465465
    466466
    467467\code
    468 UndirListGraph network;
    469 UndirListGraph::UndirEdgeSet<double> capacity;
    470 ListEdgeSet<UndirListGraph> traffic(network);
    471 ListEdgeSet<UndirListGraph>::EdgeMap<double> request(network);
    472 
    473 UndirGraphReader<UndirListGraph> reader(std::cin, network);
     468ListUGraph network;
     469ListUGraph::UEdgeSet<double> capacity;
     470ListEdgeSet<ListUGraph> traffic(network);
     471ListEdgeSet<ListUGraph>::EdgeMap<double> request(network);
     472
     473UGraphReader<ListUGraph> reader(std::cin, network);
    474474reader.readEdgeMap("capacity", capacity);
    475 EdgeSetReader<ListEdgeSet<UndirListGraph> >
     475EdgeSetReader<ListEdgeSet<ListUGraph> >
    476476  edgesetReader(reader, traffic, reader, "traffic");
    477477edgesetReader.readEdgeMap("request", request);
  • doc/undir_graphs.dox

    r1030 r1909  
    11/*!
    22
    3 \page undir_graphs Undirected graph structures
     3\page ugraphs Undirected graph structures
    44
    55The primary data structures of LEMON are the graph classes.
  • lemon/Makefile.am

    r1866 r1909  
    9191        concept/graph.h \
    9292        concept/graph_component.h \
    93         concept/undir_graph.h \
     93        concept/ugraph.h \
    9494        concept/matrix_maps.h \
    9595        concept/maps.h \
  • lemon/bits/alteration_notifier.h

    r1875 r1909  
    443443
    444444  template <typename _Base>
    445   class AlterableUndirGraphExtender
     445  class AlterableUGraphExtender
    446446    : public AlterableGraphExtender<_Base> {
    447447  public:
    448448
    449     typedef AlterableUndirGraphExtender Graph;
     449    typedef AlterableUGraphExtender Graph;
    450450    typedef AlterableGraphExtender<_Base> Parent;
    451451
    452     typedef typename Parent::UndirEdge UndirEdge;
     452    typedef typename Parent::UEdge UEdge;
    453453
    454454    /// The edge observer registry.
    455     typedef AlterationNotifier<UndirEdge> UndirEdgeNotifier;
    456 
    457   protected:
    458 
    459     mutable UndirEdgeNotifier undir_edge_notifier;
     455    typedef AlterationNotifier<UEdge> UEdgeNotifier;
     456
     457  protected:
     458
     459    mutable UEdgeNotifier u_edge_notifier;
    460460
    461461  public:
    462462
    463463    using Parent::getNotifier;
    464     UndirEdgeNotifier& getNotifier(UndirEdge) const {
    465       return undir_edge_notifier;
    466     }
    467 
    468     ~AlterableUndirGraphExtender() {
    469       undir_edge_notifier.clear();
     464    UEdgeNotifier& getNotifier(UEdge) const {
     465      return u_edge_notifier;
     466    }
     467
     468    ~AlterableUGraphExtender() {
     469      u_edge_notifier.clear();
    470470    }
    471471  };
    472472
    473473  template <typename _Base>
    474   class AlterableUndirEdgeSetExtender
     474  class AlterableUEdgeSetExtender
    475475    : public AlterableEdgeSetExtender<_Base> {
    476476  public:
    477477
    478     typedef AlterableUndirEdgeSetExtender Graph;
     478    typedef AlterableUEdgeSetExtender Graph;
    479479    typedef AlterableEdgeSetExtender<_Base> Parent;
    480480
    481     typedef typename Parent::UndirEdge UndirEdge;
    482 
    483     typedef AlterationNotifier<UndirEdge> UndirEdgeNotifier;
    484 
    485   protected:
    486 
    487     mutable UndirEdgeNotifier undir_edge_notifier;
     481    typedef typename Parent::UEdge UEdge;
     482
     483    typedef AlterationNotifier<UEdge> UEdgeNotifier;
     484
     485  protected:
     486
     487    mutable UEdgeNotifier u_edge_notifier;
    488488
    489489  public:
    490490
    491491    using Parent::getNotifier;
    492     UndirEdgeNotifier& getNotifier(UndirEdge) const {
    493       return undir_edge_notifier;
    494     }
    495 
    496     ~AlterableUndirEdgeSetExtender() {
    497       undir_edge_notifier.clear();
     492    UEdgeNotifier& getNotifier(UEdge) const {
     493      return u_edge_notifier;
     494    }
     495
     496    ~AlterableUEdgeSetExtender() {
     497      u_edge_notifier.clear();
    498498    }
    499499  };
     
    502502
    503503  template <typename _Base>
    504   class AlterableUndirBipartiteGraphExtender : public _Base {
     504  class AlterableUBipartiteGraphExtender : public _Base {
    505505  public:
    506506
    507507    typedef _Base Parent;
    508     typedef AlterableUndirBipartiteGraphExtender Graph;
     508    typedef AlterableUBipartiteGraphExtender Graph;
    509509 
    510510    typedef typename Parent::Node Node;
     
    512512    typedef typename Parent::UpperNode UpperNode;
    513513    typedef typename Parent::Edge Edge;
    514     typedef typename Parent::UndirEdge UndirEdge;
     514    typedef typename Parent::UEdge UEdge;
    515515 
    516516 
     
    519519    typedef AlterationNotifier<UpperNode> UpperNodeNotifier;
    520520    typedef AlterationNotifier<Edge> EdgeNotifier;
    521     typedef AlterationNotifier<UndirEdge> UndirEdgeNotifier;
     521    typedef AlterationNotifier<UEdge> UEdgeNotifier;
    522522
    523523  protected:
     
    527527    mutable UpperNodeNotifier upperNodeNotifier;
    528528    mutable EdgeNotifier edgeNotifier;
    529     mutable UndirEdgeNotifier undirEdgeNotifier;
     529    mutable UEdgeNotifier uEdgeNotifier;
    530530
    531531  public:
     
    547547    }
    548548
    549     UndirEdgeNotifier& getNotifier(UndirEdge) const {
    550       return undirEdgeNotifier;
    551     }
    552 
    553     ~AlterableUndirBipartiteGraphExtender() {
     549    UEdgeNotifier& getNotifier(UEdge) const {
     550      return uEdgeNotifier;
     551    }
     552
     553    ~AlterableUBipartiteGraphExtender() {
    554554      nodeNotifier.clear();
    555555      lowerNodeNotifier.clear();
    556556      upperNodeNotifier.clear();
    557557      edgeNotifier.clear();
    558       undirEdgeNotifier.clear();
     558      uEdgeNotifier.clear();
    559559    }
    560560
  • lemon/bits/clearable_graph_extender.h

    r1842 r1909  
    4343
    4444  template <typename _Base>
    45   class ClearableUndirGraphExtender : public _Base {
     45  class ClearableUGraphExtender : public _Base {
    4646  public:
    4747
    48     typedef ClearableUndirGraphExtender Graph;
     48    typedef ClearableUGraphExtender Graph;
    4949    typedef _Base Parent;
    5050    typedef typename Parent::Node Node;
    51     typedef typename Parent::UndirEdge UndirEdge;
     51    typedef typename Parent::UEdge UEdge;
    5252    typedef typename Parent::Edge Edge;
    5353
    5454    void clear() {
    5555      Parent::getNotifier(Node()).clear();
    56       Parent::getNotifier(UndirEdge()).clear();
     56      Parent::getNotifier(UEdge()).clear();
    5757      Parent::getNotifier(Edge()).clear();
    5858      Parent::clear();
     
    6161
    6262  template <typename _Base>
    63   class ClearableUndirEdgeSetExtender : public _Base {
     63  class ClearableUEdgeSetExtender : public _Base {
    6464  public:
    6565
    66     typedef ClearableUndirEdgeSetExtender Graph;
     66    typedef ClearableUEdgeSetExtender Graph;
    6767    typedef _Base Parent;
    6868    typedef typename Parent::Node Node;
    69     typedef typename Parent::UndirEdge UndirEdge;
     69    typedef typename Parent::UEdge UEdge;
    7070    typedef typename Parent::Edge Edge;
    7171
    7272    void clear() {
    73       Parent::getNotifier(UndirEdge()).clear();
     73      Parent::getNotifier(UEdge()).clear();
    7474      Parent::getNotifier(Edge()).clear();
    7575      Parent::clear();
     
    8080
    8181  template <typename _Base>
    82   class ClearableUndirBipartiteGraphExtender : public _Base {
     82  class ClearableUBipartiteGraphExtender : public _Base {
    8383  public:
    8484
    8585    typedef _Base Parent;
    86     typedef ClearableUndirBipartiteGraphExtender Graph;
     86    typedef ClearableUBipartiteGraphExtender Graph;
    8787
    8888    typedef typename Parent::Node Node;
     
    9090    typedef typename Parent::UpperNode UpperNode;
    9191    typedef typename Parent::Edge Edge;
    92     typedef typename Parent::UndirEdge UndirEdge;
     92    typedef typename Parent::UEdge UEdge;
    9393
    9494    void clear() {
    9595      Parent::getNotifier(Edge()).clear();
    96       Parent::getNotifier(UndirEdge()).clear();
     96      Parent::getNotifier(UEdge()).clear();
    9797      Parent::getNotifier(Node()).clear();
    9898      Parent::getNotifier(LowerNode()).clear();
  • lemon/bits/default_map.h

    r1875 r1909  
    267267  /// \e
    268268  template <typename _Base>
    269   class MappableUndirGraphExtender :
     269  class MappableUGraphExtender :
    270270    public MappableGraphExtender<_Base> {
    271271  public:
    272272
    273     typedef MappableUndirGraphExtender Graph;
     273    typedef MappableUGraphExtender Graph;
    274274    typedef MappableGraphExtender<_Base> Parent;
    275275
    276     typedef typename Parent::UndirEdge UndirEdge;
    277 
    278     template <typename _Value>
    279     class UndirEdgeMap
    280       : public IterableMapExtender<DefaultMap<Graph, UndirEdge, _Value> > {
    281     public:
    282       typedef MappableUndirGraphExtender Graph;
     276    typedef typename Parent::UEdge UEdge;
     277
     278    template <typename _Value>
     279    class UEdgeMap
     280      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
     281    public:
     282      typedef MappableUGraphExtender Graph;
    283283      typedef IterableMapExtender<
    284         DefaultMap<Graph, UndirEdge, _Value> > Parent;
    285 
    286       UndirEdgeMap(const Graph& _g)
    287         : Parent(_g) {}
    288       UndirEdgeMap(const Graph& _g, const _Value& _v)
    289         : Parent(_g, _v) {}
    290 
    291       UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
    292         return operator=<UndirEdgeMap>(cmap);
    293       }
    294 
    295       template <typename CMap>
    296       UndirEdgeMap& operator=(const CMap& cmap) {
    297         checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
    298         const typename Parent::Graph* graph = Parent::getGraph();
    299         UndirEdge it;
     284        DefaultMap<Graph, UEdge, _Value> > Parent;
     285
     286      UEdgeMap(const Graph& _g)
     287        : Parent(_g) {}
     288      UEdgeMap(const Graph& _g, const _Value& _v)
     289        : Parent(_g, _v) {}
     290
     291      UEdgeMap& operator=(const UEdgeMap& cmap) {
     292        return operator=<UEdgeMap>(cmap);
     293      }
     294
     295      template <typename CMap>
     296      UEdgeMap& operator=(const CMap& cmap) {
     297        checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
     298        const typename Parent::Graph* graph = Parent::getGraph();
     299        UEdge it;
    300300        for (graph->first(it); it != INVALID; graph->next(it)) {
    301301          Parent::set(it, cmap[it]);
     
    310310  /// \e
    311311  template <typename _Base>
    312   class MappableUndirEdgeSetExtender :
     312  class MappableUEdgeSetExtender :
    313313    public MappableEdgeSetExtender<_Base> {
    314314  public:
    315315
    316     typedef MappableUndirEdgeSetExtender Graph;
     316    typedef MappableUEdgeSetExtender Graph;
    317317    typedef MappableEdgeSetExtender<_Base> Parent;
    318318
    319     typedef typename Parent::UndirEdge UndirEdge;
    320 
    321     template <typename _Value>
    322     class UndirEdgeMap
    323       : public IterableMapExtender<DefaultMap<Graph, UndirEdge, _Value> > {
    324     public:
    325       typedef MappableUndirEdgeSetExtender Graph;
     319    typedef typename Parent::UEdge UEdge;
     320
     321    template <typename _Value>
     322    class UEdgeMap
     323      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
     324    public:
     325      typedef MappableUEdgeSetExtender Graph;
    326326      typedef IterableMapExtender<
    327         DefaultMap<Graph, UndirEdge, _Value> > Parent;
    328 
    329       UndirEdgeMap(const Graph& _g)
    330         : Parent(_g) {}
    331       UndirEdgeMap(const Graph& _g, const _Value& _v)
    332         : Parent(_g, _v) {}
    333 
    334       UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
    335         return operator=<UndirEdgeMap>(cmap);
    336       }
    337 
    338       template <typename CMap>
    339       UndirEdgeMap& operator=(const CMap& cmap) {
    340         checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
    341         const typename Parent::Graph* graph = Parent::getGraph();
    342         UndirEdge it;
     327        DefaultMap<Graph, UEdge, _Value> > Parent;
     328
     329      UEdgeMap(const Graph& _g)
     330        : Parent(_g) {}
     331      UEdgeMap(const Graph& _g, const _Value& _v)
     332        : Parent(_g, _v) {}
     333
     334      UEdgeMap& operator=(const UEdgeMap& cmap) {
     335        return operator=<UEdgeMap>(cmap);
     336      }
     337
     338      template <typename CMap>
     339      UEdgeMap& operator=(const CMap& cmap) {
     340        checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
     341        const typename Parent::Graph* graph = Parent::getGraph();
     342        UEdge it;
    343343        for (graph->first(it); it != INVALID; graph->next(it)) {
    344344          Parent::set(it, cmap[it]);
     
    353353
    354354  template <typename _Base>
    355   class MappableUndirBipartiteGraphExtender : public _Base {
     355  class MappableUBipartiteGraphExtender : public _Base {
    356356  public:
    357357
    358358    typedef _Base Parent;
    359     typedef MappableUndirBipartiteGraphExtender Graph;
     359    typedef MappableUBipartiteGraphExtender Graph;
    360360
    361361    typedef typename Parent::Node Node;
     
    363363    typedef typename Parent::LowerNode LowerNode;
    364364    typedef typename Parent::Edge Edge;
    365     typedef typename Parent::UndirEdge UndirEdge;
     365    typedef typename Parent::UEdge UEdge;
    366366   
    367367    template <typename _Value>
     
    369369      : public IterableMapExtender<DefaultMap<Graph, UpperNode, _Value> > {
    370370    public:
    371       typedef MappableUndirBipartiteGraphExtender Graph;
     371      typedef MappableUBipartiteGraphExtender Graph;
    372372      typedef IterableMapExtender<DefaultMap<Graph, UpperNode, _Value> >
    373373      Parent;
     
    406406      : public IterableMapExtender<DefaultMap<Graph, LowerNode, _Value> > {
    407407    public:
    408       typedef MappableUndirBipartiteGraphExtender Graph;
     408      typedef MappableUBipartiteGraphExtender Graph;
    409409      typedef IterableMapExtender<DefaultMap<Graph, LowerNode, _Value> >
    410410      Parent;
     
    444444    class NodeMapBase : public Parent::NodeNotifier::ObserverBase {
    445445    public:
    446       typedef MappableUndirBipartiteGraphExtender Graph;
     446      typedef MappableUBipartiteGraphExtender Graph;
    447447
    448448      typedef Node Key;
     
    524524      : public IterableMapExtender<NodeMapBase<_Value> > {
    525525    public:
    526       typedef MappableUndirBipartiteGraphExtender Graph;
     526      typedef MappableUBipartiteGraphExtender Graph;
    527527      typedef IterableMapExtender< NodeMapBase<_Value> > Parent;
    528528   
     
    562562      : public IterableMapExtender<DefaultMap<Graph, Edge, _Value> > {
    563563    public:
    564       typedef MappableUndirBipartiteGraphExtender Graph;
     564      typedef MappableUBipartiteGraphExtender Graph;
    565565      typedef IterableMapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
    566566   
     
    587587
    588588    template <typename _Value>
    589     class UndirEdgeMap
    590       : public IterableMapExtender<DefaultMap<Graph, UndirEdge, _Value> > {
    591     public:
    592       typedef MappableUndirBipartiteGraphExtender Graph;
    593       typedef IterableMapExtender<DefaultMap<Graph, UndirEdge, _Value> >
     589    class UEdgeMap
     590      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
     591    public:
     592      typedef MappableUBipartiteGraphExtender Graph;
     593      typedef IterableMapExtender<DefaultMap<Graph, UEdge, _Value> >
    594594      Parent;
    595595   
    596       UndirEdgeMap(const Graph& _g)
    597         : Parent(_g) {}
    598       UndirEdgeMap(const Graph& _g, const _Value& _v)
    599         : Parent(_g, _v) {}
    600    
    601       UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
    602         return operator=<UndirEdgeMap>(cmap);
    603       }
    604    
    605       template <typename CMap>
    606       UndirEdgeMap& operator=(const CMap& cmap) {
    607         checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
    608         const typename Parent::Graph* graph = Parent::getGraph();
    609         UndirEdge it;
     596      UEdgeMap(const Graph& _g)
     597        : Parent(_g) {}
     598      UEdgeMap(const Graph& _g, const _Value& _v)
     599        : Parent(_g, _v) {}
     600   
     601      UEdgeMap& operator=(const UEdgeMap& cmap) {
     602        return operator=<UEdgeMap>(cmap);
     603      }
     604   
     605      template <typename CMap>
     606      UEdgeMap& operator=(const CMap& cmap) {
     607        checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
     608        const typename Parent::Graph* graph = Parent::getGraph();
     609        UEdge it;
    610610        for (graph->first(it); it != INVALID; graph->next(it)) {
    611611          Parent::set(it, cmap[it]);
  • lemon/bits/erasable_graph_extender.h

    r1842 r1909  
    6363
    6464  template <typename _Base>
    65   class ErasableUndirGraphExtender : public _Base {
     65  class ErasableUGraphExtender : public _Base {
    6666  public:
    6767
    68     typedef ErasableUndirGraphExtender Graph;
     68    typedef ErasableUGraphExtender Graph;
    6969    typedef _Base Parent;
    7070
    7171    typedef typename Parent::Node Node;
    72     typedef typename Parent::UndirEdge UndirEdge;
     72    typedef typename Parent::UEdge UEdge;
    7373    typedef typename Parent::Edge Edge;
    7474
     
    8585    }
    8686   
    87     void erase(const UndirEdge& uedge) {
     87    void erase(const UEdge& uedge) {
    8888      std::vector<Edge> edges;
    8989      edges.push_back(Parent::direct(uedge,true));
    9090      edges.push_back(Parent::direct(uedge,false));
    9191      Parent::getNotifier(Edge()).erase(edges);
    92       Parent::getNotifier(UndirEdge()).erase(uedge);
     92      Parent::getNotifier(UEdge()).erase(uedge);
    9393      Parent::erase(uedge);
    9494    }
     
    9797
    9898  template <typename _Base>
    99   class ErasableUndirEdgeSetExtender : public _Base {
     99  class ErasableUEdgeSetExtender : public _Base {
    100100  public:
    101101
    102     typedef ErasableUndirEdgeSetExtender Graph;
     102    typedef ErasableUEdgeSetExtender Graph;
    103103    typedef _Base Parent;
    104104
    105105    typedef typename Parent::Node Node;
    106     typedef typename Parent::UndirEdge UndirEdge;
     106    typedef typename Parent::UEdge UEdge;
    107107    typedef typename Parent::Edge Edge;
    108108
    109     void erase(const UndirEdge& uedge) {
     109    void erase(const UEdge& uedge) {
    110110      std::vector<Edge> edges;
    111111      edges.push_back(Parent::direct(uedge,true));
    112112      edges.push_back(Parent::direct(uedge,false));
    113113      Parent::getNotifier(Edge()).erase(edges);
    114       Parent::getNotifier(UndirEdge()).erase(uedge);
     114      Parent::getNotifier(UEdge()).erase(uedge);
    115115      Parent::erase(uedge);
    116116    }
  • lemon/bits/extendable_graph_extender.h

    r1842 r1909  
    4949
    5050  template <typename _Base>
    51   class ExtendableUndirGraphExtender : public _Base {
     51  class ExtendableUGraphExtender : public _Base {
    5252  public:
    5353
    54     typedef ExtendableUndirGraphExtender Graph;
     54    typedef ExtendableUGraphExtender Graph;
    5555    typedef _Base Parent;
    5656
    5757    typedef typename Parent::Node Node;
    5858    typedef typename Parent::Edge Edge;
    59     typedef typename Parent::UndirEdge UndirEdge;
     59    typedef typename Parent::UEdge UEdge;
    6060
    6161    Node addNode() {
     
    6565    }
    6666
    67     UndirEdge addEdge(const Node& from, const Node& to) {
    68       UndirEdge uedge = Parent::addEdge(from, to);
    69       Parent::getNotifier(UndirEdge()).add(uedge);
     67    UEdge addEdge(const Node& from, const Node& to) {
     68      UEdge uedge = Parent::addEdge(from, to);
     69      Parent::getNotifier(UEdge()).add(uedge);
    7070
    7171      std::vector<Edge> edges;
     
    8080
    8181  template <typename _Base>
    82   class ExtendableUndirEdgeSetExtender : public _Base {
     82  class ExtendableUEdgeSetExtender : public _Base {
    8383  public:
    8484
    85     typedef ExtendableUndirEdgeSetExtender Graph;
     85    typedef ExtendableUEdgeSetExtender Graph;
    8686    typedef _Base Parent;
    8787
    8888    typedef typename Parent::Node Node;
    8989    typedef typename Parent::Edge Edge;
    90     typedef typename Parent::UndirEdge UndirEdge;
     90    typedef typename Parent::UEdge UEdge;
    9191
    92     UndirEdge addEdge(const Node& from, const Node& to) {
    93       UndirEdge uedge = Parent::addEdge(from, to);
    94       Parent::getNotifier(UndirEdge()).add(uedge);
     92    UEdge addEdge(const Node& from, const Node& to) {
     93      UEdge uedge = Parent::addEdge(from, to);
     94      Parent::getNotifier(UEdge()).add(uedge);
    9595
    9696      std::vector<Edge> edges;
     
    106106
    107107  template <typename _Base>
    108   class ExtendableUndirBipartiteGraphExtender : public _Base {
     108  class ExtendableUBipartiteGraphExtender : public _Base {
    109109  public:
    110110
    111111    typedef _Base Parent;
    112     typedef ExtendableUndirBipartiteGraphExtender Graph;
     112    typedef ExtendableUBipartiteGraphExtender Graph;
    113113 
    114114    typedef typename Parent::Node Node;
     
    116116    typedef typename Parent::UpperNode UpperNode;
    117117    typedef typename Parent::Edge Edge;
    118     typedef typename Parent::UndirEdge UndirEdge;
     118    typedef typename Parent::UEdge UEdge;
    119119 
    120120    Node addUpperNode() {
     
    132132    }
    133133 
    134     UndirEdge addEdge(const Node& source, const Node& target) {
    135       UndirEdge undiredge = Parent::addEdge(source, target);
    136       Parent::getNotifier(UndirEdge()).add(undiredge);
     134    UEdge addEdge(const Node& source, const Node& target) {
     135      UEdge uedge = Parent::addEdge(source, target);
     136      Parent::getNotifier(UEdge()).add(uedge);
    137137   
    138138      std::vector<Edge> edges;
    139       edges.push_back(Parent::direct(undiredge, true));
    140       edges.push_back(Parent::direct(undiredge, false));
     139      edges.push_back(Parent::direct(uedge, true));
     140      edges.push_back(Parent::direct(uedge, false));
    141141      Parent::getNotifier(Edge()).add(edges);
    142142   
    143       return undiredge;
     143      return uedge;
    144144    }
    145145
  • lemon/bits/graph_extender.h

    r1875 r1909  
    6262
    6363  template <typename _Base>
    64   class UndirGraphExtender : public _Base {
     64  class UGraphExtender : public _Base {
    6565    typedef _Base Parent;
    66     typedef UndirGraphExtender Graph;
     66    typedef UGraphExtender Graph;
    6767
    6868  public:
    6969
    70     typedef typename Parent::Edge UndirEdge;
     70    typedef typename Parent::Edge UEdge;
    7171    typedef typename Parent::Node Node;
    7272
    73     class Edge : public UndirEdge {
    74       friend class UndirGraphExtender;
     73    class Edge : public UEdge {
     74      friend class UGraphExtender;
    7575
    7676    protected:
     
    7979      bool forward;
    8080
    81       Edge(const UndirEdge &ue, bool _forward) :
    82         UndirEdge(ue), forward(_forward) {}
     81      Edge(const UEdge &ue, bool _forward) :
     82        UEdge(ue), forward(_forward) {}
    8383
    8484    public:
     
    8686
    8787      /// Invalid edge constructor
    88       Edge(Invalid i) : UndirEdge(i), forward(true) {}
     88      Edge(Invalid i) : UEdge(i), forward(true) {}
    8989
    9090      bool operator==(const Edge &that) const {
    91         return forward==that.forward && UndirEdge(*this)==UndirEdge(that);
     91        return forward==that.forward && UEdge(*this)==UEdge(that);
    9292      }
    9393      bool operator!=(const Edge &that) const {
    94         return forward!=that.forward || UndirEdge(*this)!=UndirEdge(that);
     94        return forward!=that.forward || UEdge(*this)!=UEdge(that);
    9595      }
    9696      bool operator<(const Edge &that) const {
    9797        return forward<that.forward ||
    98           (!(that.forward<forward) && UndirEdge(*this)<UndirEdge(that));
     98          (!(that.forward<forward) && UEdge(*this)<UEdge(that));
    9999      }
    100100    };
     
    127127    }
    128128
    129     Node oppositeNode(const Node &n, const UndirEdge &e) const {
     129    Node oppositeNode(const Node &n, const UEdge &e) const {
    130130      if( n == Parent::source(e))
    131131        return Parent::target(e);
     
    138138    /// \brief Directed edge from an undirected edge and a source node.
    139139    ///
    140     /// Returns a (directed) Edge corresponding to the specified UndirEdge
     140    /// Returns a (directed) Edge corresponding to the specified UEdge
    141141    /// and source Node.
    142142    ///
    143     Edge direct(const UndirEdge &ue, const Node &s) const {
     143    Edge direct(const UEdge &ue, const Node &s) const {
    144144      return Edge(ue, s == source(ue));
    145145    }
     
    147147    /// \brief Directed edge from an undirected edge.
    148148    ///
    149     /// Returns a directed edge corresponding to the specified UndirEdge.
     149    /// Returns a directed edge corresponding to the specified UEdge.
    150150    /// If the given bool is true the given undirected edge and the
    151151    /// returned edge have the same source node.
    152     Edge direct(const UndirEdge &ue, bool d) const {
     152    Edge direct(const UEdge &ue, bool d) const {
    153153      return Edge(ue, d);
    154154    }
     
    183183    void firstOut(Edge &e, const Node &n) const {
    184184      Parent::firstIn(e,n);
    185       if( UndirEdge(e) != INVALID ) {
     185      if( UEdge(e) != INVALID ) {
    186186        e.forward = false;
    187187      }
     
    195195        Node n = Parent::target(e);
    196196        Parent::nextIn(e);
    197         if( UndirEdge(e) == INVALID ) {
     197        if( UEdge(e) == INVALID ) {
    198198          Parent::firstOut(e, n);
    199199          e.forward = true;
     
    207207    void firstIn(Edge &e, const Node &n) const {
    208208      Parent::firstOut(e,n);
    209       if( UndirEdge(e) != INVALID ) {
     209      if( UEdge(e) != INVALID ) {
    210210        e.forward = false;
    211211      }
     
    219219        Node n = Parent::source(e);
    220220        Parent::nextOut(e);
    221         if( UndirEdge(e) == INVALID ) {
     221        if( UEdge(e) == INVALID ) {
    222222          Parent::firstIn(e, n);
    223223          e.forward = true;
     
    229229    }
    230230
    231     void firstInc(UndirEdge &e, const Node &n) const {
     231    void firstInc(UEdge &e, const Node &n) const {
    232232      Parent::firstOut(e, n);
    233233      if (e != INVALID) return;
    234234      Parent::firstIn(e, n);
    235235    }
    236     void nextInc(UndirEdge &e, const Node &n) const {
     236    void nextInc(UEdge &e, const Node &n) const {
    237237      if (Parent::source(e) == n) {
    238238        Parent::nextOut(e);
     
    244244    }
    245245
    246     void firstInc(UndirEdge &e, bool &d, const Node &n) const {
     246    void firstInc(UEdge &e, bool &d, const Node &n) const {
    247247      d = true;
    248248      Parent::firstOut(e, n);
     
    251251      Parent::firstIn(e, n);
    252252    }
    253     void nextInc(UndirEdge &e, bool &d) const {
     253    void nextInc(UEdge &e, bool &d) const {
    254254      if (d) {
    255255        Node s = Parent::source(e);
     
    276276    }
    277277
    278     int id(const UndirEdge &e) const {
     278    int id(const UEdge &e) const {
    279279      return Parent::id(e);
    280280    }
     
    292292    }
    293293
    294     int maxUndirEdgeId() const {
     294    int maxUEdgeId() const {
    295295      return Parent::maxEdgeId();
    296296    }
     
    303303      return maxEdgeId();
    304304    }
    305     int maxId(UndirEdge) const {
    306       return maxUndirEdgeId();
     305    int maxId(UEdge) const {
     306      return maxUEdgeId();
    307307    }
    308308
     
    311311    }
    312312
    313     int undirEdgeNum() const {
     313    int uEdgeNum() const {
    314314      return Parent::edgeNum();
    315315    }
     
    323323    }
    324324
    325     UndirEdge undirEdgeFromId(int id) const {
     325    UEdge uEdgeFromId(int id) const {
    326326      return Parent::edgeFromId(id >> 1);
    327327    }
     
    335335    }
    336336
    337     UndirEdge fromId(int id, UndirEdge) const {
    338       return undirEdgeFromId(id);
     337    UEdge fromId(int id, UEdge) const {
     338      return uEdgeFromId(id);
    339339    }
    340340
     
    342342    Edge findEdge(Node source, Node target, Edge prev) const {
    343343      if (prev == INVALID) {
    344         UndirEdge edge = Parent::findEdge(source, target);
     344        UEdge edge = Parent::findEdge(source, target);
    345345        if (edge != INVALID) return direct(edge, true);
    346346        edge = Parent::findEdge(target, source);
    347347        if (edge != INVALID) return direct(edge, false);
    348348      } else if (direction(prev)) {
    349         UndirEdge edge = Parent::findEdge(source, target, prev);
     349        UEdge edge = Parent::findEdge(source, target, prev);
    350350        if (edge != INVALID) return direct(edge, true);
    351351        edge = Parent::findEdge(target, source);
    352352        if (edge != INVALID) return direct(edge, false);       
    353353      } else {
    354         UndirEdge edge = Parent::findEdge(target, source, prev);
     354        UEdge edge = Parent::findEdge(target, source, prev);
    355355        if (edge != INVALID) return direct(edge, false);             
    356356      }
     
    358358    }
    359359
    360     UndirEdge findUndirEdge(Node source, Node target, UndirEdge prev) const {
     360    UEdge findUEdge(Node source, Node target, UEdge prev) const {
    361361      if (prev == INVALID) {
    362         UndirEdge edge = Parent::findEdge(source, target);
     362        UEdge edge = Parent::findEdge(source, target);
    363363        if (edge != INVALID) return edge;
    364364        edge = Parent::findEdge(target, source);
    365365        if (edge != INVALID) return edge;
    366366      } else if (Parent::source(prev) == source) {
    367         UndirEdge edge = Parent::findEdge(source, target, prev);
     367        UEdge edge = Parent::findEdge(source, target, prev);
    368368        if (edge != INVALID) return edge;
    369369        edge = Parent::findEdge(target, source);
    370370        if (edge != INVALID) return edge;       
    371371      } else {
    372         UndirEdge edge = Parent::findEdge(target, source, prev);
     372        UEdge edge = Parent::findEdge(target, source, prev);
    373373        if (edge != INVALID) return edge;             
    374374      }
     
    380380
    381381  template <typename _Base>
    382   class UndirBipartiteGraphExtender : public _Base {
     382  class UBipartiteGraphExtender : public _Base {
    383383  public:
    384384    typedef _Base Parent;
    385     typedef UndirBipartiteGraphExtender Graph;
     385    typedef UBipartiteGraphExtender Graph;
    386386
    387387    typedef typename Parent::Node Node;
    388     typedef typename Parent::Edge UndirEdge;
     388    typedef typename Parent::Edge UEdge;
    389389
    390390    using Parent::first;
     
    393393    using Parent::id;
    394394
    395     Node source(const UndirEdge& edge) const {
     395    Node source(const UEdge& edge) const {
    396396      return upperNode(edge);
    397397    }
    398     Node target(const UndirEdge& edge) const {
     398    Node target(const UEdge& edge) const {
    399399      return lowerNode(edge);
    400400    }
    401401
    402     void firstInc(UndirEdge& edge, bool& direction, const Node& node) const {
     402    void firstInc(UEdge& edge, bool& direction, const Node& node) const {
    403403      if (Parent::upper(node)) {
    404404        Parent::firstDown(edge, node);
     
    406406      } else {
    407407        Parent::firstUp(edge, node);
    408         direction = static_cast<UndirEdge&>(edge) == INVALID;
    409       }
    410     }
    411     void nextInc(UndirEdge& edge, bool& direction) const {
     408        direction = static_cast<UEdge&>(edge) == INVALID;
     409      }
     410    }
     411    void nextInc(UEdge& edge, bool& direction) const {
    412412      if (direction) {
    413413        Parent::nextDown(edge);
     
    418418    }
    419419
    420     int maxUndirEdgeId() const {
     420    int maxUEdgeId() const {
    421421      return Parent::maxEdgeId();
    422422    }
    423423
    424     UndirEdge undirEdgeFromId(int id) const {
     424    UEdge uEdgeFromId(int id) const {
    425425      return Parent::edgeFromId(id);
    426426    }
    427427
    428     class Edge : public UndirEdge {
    429       friend class UndirBipartiteGraphExtender;
     428    class Edge : public UEdge {
     429      friend class UBipartiteGraphExtender;
    430430    protected:
    431431      bool forward;
    432432
    433       Edge(const UndirEdge& edge, bool _forward)
    434         : UndirEdge(edge), forward(_forward) {}
     433      Edge(const UEdge& edge, bool _forward)
     434        : UEdge(edge), forward(_forward) {}
    435435
    436436    public:
    437437      Edge() {}
    438       Edge (Invalid) : UndirEdge(INVALID), forward(true) {}
     438      Edge (Invalid) : UEdge(INVALID), forward(true) {}
    439439      bool operator==(const Edge& i) const {
    440         return UndirEdge::operator==(i) && forward == i.forward;
     440        return UEdge::operator==(i) && forward == i.forward;
    441441      }
    442442      bool operator!=(const Edge& i) const {
    443         return UndirEdge::operator!=(i) || forward != i.forward;
     443        return UEdge::operator!=(i) || forward != i.forward;
    444444      }
    445445      bool operator<(const Edge& i) const {
    446         return UndirEdge::operator<(i) ||
    447           (!(i.forward<forward) && UndirEdge(*this)<UndirEdge(i));
     446        return UEdge::operator<(i) ||
     447          (!(i.forward<forward) && UEdge(*this)<UEdge(i));
    448448      }
    449449    };
    450450
    451451    void first(Edge& edge) const {
    452       Parent::first(static_cast<UndirEdge&>(edge));
     452      Parent::first(static_cast<UEdge&>(edge));
    453453      edge.forward = true;
    454454    }
     
    456456    void next(Edge& edge) const {
    457457      if (!edge.forward) {
    458         Parent::next(static_cast<UndirEdge&>(edge));
     458        Parent::next(static_cast<UEdge&>(edge));
    459459      }
    460460      edge.forward = !edge.forward;
     
    467467      } else {
    468468        Parent::firstUp(edge, node);
    469         edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
     469        edge.forward = static_cast<UEdge&>(edge) == INVALID;
    470470      }
    471471    }
     
    475475      } else {
    476476        Parent::nextUp(edge);
    477         edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
     477        edge.forward = static_cast<UEdge&>(edge) == INVALID;
    478478      }
    479479    }
     
    485485      } else {
    486486        Parent::firstDown(edge, node);
    487         edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
     487        edge.forward = static_cast<UEdge&>(edge) == INVALID;
    488488      }
    489489    }
     
    493493      } else {
    494494        Parent::nextDown(edge);
    495         edge.forward = static_cast<UndirEdge&>(edge) == INVALID;
     495        edge.forward = static_cast<UEdge&>(edge) == INVALID;
    496496      }
    497497    }
     
    508508    }
    509509
    510     Edge direct(const UndirEdge& edge, const Node& node) const {
     510    Edge direct(const UEdge& edge, const Node& node) const {
    511511      return Edge(edge, node == Parent::source(edge));
    512512    }
    513513
    514     Edge direct(const UndirEdge& edge, bool direction) const {
     514    Edge direct(const UEdge& edge, bool direction) const {
    515515      return Edge(edge, direction);
    516516    }
    517517
    518     Node oppositeNode(const UndirEdge& edge, const Node& node) const {
     518    Node oppositeNode(const UEdge& edge, const Node& node) const {
    519519      return source(edge) == node ?
    520520        target(edge) : source(edge);
     
    529529    }
    530530    Edge edgeFromId(int id) const {
    531       return Edge(Parent::fromId(id >> 1, UndirEdge()), (id & 1) == 0);
     531      return Edge(Parent::fromId(id >> 1, UEdge()), (id & 1) == 0);
    532532    }
    533533    int maxEdgeId() const {
    534       return (Parent::maxId(UndirEdge()) << 1) + 1;
     534      return (Parent::maxId(UEdge()) << 1) + 1;
    535535    }
    536536
    537537    class UpperNode : public Node {
    538       friend class UndirBipartiteGraphExtender;
     538      friend class UBipartiteGraphExtender;
    539539    public:
    540540      UpperNode() {}
     
    558558
    559559    class LowerNode : public Node {
    560       friend class UndirBipartiteGraphExtender;
     560      friend class UBipartiteGraphExtender;
    561561    public:
    562562      LowerNode() {}
     
    593593      return maxEdgeId();
    594594    }
    595     int maxId(UndirEdge) const {
    596       return maxUndirEdgeId();
     595    int maxId(UEdge) const {
     596      return maxUEdgeId();
    597597    }
    598598
     
    610610      return edgeFromId(id);
    611611    }
    612     UndirEdge fromId(int id, UndirEdge) const {
    613       return undirEdgeFromId(id);
     612    UEdge fromId(int id, UEdge) const {
     613      return uEdgeFromId(id);
    614614    }
    615615
  • lemon/bits/iterable_graph_extender.h

    r1820 r1909  
    1717    ///
    1818    ///\bug Should it be here?
    19     typedef False UndirTag;
     19    typedef False UTag;
    2020
    2121    typedef _Base Parent;
     
    175175 
    176176  template <typename _Base>
    177   class IterableUndirGraphExtender : public IterableGraphExtender<_Base> {
     177  class IterableUGraphExtender : public IterableGraphExtender<_Base> {
    178178  public:
    179179
     
    185185    ///\bug Should be tested in the concept checker whether it is defined
    186186    ///correctly.
    187     typedef True UndirTag;
     187    typedef True UTag;
    188188
    189189    typedef IterableGraphExtender<_Base> Parent;
    190     typedef IterableUndirGraphExtender<_Base> Graph;
     190    typedef IterableUGraphExtender<_Base> Graph;
    191191    typedef typename Parent::Node Node;
    192192    typedef typename Parent::Edge Edge;
    193     typedef typename Parent::UndirEdge UndirEdge;
    194 
    195     class UndirEdgeIt : public Parent::UndirEdge {
    196       const Graph* graph;
    197     public:
    198 
    199       UndirEdgeIt() { }
    200 
    201       UndirEdgeIt(Invalid i) : UndirEdge(i) { }
    202 
    203       explicit UndirEdgeIt(const Graph& _graph) : graph(&_graph) {
    204         _graph.first(*static_cast<UndirEdge*>(this));
    205       }
    206 
    207       UndirEdgeIt(const Graph& _graph, const UndirEdge& e) :
    208         UndirEdge(e), graph(&_graph) { }
    209 
    210       UndirEdgeIt& operator++() {
     193    typedef typename Parent::UEdge UEdge;
     194
     195    class UEdgeIt : public Parent::UEdge {
     196      const Graph* graph;
     197    public:
     198
     199      UEdgeIt() { }
     200
     201      UEdgeIt(Invalid i) : UEdge(i) { }
     202
     203      explicit UEdgeIt(const Graph& _graph) : graph(&_graph) {
     204        _graph.first(*static_cast<UEdge*>(this));
     205      }
     206
     207      UEdgeIt(const Graph& _graph, const UEdge& e) :
     208        UEdge(e), graph(&_graph) { }
     209
     210      UEdgeIt& operator++() {
    211211        graph->next(*this);
    212212        return *this;
     
    215215    };
    216216
    217     class IncEdgeIt : public Parent::UndirEdge {
     217    class IncEdgeIt : public Parent::UEdge {
    218218      const Graph* graph;
    219219      bool direction;
    220       friend class IterableUndirGraphExtender;
     220      friend class IterableUGraphExtender;
    221221    public:
    222222
    223223      IncEdgeIt() { }
    224224
    225       IncEdgeIt(Invalid i) : UndirEdge(i), direction(false) { }
     225      IncEdgeIt(Invalid i) : UEdge(i), direction(false) { }
    226226
    227227      IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
     
    229229      }
    230230
    231       IncEdgeIt(const Graph& _graph, const UndirEdge &ue, const Node &n)
    232         : graph(&_graph), UndirEdge(ue) {
     231      IncEdgeIt(const Graph& _graph, const UEdge &ue, const Node &n)
     232        : graph(&_graph), UEdge(ue) {
    233233        direction = (_graph.source(ue) == n);
    234234      }
     
    259259    ///
    260260    /// Gives back the opposite on the given undirected edge.
    261     Node oppositeNode(const Node& n, const UndirEdge& e) const {
     261    Node oppositeNode(const Node& n, const UEdge& e) const {
    262262      if (Parent::source(e) == n) {
    263263        return Parent::target(e);
     
    271271
    272272  template <typename _Base>
    273   class IterableUndirBipartiteGraphExtender : public _Base {
     273  class IterableUBipartiteGraphExtender : public _Base {
    274274  public:
    275275    typedef _Base Parent;
    276     typedef IterableUndirBipartiteGraphExtender Graph;
     276    typedef IterableUBipartiteGraphExtender Graph;
    277277   
    278278    typedef typename Parent::Node Node;
     
    280280    typedef typename Parent::LowerNode LowerNode;
    281281    typedef typename Parent::Edge Edge;
    282     typedef typename Parent::UndirEdge UndirEdge;
     282    typedef typename Parent::UEdge UEdge;
    283283 
    284284    class NodeIt : public Node {
     
    305305
    306306    class UpperNodeIt : public Node {
    307       friend class IterableUndirBipartiteGraphExtender;
     307      friend class IterableUBipartiteGraphExtender;
    308308      const Graph* graph;
    309309    public:
     
    327327
    328328    class LowerNodeIt : public Node {
    329       friend class IterableUndirBipartiteGraphExtender;
     329      friend class IterableUBipartiteGraphExtender;
    330330      const Graph* graph;
    331331    public:
     
    349349
    350350    class EdgeIt : public Edge {
    351       friend class IterableUndirBipartiteGraphExtender;
     351      friend class IterableUBipartiteGraphExtender;
    352352      const Graph* graph;
    353353    public:
     
    371371    };
    372372
    373     class UndirEdgeIt : public UndirEdge {
    374       friend class IterableUndirBipartiteGraphExtender;
    375       const Graph* graph;
    376     public:
    377    
    378       UndirEdgeIt() { }
    379    
    380       UndirEdgeIt(Invalid i) : UndirEdge(INVALID) { }
    381    
    382       explicit UndirEdgeIt(const Graph& _graph) : graph(&_graph) {
    383         graph->first(static_cast<UndirEdge&>(*this));
    384       }
    385 
    386       UndirEdgeIt(const Graph& _graph, const UndirEdge& edge)
    387         : UndirEdge(edge), graph(&_graph) { }
    388    
    389       UndirEdgeIt& operator++() {
     373    class UEdgeIt : public UEdge {
     374      friend class IterableUBipartiteGraphExtender;
     375      const Graph* graph;
     376    public:
     377   
     378      UEdgeIt() { }
     379   
     380      UEdgeIt(Invalid i) : UEdge(INVALID) { }
     381   
     382      explicit UEdgeIt(const Graph& _graph) : graph(&_graph) {
     383        graph->first(static_cast<UEdge&>(*this));
     384      }
     385
     386      UEdgeIt(const Graph& _graph, const UEdge& edge)
     387        : UEdge(edge), graph(&_graph) { }
     388   
     389      UEdgeIt& operator++() {
    390390        graph->next(*this);
    391391        return *this;
     
    394394
    395395    class OutEdgeIt : public Edge {
    396       friend class IterableUndirBipartiteGraphExtender;
     396      friend class IterableUBipartiteGraphExtender;
    397397      const Graph* graph;
    398398    public:
     
    419419
    420420    class InEdgeIt : public Edge {
    421       friend class IterableUndirBipartiteGraphExtender;
     421      friend class IterableUBipartiteGraphExtender;
    422422      const Graph* graph;
    423423    public:
     
    470470    }
    471471 
    472     class IncEdgeIt : public Parent::UndirEdge {
    473       friend class IterableUndirBipartiteGraphExtender;
     472    class IncEdgeIt : public Parent::UEdge {
     473      friend class IterableUBipartiteGraphExtender;
    474474      const Graph* graph;
    475475      bool direction;
     
    478478      IncEdgeIt() { }
    479479   
    480       IncEdgeIt(Invalid i) : UndirEdge(i), direction(true) { }
     480      IncEdgeIt(Invalid i) : UEdge(i), direction(true) { }
    481481   
    482482      IncEdgeIt(const Graph& _graph, const Node &n) : graph(&_graph) {
     
    484484      }
    485485
    486       IncEdgeIt(const Graph& _graph, const UndirEdge &ue, const Node &n)
    487         : graph(&_graph), UndirEdge(ue) {
     486      IncEdgeIt(const Graph& _graph, const UEdge &ue, const Node &n)
     487        : graph(&_graph), UEdge(ue) {
    488488        direction = (graph->source(ue) == n);
    489489      }
  • lemon/bits/static_map.h

    r1875 r1909  
    306306  /// \e
    307307  template <typename _Base>
    308   class StaticMappableUndirGraphExtender :
     308  class StaticMappableUGraphExtender :
    309309    public StaticMappableGraphExtender<_Base> {
    310310  public:
    311311
    312     typedef StaticMappableUndirGraphExtender Graph;
     312    typedef StaticMappableUGraphExtender Graph;
    313313    typedef StaticMappableGraphExtender<_Base> Parent;
    314314
    315     typedef typename Parent::UndirEdge UndirEdge;
    316 
    317     template <typename _Value>
    318     class UndirEdgeMap
    319       : public IterableMapExtender<StaticMap<Graph, UndirEdge, _Value> > {
    320     public:
    321       typedef StaticMappableUndirGraphExtender Graph;
     315    typedef typename Parent::UEdge UEdge;
     316
     317    template <typename _Value>
     318    class UEdgeMap
     319      : public IterableMapExtender<StaticMap<Graph, UEdge, _Value> > {
     320    public:
     321      typedef StaticMappableUGraphExtender Graph;
    322322      typedef IterableMapExtender<
    323         StaticMap<Graph, UndirEdge, _Value> > Parent;
    324 
    325       UndirEdgeMap(const Graph& _g)
    326         : Parent(_g) {}
    327       UndirEdgeMap(const Graph& _g, const _Value& _v)
    328         : Parent(_g, _v) {}
    329 
    330       UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
    331         return operator=<UndirEdgeMap>(cmap);
    332       }
    333 
    334       template <typename CMap>
    335       UndirEdgeMap& operator=(const CMap& cmap) {
    336         checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
    337         const typename Parent::Graph* graph = Parent::getGraph();
    338         UndirEdge it;
     323        StaticMap<Graph, UEdge, _Value> > Parent;
     324
     325      UEdgeMap(const Graph& _g)
     326        : Parent(_g) {}
     327      UEdgeMap(const Graph& _g, const _Value& _v)
     328        : Parent(_g, _v) {}
     329
     330      UEdgeMap& operator=(const UEdgeMap& cmap) {
     331        return operator=<UEdgeMap>(cmap);
     332      }
     333
     334      template <typename CMap>
     335      UEdgeMap& operator=(const CMap& cmap) {
     336        checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
     337        const typename Parent::Graph* graph = Parent::getGraph();
     338        UEdge it;
    339339        for (graph->first(it); it != INVALID; graph->next(it)) {
    340340          Parent::set(it, cmap[it]);
     
    347347
    348348  template <typename _Base>
    349   class StaticMappableUndirBipartiteGraphExtender : public _Base {
     349  class StaticMappableUBipartiteGraphExtender : public _Base {
    350350  public:
    351351
    352352    typedef _Base Parent;
    353     typedef StaticMappableUndirBipartiteGraphExtender Graph;
     353    typedef StaticMappableUBipartiteGraphExtender Graph;
    354354
    355355    typedef typename Parent::Node Node;
     
    357357    typedef typename Parent::LowerNode LowerNode;
    358358    typedef typename Parent::Edge Edge;
    359     typedef typename Parent::UndirEdge UndirEdge;
     359    typedef typename Parent::UEdge UEdge;
    360360   
    361361    template <typename _Value>
     
    363363      : public IterableMapExtender<StaticMap<Graph, UpperNode, _Value> > {
    364364    public:
    365       typedef StaticMappableUndirBipartiteGraphExtender Graph;
     365      typedef StaticMappableUBipartiteGraphExtender Graph;
    366366      typedef IterableMapExtender<StaticMap<Graph, UpperNode, _Value> >
    367367      Parent;
     
    400400      : public IterableMapExtender<StaticMap<Graph, LowerNode, _Value> > {
    401401    public:
    402       typedef StaticMappableUndirBipartiteGraphExtender Graph;
     402      typedef StaticMappableUBipartiteGraphExtender Graph;
    403403      typedef IterableMapExtender<StaticMap<Graph, LowerNode, _Value> >
    404404      Parent;
     
    438438    class NodeMapBase : public Parent::NodeNotifier::ObserverBase {
    439439    public:
    440       typedef StaticMappableUndirBipartiteGraphExtender Graph;
     440      typedef StaticMappableUBipartiteGraphExtender Graph;
    441441
    442442      typedef Node Key;
     
    518518      : public IterableMapExtender<NodeMapBase<_Value> > {
    519519    public:
    520       typedef StaticMappableUndirBipartiteGraphExtender Graph;
     520      typedef StaticMappableUBipartiteGraphExtender Graph;
    521521      typedef IterableMapExtender< NodeMapBase<_Value> > Parent;
    522522   
     
    556556      : public IterableMapExtender<StaticMap<Graph, Edge, _Value> > {
    557557    public:
    558       typedef StaticMappableUndirBipartiteGraphExtender Graph;
     558      typedef StaticMappableUBipartiteGraphExtender Graph;
    559559      typedef IterableMapExtender<StaticMap<Graph, Edge, _Value> > Parent;
    560560   
     
    581581
    582582    template <typename _Value>
    583     class UndirEdgeMap
    584       : public IterableMapExtender<StaticMap<Graph, UndirEdge, _Value> > {
    585     public:
    586       typedef StaticMappableUndirBipartiteGraphExtender Graph;
    587       typedef IterableMapExtender<StaticMap<Graph, UndirEdge, _Value> >
     583    class UEdgeMap
     584      : public IterableMapExtender<StaticMap<Graph, UEdge, _Value> > {
     585    public:
     586      typedef StaticMappableUBipartiteGraphExtender Graph;
     587      typedef IterableMapExtender<StaticMap<Graph, UEdge, _Value> >
    588588      Parent;
    589589   
    590       UndirEdgeMap(const Graph& _g)
    591         : Parent(_g) {}
    592       UndirEdgeMap(const Graph& _g, const _Value& _v)
    593         : Parent(_g, _v) {}
    594    
    595       UndirEdgeMap& operator=(const UndirEdgeMap& cmap) {
    596         return operator=<UndirEdgeMap>(cmap);
    597       }
    598    
    599       template <typename CMap>
    600       UndirEdgeMap& operator=(const CMap& cmap) {
    601         checkConcept<concept::ReadMap<UndirEdge, _Value>, CMap>();
    602         const typename Parent::Graph* graph = Parent::getGraph();
    603         UndirEdge it;
     590      UEdgeMap(const Graph& _g)
     591        : Parent(_g) {}
     592      UEdgeMap(const Graph& _g, const _Value& _v)
     593        : Parent(_g, _v) {}
     594   
     595      UEdgeMap& operator=(const UEdgeMap& cmap) {
     596        return operator=<UEdgeMap>(cmap);
     597      }
     598   
     599      template <typename CMap>
     600      UEdgeMap& operator=(const CMap& cmap) {
     601        checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
     602        const typename Parent::Graph* graph = Parent::getGraph();
     603        UEdge it;
    604604        for (graph->first(it); it != INVALID; graph->next(it)) {
    605605          Parent::set(it, cmap[it]);
  • lemon/concept/graph.h

    r1875 r1909  
    4343    public:
    4444
    45       typedef False UndirTag;
     45      typedef False UTag;
    4646     
    4747      typedef BaseGraphComponent::Node Node;
     
    124124      ///\todo undocumented
    125125      ///
    126       typedef False UndirTag;
     126      typedef False UTag;
    127127
    128128      /// Defalult constructor.
  • lemon/concept/graph_component.h

    r1875 r1909  
    3535    /// Skeleton class for graph Node and Edge types
    3636
    37     /// This class describes the interface of Node and Edge (and UndirEdge
     37    /// This class describes the interface of Node and Edge (and UEdge
    3838    /// in undirected graphs) subtypes of graph types.
    3939    ///
  • lemon/concept/ugraph.h

    r1875 r1909  
    11/* -*- C++ -*-
    22 *
    3  * lemon/concept/undir_graph_component.h - Part of LEMON, a generic
     3 * lemon/concept/ugraph_component.h - Part of LEMON, a generic
    44 * C++ optimization library
    55 *
     
    3434
    3535//     /// Skeleton class which describes an edge with direction in \ref
    36 //     /// UndirGraph "undirected graph".
    37     template <typename UndirGraph>
    38     class UndirGraphEdge : public UndirGraph::UndirEdge {
    39       typedef typename UndirGraph::UndirEdge UndirEdge;
    40       typedef typename UndirGraph::Node Node;
     36//     /// UGraph "undirected graph".
     37    template <typename UGraph>
     38    class UGraphEdge : public UGraph::UEdge {
     39      typedef typename UGraph::UEdge UEdge;
     40      typedef typename UGraph::Node Node;
    4141    public:
    4242
    4343      /// \e
    44       UndirGraphEdge() {}
     44      UGraphEdge() {}
    4545
    4646      /// \e
    47       UndirGraphEdge(const UndirGraphEdge& e) : UndirGraph::UndirEdge(e) {}
     47      UGraphEdge(const UGraphEdge& e) : UGraph::UEdge(e) {}
    4848
    4949      /// \e
    50       UndirGraphEdge(Invalid) {}
     50      UGraphEdge(Invalid) {}
    5151
    5252      /// \brief Directed edge from undirected edge and a source node.
     
    5555      ///
    5656      /// \note You have to specify the graph for this constructor.
    57       UndirGraphEdge(const UndirGraph &g,
    58                      UndirEdge undir_edge, Node n) {
    59         ignore_unused_variable_warning(undir_edge);
     57      UGraphEdge(const UGraph &g,
     58                     UEdge u_edge, Node n) {
     59        ignore_unused_variable_warning(u_edge);
    6060        ignore_unused_variable_warning(g);
    6161        ignore_unused_variable_warning(n);
     
    6363
    6464      /// \e
    65       UndirGraphEdge& operator=(UndirGraphEdge) { return *this; }
     65      UGraphEdge& operator=(UGraphEdge) { return *this; }
    6666
    6767      /// \e
    68       bool operator==(UndirGraphEdge) const { return true; }
     68      bool operator==(UGraphEdge) const { return true; }
    6969      /// \e
    70       bool operator!=(UndirGraphEdge) const { return false; }
     70      bool operator!=(UGraphEdge) const { return false; }
    7171
    7272      /// \e
    73       bool operator<(UndirGraphEdge) const { return false; }
     73      bool operator<(UGraphEdge) const { return false; }
    7474
    7575      template <typename Edge>
     
    8080        void const_constraints() const {
    8181          /// \bug This should be is_base_and_derived ...
    82           UndirEdge ue = e;
     82          UEdge ue = e;
    8383          ue = e;
    8484
     
    8787        }
    8888        Edge e;
    89         UndirEdge ue;
    90         UndirGraph graph;
     89        UEdge ue;
     90        UGraph graph;
    9191        Node n;
    9292      };
     
    9494   
    9595
    96     struct BaseIterableUndirGraphConcept {
     96    struct BaseIterableUGraphConcept {
    9797
    9898      template <typename Graph>
    9999      struct Constraints {
    100100
    101         typedef typename Graph::UndirEdge UndirEdge;
     101        typedef typename Graph::UEdge UEdge;
    102102        typedef typename Graph::Edge Edge;
    103103        typedef typename Graph::Node Node;
     
    105105        void constraints() {
    106106          checkConcept<BaseIterableGraphComponent, Graph>();
    107           checkConcept<GraphItem<>, UndirEdge>();
    108           //checkConcept<UndirGraphEdge<Graph>, Edge>();
     107          checkConcept<GraphItem<>, UEdge>();
     108          //checkConcept<UGraphEdge<Graph>, Edge>();
    109109
    110110          graph.first(ue);
     
    121121          bool b;
    122122          b = graph.direction(e);
    123           Edge e = graph.direct(UndirEdge(), true);
    124           e = graph.direct(UndirEdge(), n);
     123          Edge e = graph.direct(UEdge(), true);
     124          e = graph.direct(UEdge(), n);
    125125 
    126126          ignore_unused_variable_warning(b);
     
    130130        Edge e;
    131131        Node n0;
    132         UndirEdge ue;
     132        UEdge ue;
    133133      };
    134134
     
    136136
    137137
    138     struct IterableUndirGraphConcept {
     138    struct IterableUGraphConcept {
    139139
    140140      template <typename Graph>
     
    143143          /// \todo we don't need the iterable component to be base iterable
    144144          /// Don't we really???
    145           //checkConcept< BaseIterableUndirGraphConcept, Graph > ();
     145          //checkConcept< BaseIterableUGraphConcept, Graph > ();
    146146
    147147          checkConcept<IterableGraphComponent, Graph> ();
    148148
    149           typedef typename Graph::UndirEdge UndirEdge;
    150           typedef typename Graph::UndirEdgeIt UndirEdgeIt;
     149          typedef typename Graph::UEdge UEdge;
     150          typedef typename Graph::UEdgeIt UEdgeIt;
    151151          typedef typename Graph::IncEdgeIt IncEdgeIt;
    152152
    153           checkConcept<GraphIterator<Graph, UndirEdge>, UndirEdgeIt>();
    154           checkConcept<GraphIncIterator<Graph, UndirEdge>, IncEdgeIt>();
     153          checkConcept<GraphIterator<Graph, UEdge>, UEdgeIt>();
     154          checkConcept<GraphIncIterator<Graph, UEdge>, IncEdgeIt>();
    155155        }
    156156      };
     
    158158    };
    159159
    160     struct MappableUndirGraphConcept {
     160    struct MappableUGraphConcept {
    161161
    162162      template <typename Graph>
     
    172172          checkConcept<MappableGraphComponent, Graph>();
    173173
    174           typedef typename Graph::template UndirEdgeMap<int> IntMap;
    175           checkConcept<GraphMap<Graph, typename Graph::UndirEdge, int>,
     174          typedef typename Graph::template UEdgeMap<int> IntMap;
     175          checkConcept<GraphMap<Graph, typename Graph::UEdge, int>,
    176176            IntMap >();
    177177
    178           typedef typename Graph::template UndirEdgeMap<bool> BoolMap;
    179           checkConcept<GraphMap<Graph, typename Graph::UndirEdge, bool>,
     178          typedef typename Graph::template UEdgeMap<bool> BoolMap;
     179          checkConcept<GraphMap<Graph, typename Graph::UEdge, bool>,
    180180            BoolMap >();
    181181
    182           typedef typename Graph::template UndirEdgeMap<Dummy> DummyMap;
    183           checkConcept<GraphMap<Graph, typename Graph::UndirEdge, Dummy>,
     182          typedef typename Graph::template UEdgeMap<Dummy> DummyMap;
     183          checkConcept<GraphMap<Graph, typename Graph::UEdge, Dummy>,
    184184            DummyMap >();
    185185        }
     
    188188    };
    189189
    190     struct ExtendableUndirGraphConcept {
     190    struct ExtendableUGraphConcept {
    191191
    192192      template <typename Graph>
     
    197197        }
    198198        typename Graph::Node node_a, node_b;
    199         typename Graph::UndirEdge uedge;
     199        typename Graph::UEdge uedge;
    200200        Graph graph;
    201201      };
     
    203203    };
    204204
    205     struct ErasableUndirGraphConcept {
     205    struct ErasableUGraphConcept {
    206206
    207207      template <typename Graph>
     
    213213        Graph graph;
    214214        typename Graph::Node n;
    215         typename Graph::UndirEdge e;
     215        typename Graph::UEdge e;
    216216      };
    217217
     
    234234    /// In LEMON undirected graphs also fulfill the concept of directed
    235235    /// graphs (\ref lemon::concept::StaticGraph "Graph Concept"). For
    236     /// explanation of this and more see also the page \ref undir_graphs,
     236    /// explanation of this and more see also the page \ref ugraphs,
    237237    /// a tutorial about undirected graphs.
    238238    ///
     
    241241    /// to the StaticGraph concept.
    242242
    243     class UndirGraph {
     243    class UGraph {
    244244    public:
    245245      ///\e
     
    247247      ///\todo undocumented
    248248      ///
    249       typedef True UndirTag;
     249      typedef True UTag;
    250250
    251251      /// \brief The base type of node iterators,
     
    330330        /// Sets the iterator to the first node of \c g.
    331331        ///
    332         NodeIt(const UndirGraph&) { }
     332        NodeIt(const UGraph&) { }
    333333        /// Node -> NodeIt conversion.
    334334
     
    337337        /// This feature necessitates that each time we
    338338        /// iterate the edge-set, the iteration order is the same.
    339         NodeIt(const UndirGraph&, const Node&) { }
     339        NodeIt(const UGraph&, const Node&) { }
    340340        /// Next node.
    341341
     
    350350      /// The base type of the undirected edge iterators.
    351351      ///
    352       class UndirEdge {
     352      class UEdge {
    353353      public:
    354354        /// Default constructor
     
    356356        /// @warning The default constructor sets the iterator
    357357        /// to an undefined value.
    358         UndirEdge() { }
    359         /// Copy constructor.
    360 
    361         /// Copy constructor.
    362         ///
    363         UndirEdge(const UndirEdge&) { }
    364         /// Initialize the iterator to be invalid.
    365 
    366         /// Initialize the iterator to be invalid.
    367         ///
    368         UndirEdge(Invalid) { }
     358        UEdge() { }
     359        /// Copy constructor.
     360
     361        /// Copy constructor.
     362        ///
     363        UEdge(const UEdge&) { }
     364        /// Initialize the iterator to be invalid.
     365
     366        /// Initialize the iterator to be invalid.
     367        ///
     368        UEdge(Invalid) { }
    369369        /// Equality operator
    370370
    371371        /// Two iterators are equal if and only if they point to the
    372372        /// same object or both are invalid.
    373         bool operator==(UndirEdge) const { return true; }
     373        bool operator==(UEdge) const { return true; }
    374374        /// Inequality operator
    375375
    376         /// \sa operator==(UndirEdge n)
    377         ///
    378         bool operator!=(UndirEdge) const { return true; }
     376        /// \sa operator==(UEdge n)
     377        ///
     378        bool operator!=(UEdge) const { return true; }
    379379
    380380        /// Artificial ordering operator.
     
    388388        ///
    389389        /// \bug This is a technical requirement. Do we really need this?
    390         bool operator<(UndirEdge) const { return false; }
     390        bool operator<(UEdge) const { return false; }
    391391      };
    392392
     
    398398      /// \code
    399399      /// int count=0;
    400       /// for(Graph::UndirEdgeIt e(g); e!=INVALID; ++e) ++count;
     400      /// for(Graph::UEdgeIt e(g); e!=INVALID; ++e) ++count;
    401401      /// \endcode
    402       class UndirEdgeIt : public UndirEdge {
     402      class UEdgeIt : public UEdge {
    403403      public:
    404404        /// Default constructor
     
    406406        /// @warning The default constructor sets the iterator
    407407        /// to an undefined value.
    408         UndirEdgeIt() { }
    409         /// Copy constructor.
    410 
    411         /// Copy constructor.
    412         ///
    413         UndirEdgeIt(const UndirEdgeIt& e) : UndirEdge(e) { }
    414         /// Initialize the iterator to be invalid.
    415 
    416         /// Initialize the iterator to be invalid.
    417         ///
    418         UndirEdgeIt(Invalid) { }
     408        UEdgeIt() { }
     409        /// Copy constructor.
     410
     411        /// Copy constructor.
     412        ///
     413        UEdgeIt(const UEdgeIt& e) : UEdge(e) { }
     414        /// Initialize the iterator to be invalid.
     415
     416        /// Initialize the iterator to be invalid.
     417        ///
     418        UEdgeIt(Invalid) { }
    419419        /// This constructor sets the iterator to the first undirected edge.
    420420   
    421421        /// This constructor sets the iterator to the first undirected edge.
    422         UndirEdgeIt(const UndirGraph&) { }
    423         /// UndirEdge -> UndirEdgeIt conversion
     422        UEdgeIt(const UGraph&) { }
     423        /// UEdge -> UEdgeIt conversion
    424424
    425425        /// Sets the iterator to the value of the trivial iterator.
     
    427427        /// iterate the undirected edge-set, the iteration order is the
    428428        /// same.
    429         UndirEdgeIt(const UndirGraph&, const UndirEdge&) { }
     429        UEdgeIt(const UGraph&, const UEdge&) { }
    430430        /// Next undirected edge
    431431       
    432432        /// Assign the iterator to the next undirected edge.
    433         UndirEdgeIt& operator++() { return *this; }
     433        UEdgeIt& operator++() { return *this; }
    434434      };
    435435
     
    448448      /// for(Graph::IncEdgeIt e(g, n); e!=INVALID; ++e) ++count;
    449449      /// \endcode
    450       class IncEdgeIt : public UndirEdge {
     450      class IncEdgeIt : public UEdge {
    451451      public:
    452452        /// Default constructor
     
    459459        /// Copy constructor.
    460460        ///
    461         IncEdgeIt(const IncEdgeIt& e) : UndirEdge(e) { }
     461        IncEdgeIt(const IncEdgeIt& e) : UEdge(e) { }
    462462        /// Initialize the iterator to be invalid.
    463463
     
    469469        /// This constructor set the iterator to the first incident edge of
    470470        /// the node.
    471         IncEdgeIt(const UndirGraph&, const Node&) { }
    472         /// UndirEdge -> IncEdgeIt conversion
     471        IncEdgeIt(const UGraph&, const Node&) { }
     472        /// UEdge -> IncEdgeIt conversion
    473473
    474474        /// Sets the iterator to the value of the trivial iterator \c e.
    475475        /// This feature necessitates that each time we
    476476        /// iterate the edge-set, the iteration order is the same.
    477         IncEdgeIt(const UndirGraph&, const UndirEdge&) { }
     477        IncEdgeIt(const UGraph&, const UEdge&) { }
    478478        /// Next incident edge
    479479
     
    487487      /// The directed edge type. It can be converted to the
    488488      /// undirected edge.
    489       class Edge : public UndirEdge {
     489      class Edge : public UEdge {
    490490      public:
    491491        /// Default constructor
     
    498498        /// Copy constructor.
    499499        ///
    500         Edge(const Edge& e) : UndirEdge(e) { }
     500        Edge(const Edge& e) : UEdge(e) { }
    501501        /// Initialize the iterator to be invalid.
    502502
     
    558558        /// This constructor sets the iterator to the first edge of \c g.
    559559        ///@param g the graph
    560         EdgeIt(const UndirGraph &g) { ignore_unused_variable_warning(g); }
     560        EdgeIt(const UGraph &g) { ignore_unused_variable_warning(g); }
    561561        /// Edge -> EdgeIt conversion
    562562
     
    564564        /// This feature necessitates that each time we
    565565        /// iterate the edge-set, the iteration order is the same.
    566         EdgeIt(const UndirGraph&, const Edge&) { }
     566        EdgeIt(const UGraph&, const Edge&) { }
    567567        ///Next edge
    568568       
     
    606606        ///@param n the node
    607607        ///@param g the graph
    608         OutEdgeIt(const UndirGraph& n, const Node& g) {
     608        OutEdgeIt(const UGraph& n, const Node& g) {
    609609          ignore_unused_variable_warning(n);
    610610          ignore_unused_variable_warning(g);
     
    615615        /// This feature necessitates that each time we
    616616        /// iterate the edge-set, the iteration order is the same.
    617         OutEdgeIt(const UndirGraph&, const Edge&) { }
     617        OutEdgeIt(const UGraph&, const Edge&) { }
    618618        ///Next outgoing edge
    619619       
     
    658658        ///@param n the node
    659659        ///@param g the graph
    660         InEdgeIt(const UndirGraph& g, const Node& n) {
     660        InEdgeIt(const UGraph& g, const Node& n) {
    661661          ignore_unused_variable_warning(n);
    662662          ignore_unused_variable_warning(g);
     
    667667        /// This feature necessitates that each time we
    668668        /// iterate the edge-set, the iteration order is the same.
    669         InEdgeIt(const UndirGraph&, const Edge&) { }
     669        InEdgeIt(const UGraph&, const Edge&) { }
    670670        /// Next incoming edge
    671671
     
    688688
    689689        ///\e
    690         NodeMap(const UndirGraph&) { }
     690        NodeMap(const UGraph&) { }
    691691        ///\e
    692         NodeMap(const UndirGraph&, T) { }
     692        NodeMap(const UGraph&, T) { }
    693693
    694694        ///Copy constructor
     
    712712
    713713        ///\e
    714         EdgeMap(const UndirGraph&) { }
     714        EdgeMap(const UGraph&) { }
    715715        ///\e
    716         EdgeMap(const UndirGraph&, T) { }
     716        EdgeMap(const UGraph&, T) { }
    717717        ///Copy constructor
    718718        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { }
     
    726726      /// Reference map of the edges to type \c T.
    727727      /// \sa Reference
    728       /// \warning Making maps that can handle bool type (UndirEdgeMap<bool>)
     728      /// \warning Making maps that can handle bool type (UEdgeMap<bool>)
    729729      /// needs some extra attention!
    730730      /// \todo Wrong documentation
    731731      template<class T>
    732       class UndirEdgeMap : public ReadWriteMap<UndirEdge,T>
     732      class UEdgeMap : public ReadWriteMap<UEdge,T>
    733733      {
    734734      public:
    735735
    736736        ///\e
    737         UndirEdgeMap(const UndirGraph&) { }
     737        UEdgeMap(const UGraph&) { }
    738738        ///\e
    739         UndirEdgeMap(const UndirGraph&, T) { }
     739        UEdgeMap(const UGraph&, T) { }
    740740        ///Copy constructor
    741         UndirEdgeMap(const UndirEdgeMap& em) : ReadWriteMap<UndirEdge,T>(em) {}
     741        UEdgeMap(const UEdgeMap& em) : ReadWriteMap<UEdge,T>(em) {}
    742742        ///Assignment operator
    743         UndirEdgeMap &operator=(const UndirEdgeMap&) { return *this; }
     743        UEdgeMap &operator=(const UEdgeMap&) { return *this; }
    744744        // \todo fix this concept   
    745745      };
     
    749749      /// Direct the given undirected edge. The returned edge source
    750750      /// will be the given edge.
    751       Edge direct(const UndirEdge&, const Node&) const {
     751      Edge direct(const UEdge&, const Node&) const {
    752752        return INVALID;
    753753      }
     
    758758      /// will be the source of the undirected edge if the given bool
    759759      /// is true.
    760       Edge direct(const UndirEdge&, bool) const {
     760      Edge direct(const UEdge&, bool) const {
    761761        return INVALID;
    762762      }
     
    776776      ///
    777777      /// \return the opposite of the given Node on the given Edge
    778       Node oppositeNode(Node, UndirEdge) const { return INVALID; }
     778      Node oppositeNode(Node, UEdge) const { return INVALID; }
    779779
    780780      /// \brief First node of the undirected edge.
    781781      ///
    782       /// \return the first node of the given UndirEdge.
    783       ///
    784       /// Naturally undirectected edges don't have direction and thus
     782      /// \return the first node of the given UEdge.
     783      ///
     784      /// Naturally uectected edges don't have direction and thus
    785785      /// don't have source and target node. But we use these two methods
    786786      /// to query the two endnodes of the edge. The direction of the edge
     
    789789      /// of the directed versions of the edges.
    790790      /// \sa direction
    791       Node source(UndirEdge) const { return INVALID; }
     791      Node source(UEdge) const { return INVALID; }
    792792
    793793      /// \brief Second node of the undirected edge.
    794       Node target(UndirEdge) const { return INVALID; }
     794      Node target(UEdge) const { return INVALID; }
    795795
    796796      /// \brief Source node of the directed edge.
     
    818818//       /// developpers_interface "Developpers' interface", so it shouldn't
    819819//       /// be used in an end-user program.
    820       void first(UndirEdge&) const {}
     820      void first(UEdge&) const {}
    821821//       /// \brief Next undirected edge of the graph
    822822//       ///
     
    824824//       /// developpers_interface "Developpers' interface", so it shouldn't
    825825//       /// be used in an end-user program.
    826       void next(UndirEdge&) const {}
     826      void next(UEdge&) const {}
    827827
    828828//       /// \brief First directed edge of the graph
     
    911911      struct Constraints {
    912912        void constraints() {
    913           checkConcept<BaseIterableUndirGraphConcept, Graph>();
    914           checkConcept<IterableUndirGraphConcept, Graph>();
    915           checkConcept<MappableUndirGraphConcept, Graph>();
     913          checkConcept<BaseIterableUGraphConcept, Graph>();
     914          checkConcept<IterableUGraphConcept, Graph>();
     915          checkConcept<MappableUGraphConcept, Graph>();
    916916        }
    917917      };
     
    921921    /// \brief An empty non-static undirected graph class.
    922922    ///   
    923     /// This class provides everything that \ref UndirGraph does.
     923    /// This class provides everything that \ref UGraph does.
    924924    /// Additionally it enables building graphs from scratch.
    925     class ExtendableUndirGraph : public UndirGraph {
     925    class ExtendableUGraph : public UGraph {
    926926    public:
    927927     
     
    936936      /// Add a new undirected edge to the graph.
    937937      /// \return the new edge.
    938       UndirEdge addEdge(const Node& from, const Node& to);
     938      UEdge addEdge(const Node& from, const Node& to);
    939939
    940940      /// \brief Resets the graph.
     
    947947      struct Constraints {
    948948        void constraints() {
    949           checkConcept<BaseIterableUndirGraphConcept, Graph>();
    950           checkConcept<IterableUndirGraphConcept, Graph>();
    951           checkConcept<MappableUndirGraphConcept, Graph>();
    952 
    953           checkConcept<UndirGraph, Graph>();
    954           checkConcept<ExtendableUndirGraphConcept, Graph>();
     949          checkConcept<BaseIterableUGraphConcept, Graph>();
     950          checkConcept<IterableUGraphConcept, Graph>();
     951          checkConcept<MappableUGraphConcept, Graph>();
     952
     953          checkConcept<UGraph, Graph>();
     954          checkConcept<ExtendableUGraphConcept, Graph>();
    955955          checkConcept<ClearableGraphComponent, Graph>();
    956956        }
     
    961961    /// \brief An empty erasable undirected graph class.
    962962    ///
    963     /// This class is an extension of \ref ExtendableUndirGraph. It makes it
     963    /// This class is an extension of \ref ExtendableUGraph. It makes it
    964964    /// possible to erase undirected edges or nodes.
    965     class ErasableUndirGraph : public ExtendableUndirGraph {
     965    class ErasableUGraph : public ExtendableUGraph {
    966966    public:
    967967
     
    975975      /// Deletes an undirected edge.
    976976      ///
    977       void erase(UndirEdge) { }
     977      void erase(UEdge) { }
    978978
    979979      template <typename Graph>
    980980      struct Constraints {
    981981        void constraints() {
    982           checkConcept<ExtendableUndirGraph, Graph>();
    983           checkConcept<ErasableUndirGraphConcept, Graph>();
     982          checkConcept<ExtendableUGraph, Graph>();
     983          checkConcept<ErasableUGraphConcept, Graph>();
    984984        }
    985985      };
  • lemon/edge_set.h

    r1875 r1909  
    295295  ///
    296296  /// \brief Graph using a node set of another graph and an
    297   /// own undir edge set.
     297  /// own uedge set.
    298298  ///
    299299  /// This structure can be used to establish another graph over a node set
     
    308308  /// \ref concept::ExtendableGraph "ExtendableGraph" concept.
    309309  template <typename _Graph>
    310   class ListUndirEdgeSet :
    311     public ErasableUndirEdgeSetExtender<
    312     ClearableUndirEdgeSetExtender<
    313     ExtendableUndirEdgeSetExtender<
    314     MappableUndirEdgeSetExtender<
    315     IterableUndirGraphExtender<
    316     AlterableUndirEdgeSetExtender<
    317     UndirGraphExtender<
     310  class ListUEdgeSet :
     311    public ErasableUEdgeSetExtender<
     312    ClearableUEdgeSetExtender<
     313    ExtendableUEdgeSetExtender<
     314    MappableUEdgeSetExtender<
     315    IterableUGraphExtender<
     316    AlterableUEdgeSetExtender<
     317    UGraphExtender<
    318318    ListEdgeSetBase<_Graph> > > > > > > > {
    319319
    320320  public:
    321321
    322     typedef ErasableUndirEdgeSetExtender<
    323       ClearableUndirEdgeSetExtender<
    324       ExtendableUndirEdgeSetExtender<
    325       MappableUndirEdgeSetExtender<
    326       IterableUndirGraphExtender<
    327       AlterableUndirEdgeSetExtender<
    328       UndirGraphExtender<
     322    typedef ErasableUEdgeSetExtender<
     323      ClearableUEdgeSetExtender<
     324      ExtendableUEdgeSetExtender<
     325      MappableUEdgeSetExtender<
     326      IterableUGraphExtender<
     327      AlterableUEdgeSetExtender<
     328      UGraphExtender<
    329329      ListEdgeSetBase<_Graph> > > > > > > > Parent;
    330330   
     
    355355      typedef NodesImplBase Parent;
    356356     
    357       NodesImpl(const Graph& graph, ListUndirEdgeSet& edgeset)
     357      NodesImpl(const Graph& graph, ListUEdgeSet& edgeset)
    358358        : Parent(graph), _edgeset(edgeset) {}
    359359     
     
    376376
    377377    private:
    378       ListUndirEdgeSet& _edgeset;
     378      ListUEdgeSet& _edgeset;
    379379    };
    380380
     
    386386    ///
    387387    /// Constructor of the adaptor.
    388     ListUndirEdgeSet(const Graph& graph) : nodes(graph, *this) {
     388    ListUEdgeSet(const Graph& graph) : nodes(graph, *this) {
    389389      Parent::initalize(graph, nodes);
    390390    }
  • lemon/euler.h

    r1875 r1909  
    125125  ///Euler tour of \c g.
    126126  ///\code
    127   ///  for(UndirEulerIt<UndirListGraph> e(g),e!=INVALID;++e) {
    128   ///    std::cout << g.id(UndirEdge(e)) << std::eol;
     127  ///  for(UEulerIt<ListUGraph> e(g),e!=INVALID;++e) {
     128  ///    std::cout << g.id(UEdge(e)) << std::eol;
    129129  ///  }
    130130  ///\endcode
    131131  ///Although the iterator provides an Euler tour of an undirected graph,
    132   ///in order to indicate the direction of the tour, UndirEulerIt
     132  ///in order to indicate the direction of the tour, UEulerIt
    133133  ///returns directed edges (that convert to the undirected ones, of course).
    134134  ///
     
    136136  ///\todo Test required
    137137  template<class Graph>
    138   class UndirEulerIt
     138  class UEulerIt
    139139  {
    140140    typedef typename Graph::Node Node;
     
    147147    const Graph &g;
    148148    typename Graph::NodeMap<OutEdgeIt> nedge;
    149     typename Graph::UndirEdgeMap<bool> visited;
     149    typename Graph::UEdgeMap<bool> visited;
    150150    std::list<Edge> euler;
    151151
     
    157157    ///\param start The starting point of the tour. If it is not given
    158158    ///       the tour will start from the first node.
    159     UndirEulerIt(const Graph &_g,typename Graph::Node start=INVALID)
     159    UEulerIt(const Graph &_g,typename Graph::Node start=INVALID)
    160160      : g(_g), nedge(g), visited(g,false)
    161161    {
     
    176176   
    177177    ///Next edge of the tour
    178     UndirEulerIt &operator++() {
     178    UEulerIt &operator++() {
    179179      Node s=g.target(euler.front());
    180180      euler.pop_front();
     
    197197   
    198198    ///\warning This incrementation
    199     ///returns an \c Edge, not an \ref UndirEulerIt, as one may
     199    ///returns an \c Edge, not an \ref UEulerIt, as one may
    200200    ///expect.
    201201    Edge operator++(int)
     
    225225  bool
    226226#else
    227   typename enable_if<typename Graph::UndirTag,bool>::type
     227  typename enable_if<typename Graph::UTag,bool>::type
    228228  euler(const Graph &g)
    229229  {
     
    233233  }
    234234  template<class Graph>
    235   typename disable_if<typename Graph::UndirTag,bool>::type
     235  typename disable_if<typename Graph::UTag,bool>::type
    236236#endif
    237237  euler(const Graph &g)
  • lemon/full_graph.h

    r1875 r1909  
    3232///\ingroup graphs
    3333///\file
    34 ///\brief FullGraph and UndirFullGraph classes.
     34///\brief FullGraph and FullUGraph classes.
    3535
    3636
     
    214214
    215215
    216   class UndirFullGraphBase {
     216  class FullUGraphBase {
    217217    int _nodeNum;
    218218    int _edgeNum;
    219219  public:
    220220
    221     typedef UndirFullGraphBase Graph;
     221    typedef FullUGraphBase Graph;
    222222
    223223    class Node;
     
    226226  public:
    227227
    228     UndirFullGraphBase() {}
     228    FullUGraphBase() {}
    229229
    230230
     
    302302     
    303303    class Node {
    304       friend class UndirFullGraphBase;
     304      friend class FullUGraphBase;
    305305
    306306    protected:
     
    318318
    319319    class Edge {
    320       friend class UndirFullGraphBase;
     320      friend class FullUGraphBase;
    321321     
    322322    protected:
     
    378378  };
    379379
    380   typedef StaticMappableUndirGraphExtender<
    381     IterableUndirGraphExtender<
    382     AlterableUndirGraphExtender<
    383     UndirGraphExtender<UndirFullGraphBase> > > > ExtendedUndirFullGraphBase;
     380  typedef StaticMappableUGraphExtender<
     381    IterableUGraphExtender<
     382    AlterableUGraphExtender<
     383    UGraphExtender<FullUGraphBase> > > > ExtendedFullUGraphBase;
    384384
    385385  /// \ingroup graphs
     
    391391  /// edges or nodes.
    392392  ///
    393   /// The main difference beetween the \e FullGraph and \e UndirFullGraph class
     393  /// The main difference beetween the \e FullGraph and \e FullUGraph class
    394394  /// is that this class conforms to the undirected graph concept and
    395395  /// it does not contain the loop edges.
     
    398398  ///
    399399  /// \author Balazs Dezso
    400   class UndirFullGraph : public ExtendedUndirFullGraphBase {
    401   public:
    402     UndirFullGraph(int n) { construct(n); }
     400  class FullUGraph : public ExtendedFullUGraphBase {
     401  public:
     402    FullUGraph(int n) { construct(n); }
    403403  };
    404404
    405405
    406   class FullUndirBipartiteGraphBase {
     406  class FullUBipartiteGraphBase {
    407407  protected:
    408408
     
    416416    class NodeSetError : public LogicError {
    417417      virtual const char* exceptionName() const {
    418         return "lemon::FullUndirBipartiteGraph::NodeSetError";
     418        return "lemon::FullUBipartiteGraph::NodeSetError";
    419419      }
    420420    };
    421421 
    422422    class Node {
    423       friend class FullUndirBipartiteGraphBase;
     423      friend class FullUBipartiteGraphBase;
    424424    protected:
    425425      int id;
     
    435435
    436436    class Edge {
    437       friend class FullUndirBipartiteGraphBase;
     437      friend class FullUBipartiteGraphBase;
    438438    protected:
    439439      int id;
     
    576576
    577577
    578   typedef StaticMappableUndirBipartiteGraphExtender<
    579     IterableUndirBipartiteGraphExtender<
    580     AlterableUndirBipartiteGraphExtender<
    581     UndirBipartiteGraphExtender <
    582     FullUndirBipartiteGraphBase> > > >
    583   ExtendedFullUndirBipartiteGraphBase;
    584 
    585 
    586   class FullUndirBipartiteGraph :
    587     public ExtendedFullUndirBipartiteGraphBase {
    588   public:
    589     typedef ExtendedFullUndirBipartiteGraphBase Parent;
    590     FullUndirBipartiteGraph(int upperNodeNum, int lowerNodeNum) {
     578  typedef StaticMappableUBipartiteGraphExtender<
     579    IterableUBipartiteGraphExtender<
     580    AlterableUBipartiteGraphExtender<
     581    UBipartiteGraphExtender <
     582    FullUBipartiteGraphBase> > > >
     583  ExtendedFullUBipartiteGraphBase;
     584
     585
     586  class FullUBipartiteGraph :
     587    public ExtendedFullUBipartiteGraphBase {
     588  public:
     589    typedef ExtendedFullUBipartiteGraphBase Parent;
     590    FullUBipartiteGraph(int upperNodeNum, int lowerNodeNum) {
    591591      Parent::construct(upperNodeNum, lowerNodeNum);
    592592    }
  • lemon/graph_adaptor.h

    r1875 r1909  
    673673
    674674  template <typename _Graph>
    675   class UndirGraphAdaptorBase :
    676     public UndirGraphExtender<GraphAdaptorBase<_Graph> > {
     675  class UGraphAdaptorBase :
     676    public UGraphExtender<GraphAdaptorBase<_Graph> > {
    677677  public:
    678678    typedef _Graph Graph;
    679     typedef UndirGraphExtender<GraphAdaptorBase<_Graph> > Parent;
     679    typedef UGraphExtender<GraphAdaptorBase<_Graph> > Parent;
    680680  protected:
    681     UndirGraphAdaptorBase() : Parent() { }
    682   public:
    683     typedef typename Parent::UndirEdge UndirEdge;
     681    UGraphAdaptorBase() : Parent() { }
     682  public:
     683    typedef typename Parent::UEdge UEdge;
    684684    typedef typename Parent::Edge Edge;
    685685   
     
    687687    class EdgeMap {
    688688    protected:
    689       const UndirGraphAdaptorBase<_Graph>* g;
     689      const UGraphAdaptorBase<_Graph>* g;
    690690      template <typename TT> friend class EdgeMap;
    691691      typename _Graph::template EdgeMap<T> forward_map, backward_map;
     
    694694      typedef Edge Key;
    695695     
    696       EdgeMap(const UndirGraphAdaptorBase<_Graph>& _g) : g(&_g),
     696      EdgeMap(const UGraphAdaptorBase<_Graph>& _g) : g(&_g),
    697697        forward_map(*(g->graph)), backward_map(*(g->graph)) { }
    698698
    699       EdgeMap(const UndirGraphAdaptorBase<_Graph>& _g, T a) : g(&_g),
     699      EdgeMap(const UGraphAdaptorBase<_Graph>& _g, T a) : g(&_g),
    700700        forward_map(*(g->graph), a), backward_map(*(g->graph), a) { }
    701701     
     
    716716       
    717717    template <typename T>
    718     class UndirEdgeMap {
    719       template <typename TT> friend class UndirEdgeMap;
     718    class UEdgeMap {
     719      template <typename TT> friend class UEdgeMap;
    720720      typename _Graph::template EdgeMap<T> map;
    721721    public:
    722722      typedef T Value;
    723       typedef UndirEdge Key;
    724      
    725       UndirEdgeMap(const UndirGraphAdaptorBase<_Graph>& g) :
     723      typedef UEdge Key;
     724     
     725      UEdgeMap(const UGraphAdaptorBase<_Graph>& g) :
    726726        map(*(g.graph)) { }
    727727
    728       UndirEdgeMap(const UndirGraphAdaptorBase<_Graph>& g, T a) :
     728      UEdgeMap(const UGraphAdaptorBase<_Graph>& g, T a) :
    729729        map(*(g.graph), a) { }
    730730     
    731       void set(UndirEdge e, T a) {
     731      void set(UEdge e, T a) {
    732732        map.set(e, a);
    733733      }
    734734
    735       T operator[](UndirEdge e) const {
     735      T operator[](UEdge e) const {
    736736        return map[e];
    737737      }
     
    747747  /// \author Marton Makai
    748748  template<typename _Graph>
    749   class UndirGraphAdaptor :
    750     public IterableUndirGraphExtender<
    751     UndirGraphAdaptorBase<_Graph> > {
     749  class UGraphAdaptor :
     750    public IterableUGraphExtender<
     751    UGraphAdaptorBase<_Graph> > {
    752752  public:
    753753    typedef _Graph Graph;
    754     typedef IterableUndirGraphExtender<
    755       UndirGraphAdaptorBase<_Graph> > Parent;
     754    typedef IterableUGraphExtender<
     755      UGraphAdaptorBase<_Graph> > Parent;
    756756  protected:
    757     UndirGraphAdaptor() { }
    758   public:
    759     UndirGraphAdaptor(_Graph& _graph) {
     757    UGraphAdaptor() { }
     758  public:
     759    UGraphAdaptor(_Graph& _graph) {
    760760      setGraph(_graph);
    761761    }
  • lemon/graph_reader.h

    r1901 r1909  
    379379  /// \brief The undirected graph reader class.
    380380  ///
    381   /// The \c UndirGraphReader class provides the graph input.
     381  /// The \c UGraphReader class provides the graph input.
    382382  /// Before you read this documentation it might be useful to read the general
    383383  /// description of  \ref graph-io-page "Graph Input-Output".
     
    391391  ///
    392392  /// If you read a graph you need not read all the maps and items just those
    393   /// that you need. The interface of the \c UndirGraphReader is very similar
    394   /// to the UndirGraphWriter but the reading method does not depend on the
     393  /// that you need. The interface of the \c UGraphReader is very similar
     394  /// to the UGraphWriter but the reading method does not depend on the
    395395  /// order of the given commands.
    396396  ///
     
    400400  ///
    401401  /// \code
    402   /// UndirGraphReader<UndirListGraph> reader(std::cin, graph);
     402  /// UGraphReader<ListUGraph> reader(std::cin, graph);
    403403  /// \endcode
    404404  ///
     
    417417  /// \endcode
    418418  ///
    419   /// With the \c readUndirEdgeMap() member function you can give an
    420   /// undir edge map reading command similar to the NodeMaps.
    421   ///
    422   /// \code
    423   /// reader.readUndirEdgeMap("capacity", capacityMap);
     419  /// With the \c readUEdgeMap() member function you can give an
     420  /// uedge map reading command similar to the NodeMaps.
     421  ///
     422  /// \code
     423  /// reader.readUEdgeMap("capacity", capacityMap);
    424424  /// \endcode
    425425  ///
     
    433433  /// \endcode
    434434  ///
    435   /// With \c readNode() and \c readUndirEdge() functions you can read
    436   /// labeled Nodes and UndirEdges.
     435  /// With \c readNode() and \c readUEdge() functions you can read
     436  /// labeled Nodes and UEdges.
    437437  ///
    438438  /// \code
     
    440440  /// reader.readNode("target", targetNode);
    441441  ///
    442   /// reader.readUndirEdge("observed", undirEdge);
     442  /// reader.readUEdge("observed", uEdge);
    443443  /// \endcode
    444444  ///
     
    456456  /// \see GraphReader
    457457  /// \see DefaultReaderTraits
    458   /// \see \ref UndirGraphWriter
     458  /// \see \ref UGraphWriter
    459459  /// \see \ref graph-io-page
    460460  ///
    461461  /// \author Balazs Dezso
    462462  template <typename _Graph, typename _ReaderTraits = DefaultReaderTraits>
    463   class UndirGraphReader {
     463  class UGraphReader {
    464464  public:
    465465   
     
    467467    typedef typename Graph::Node Node;
    468468    typedef typename Graph::Edge Edge;
    469     typedef typename Graph::UndirEdge UndirEdge;
     469    typedef typename Graph::UEdge UEdge;
    470470
    471471    typedef _ReaderTraits ReaderTraits;
    472472    typedef typename ReaderTraits::Skipper DefaultSkipper;
    473473
    474     /// \brief Construct a new UndirGraphReader.
    475     ///
    476     /// Construct a new UndirGraphReader. It reads into the given graph
     474    /// \brief Construct a new UGraphReader.
     475    ///
     476    /// Construct a new UGraphReader. It reads into the given graph
    477477    /// and it use the given reader as the default skipper.
    478     UndirGraphReader(std::istream& _is, Graph& _graph,
     478    UGraphReader(std::istream& _is, Graph& _graph,
    479479                     const DefaultSkipper& _skipper = DefaultSkipper())
    480480      : reader(new LemonReader(_is)), own_reader(true), skipper(_skipper),
    481481        nodeset_reader(*reader, _graph, std::string(), skipper),
    482         undir_edgeset_reader(*reader, _graph, nodeset_reader,
     482        u_edgeset_reader(*reader, _graph, nodeset_reader,
    483483                             std::string(), skipper),
    484484        node_reader(*reader, nodeset_reader, std::string()),
    485         undir_edge_reader(*reader, undir_edgeset_reader, std::string()),
     485        u_edge_reader(*reader, u_edgeset_reader, std::string()),
    486486        attribute_reader(*reader, std::string()) {}
    487487
    488     /// \brief Construct a new UndirGraphReader.
    489     ///
    490     /// Construct a new UndirGraphReader. It reads into the given graph
     488    /// \brief Construct a new UGraphReader.
     489    ///
     490    /// Construct a new UGraphReader. It reads into the given graph
    491491    /// and it use the given reader as the default skipper.
    492     UndirGraphReader(const std::string& _filename, Graph& _graph,
     492    UGraphReader(const std::string& _filename, Graph& _graph,
    493493                     const DefaultSkipper& _skipper = DefaultSkipper())
    494494      : reader(new LemonReader(_filename)), own_reader(true),
    495495        skipper(_skipper),
    496496        nodeset_reader(*reader, _graph, std::string(), skipper),
    497         undir_edgeset_reader(*reader, _graph, nodeset_reader,
     497        u_edgeset_reader(*reader, _graph, nodeset_reader,
    498498                             std::string(), skipper),
    499499        node_reader(*reader, nodeset_reader, std::string()),
    500         undir_edge_reader(*reader, undir_edgeset_reader, std::string()),
     500        u_edge_reader(*reader, u_edgeset_reader, std::string()),
    501501        attribute_reader(*reader, std::string()) {}
    502502
    503     /// \brief Construct a new UndirGraphReader.
    504     ///
    505     /// Construct a new UndirGraphReader. It reads into the given graph
     503    /// \brief Construct a new UGraphReader.
     504    ///
     505    /// Construct a new UGraphReader. It reads into the given graph
    506506    /// and it use the given reader as the default skipper.
    507     UndirGraphReader(LemonReader& _reader, Graph& _graph,
     507    UGraphReader(LemonReader& _reader, Graph& _graph,
    508508                     const DefaultSkipper& _skipper = DefaultSkipper())
    509509      : reader(_reader), own_reader(false), skipper(_skipper),
    510510        nodeset_reader(*reader, _graph, std::string(), skipper),
    511         undir_edgeset_reader(*reader, _graph, nodeset_reader,
     511        u_edgeset_reader(*reader, _graph, nodeset_reader,
    512512                             std::string(), skipper),
    513513        node_reader(*reader, nodeset_reader, std::string()),
    514         undir_edge_reader(*reader, undir_edgeset_reader, std::string()),
     514        u_edge_reader(*reader, u_edgeset_reader, std::string()),
    515515        attribute_reader(*reader, std::string()) {}
    516516
     
    518518    ///
    519519    /// Destruct the graph reader.
    520     ~UndirGraphReader() {
     520    ~UGraphReader() {
    521521      if (own_reader)
    522522        delete reader;
     
    527527    /// Give a new node map reading command to the reader.
    528528    template <typename Map>
    529     UndirGraphReader& readNodeMap(std::string name, Map& map) {
     529    UGraphReader& readNodeMap(std::string name, Map& map) {
    530530      nodeset_reader.readNodeMap(name, map);
    531531      return *this;
     
    533533
    534534    template <typename Map>
    535     UndirGraphReader& readNodeMap(std::string name, const Map& map) {
     535    UGraphReader& readNodeMap(std::string name, const Map& map) {
    536536      nodeset_reader.readNodeMap(name, map);
    537537      return *this;
     
    542542    /// Give a new node map reading command to the reader.
    543543    template <typename Reader, typename Map>
    544     UndirGraphReader& readNodeMap(std::string name, Map& map,
     544    UGraphReader& readNodeMap(std::string name, Map& map,
    545545                                  const Reader& reader = Reader()) {
    546546      nodeset_reader.readNodeMap(name, map, reader);
     
    549549
    550550    template <typename Reader, typename Map>
    551     UndirGraphReader& readNodeMap(std::string name, const Map& map,
     551    UGraphReader& readNodeMap(std::string name, const Map& map,
    552552                                  const Reader& reader = Reader()) {
    553553      nodeset_reader.readNodeMap(name, map, reader);
     
    559559    /// Give a new node map skipping command to the reader.
    560560    template <typename Reader>
    561     UndirGraphReader& skipNodeMap(std::string name,
     561    UGraphReader& skipNodeMap(std::string name,
    562562                             const Reader& reader = Reader()) {
    563563      nodeset_reader.skipNodeMap(name, reader);
     
    569569    /// Give a new undirected edge map reading command to the reader.
    570570    template <typename Map>
    571     UndirGraphReader& readUndirEdgeMap(std::string name, Map& map) {
    572       undir_edgeset_reader.readUndirEdgeMap(name, map);
    573       return *this;
    574     }
    575 
    576     template <typename Map>
    577     UndirGraphReader& readUndirEdgeMap(std::string name, const Map& map) {
    578       undir_edgeset_reader.readUndirEdgeMap(name, map);
     571    UGraphReader& readUEdgeMap(std::string name, Map& map) {
     572      u_edgeset_reader.readUEdgeMap(name, map);
     573      return *this;
     574    }
     575
     576    template <typename Map>
     577    UGraphReader& readUEdgeMap(std::string name, const Map& map) {
     578      u_edgeset_reader.readUEdgeMap(name, map);
    579579      return *this;
    580580    }
     
    585585    /// Give a new undirected edge map reading command to the reader.
    586586    template <typename Reader, typename Map>
    587     UndirGraphReader& readUndirEdgeMap(std::string name, Map& map,
     587    UGraphReader& readUEdgeMap(std::string name, Map& map,
    588588                                       const Reader& reader = Reader()) {
    589       undir_edgeset_reader.readUndirEdgeMap(name, map, reader);
    590       return *this;
    591     }
    592 
    593     template <typename Reader, typename Map>
    594     UndirGraphReader& readUndirEdgeMap(std::string name, const Map& map,
     589      u_edgeset_reader.readUEdgeMap(name, map, reader);
     590      return *this;
     591    }
     592
     593    template <typename Reader, typename Map>
     594    UGraphReader& readUEdgeMap(std::string name, const Map& map,
    595595                                       const Reader& reader = Reader()) {
    596       undir_edgeset_reader.readUndirEdgeMap(name, map, reader);
     596      u_edgeset_reader.readUEdgeMap(name, map, reader);
    597597      return *this;
    598598    }
     
    602602    /// Give a new undirected edge map skipping command to the reader.
    603603    template <typename Reader>
    604     UndirGraphReader& skipUndirEdgeMap(std::string name,
     604    UGraphReader& skipUEdgeMap(std::string name,
    605605                                       const Reader& reader = Reader()) {
    606       undir_edgeset_reader.skipUndirMap(name, reader);
     606      u_edgeset_reader.skipUMap(name, reader);
    607607      return *this;
    608608    }
     
    613613    /// Give a new edge map reading command to the reader.
    614614    template <typename Map>
    615     UndirGraphReader& readEdgeMap(std::string name, Map& map) {
    616       undir_edgeset_reader.readEdgeMap(name, map);
    617       return *this;
    618     }
    619 
    620     template <typename Map>
    621     UndirGraphReader& readEdgeMap(std::string name, const Map& map) {
    622       undir_edgeset_reader.readEdgeMap(name, map);
     615    UGraphReader& readEdgeMap(std::string name, Map& map) {
     616      u_edgeset_reader.readEdgeMap(name, map);
     617      return *this;
     618    }
     619
     620    template <typename Map>
     621    UGraphReader& readEdgeMap(std::string name, const Map& map) {
     622      u_edgeset_reader.readEdgeMap(name, map);
    623623      return *this;
    624624    }
     
    629629    /// Give a new edge map reading command to the reader.
    630630    template <typename Reader, typename Map>
    631     UndirGraphReader& readEdgeMap(std::string name, Map& map,
     631    UGraphReader& readEdgeMap(std::string name, Map& map,
    632632                                       const Reader& reader = Reader()) {
    633       undir_edgeset_reader.readEdgeMap(name, map, reader);
    634       return *this;
    635     }
    636 
    637     template <typename Reader, typename Map>
    638     UndirGraphReader& readEdgeMap(std::string name, const Map& map,
     633      u_edgeset_reader.readEdgeMap(name, map, reader);
     634      return *this;
     635    }
     636
     637    template <typename Reader, typename Map>
     638    UGraphReader& readEdgeMap(std::string name, const Map& map,
    639639                                       const Reader& reader = Reader()) {
    640       undir_edgeset_reader.readEdgeMap(name, map, reader);
     640      u_edgeset_reader.readEdgeMap(name, map, reader);
    641641      return *this;
    642642    }
     
    646646    /// Give a new edge map skipping command to the reader.
    647647    template <typename Reader>
    648     UndirGraphReader& skipEdgeMap(std::string name,
     648    UGraphReader& skipEdgeMap(std::string name,
    649649                                       const Reader& reader = Reader()) {
    650       undir_edgeset_reader.skipEdgeMap(name, reader);
     650      u_edgeset_reader.skipEdgeMap(name, reader);
    651651      return *this;
    652652    }
     
    655655    ///
    656656    /// Give a new labeled node reading command to the reader.
    657     UndirGraphReader& readNode(std::string name, Node& node) {
     657    UGraphReader& readNode(std::string name, Node& node) {
    658658      node_reader.readNode(name, node);
    659659      return *this;
     
    663663    ///
    664664    /// Give a new labeled edge reading command to the reader.
    665     UndirGraphReader& readEdge(std::string name, Edge& edge) {
    666       undir_edge_reader.readEdge(name, edge);
     665    UGraphReader& readEdge(std::string name, Edge& edge) {
     666      u_edge_reader.readEdge(name, edge);
    667667    }
    668668
     
    671671    ///
    672672    /// Give a new labeled undirected edge reading command to the reader.
    673     UndirGraphReader& readUndirEdge(std::string name, UndirEdge& edge) {
    674       undir_edge_reader.readUndirEdge(name, edge);
     673    UGraphReader& readUEdge(std::string name, UEdge& edge) {
     674      u_edge_reader.readUEdge(name, edge);
    675675    }
    676676
     
    679679    ///  Give a new attribute reading command.
    680680    template <typename Value>
    681     UndirGraphReader& readAttribute(std::string name, Value& value) {
     681    UGraphReader& readAttribute(std::string name, Value& value) {
    682682      attribute_reader.readAttribute(name, value);
    683683      return *this;
     
    688688    ///  Give a new attribute reading command.
    689689    template <typename Reader, typename Value>
    690     UndirGraphReader& readAttribute(std::string name, Value& value,
     690    UGraphReader& readAttribute(std::string name, Value& value,
    691691                               const Reader& reader) {
    692692      attribute_reader.readAttribute<Reader>(name, value, reader);
     
    717717    bool isLabelReader() const {
    718718      return nodeset_reader.isLabelReader() &&
    719         undir_edgeset_reader.isLabelReader();
     719        u_edgeset_reader.isLabelReader();
    720720    }
    721721
     
    733733    /// it. It is possible only if there was read an "label" named edge map.
    734734    void readLabel(std::istream& is, Edge& edge) const {
    735       return undir_edgeset_reader.readLabel(is, edge);
     735      return u_edgeset_reader.readLabel(is, edge);
    736736    }
    737737
     
    741741    /// belongs to it. It is possible only if there was read an "label" named
    742742    /// edge map.
    743     void readLabel(std::istream& is, UndirEdge& uedge) const {
    744       return undir_edgeset_reader.readLabel(is, uedge);
     743    void readLabel(std::istream& is, UEdge& uedge) const {
     744      return u_edgeset_reader.readLabel(is, uedge);
    745745    }
    746746   
     
    754754
    755755    NodeSetReader<Graph, ReaderTraits> nodeset_reader;
    756     UndirEdgeSetReader<Graph, ReaderTraits> undir_edgeset_reader;
     756    UEdgeSetReader<Graph, ReaderTraits> u_edgeset_reader;
    757757
    758758    NodeReader<Graph> node_reader;
    759     UndirEdgeReader<Graph> undir_edge_reader;
     759    UEdgeReader<Graph> u_edge_reader;
    760760   
    761761    AttributeReader<ReaderTraits> attribute_reader;
     
    765765  ///
    766766  /// It is a helper function to read an undirected graph from the given input
    767   /// stream. It gives back an UndirGraphReader object and this object
     767  /// stream. It gives back an UGraphReader object and this object
    768768  /// can read more maps, labeled nodes, edges, undirected edges and
    769769  /// attributes.
     
    774774  /// \param g The graph.
    775775  template<typename Graph>
    776   UndirGraphReader<Graph> undirGraphReader(std::istream& is, Graph &g) {
     776  UGraphReader<Graph> uGraphReader(std::istream& is, Graph &g) {
    777777    return GraphReader<Graph>(is, g);
    778778  }
     
    781781  ///
    782782  /// It is a helper function to read an undirected graph from the given input
    783   /// file. It gives back an UndirGraphReader object and this object
     783  /// file. It gives back an UGraphReader object and this object
    784784  /// can read more maps, labeled nodes, edges, undirected edges and
    785785  /// attributes.
     
    790790  /// \param g The graph.
    791791  template<typename Graph>
    792   UndirGraphReader<Graph> undirGraphReader(const std::string& fn, Graph &g) {
     792  UGraphReader<Graph> uGraphReader(const std::string& fn, Graph &g) {
    793793    return GraphReader<Graph>(fn, g);
    794794  }
  • lemon/graph_to_eps.h

    r1907 r1909  
    235235  char *_nodePsTextsPreamble;
    236236 
    237   bool _undir;
     237  bool _u;
    238238  bool _pleaseRemoveOsStream;
    239239
     
    273273    _showNodeText(false), _nodeTexts(false), _nodeTextSize(1),
    274274    _showNodePsText(false), _nodePsTexts(false), _nodePsTextsPreamble(0),
    275     _undir(false),
     275    _u(false),
    276276    _pleaseRemoveOsStream(_pros), _scaleToA4(false),
    277277    _nodeTextColorType(SAME_COL), _nodeTextColors(Color(0,0,0)),
     
    330330  using T::_nodePsTextsPreamble;
    331331 
    332   using T::_undir;
     332  using T::_u;
    333333  using T::_pleaseRemoveOsStream;
    334334
     
    735735  ///Sets whether the the graph is undirected
    736736  ///
    737   GraphToEps<T> &undir(bool b=true) {_undir=b;return *this;}
     737  GraphToEps<T> &u(bool b=true) {_u=b;return *this;}
    738738  ///Sets whether the the graph is directed
    739739
    740740  ///Sets whether the the graph is directed.
    741741  ///Use it to show the undirected edges as a pair of directed ones.
    742   GraphToEps<T> &bidir(bool b=true) {_undir=!b;return *this;}
     742  GraphToEps<T> &bidir(bool b=true) {_u=!b;return *this;}
    743743
    744744  ///Sets the title.
     
    959959        std::vector<Edge> el;
    960960        for(EdgeIt e(g);e!=INVALID;++e)
    961           if((!_undir||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
     961          if((!_u||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
    962962            el.push_back(e);
    963963        std::sort(el.begin(),el.end(),edgeLess(g));
     
    10471047      }
    10481048      else for(EdgeIt e(g);e!=INVALID;++e)
    1049         if((!_undir||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
     1049        if((!_u||g.source(e)<g.target(e))&&_edgeWidths[e]>0)
    10501050          if(_drawArrows) {
    10511051            xy<double> d(mycoords[g.target(e)]-mycoords[g.source(e)]);
  • lemon/graph_utils.h

    r1875 r1909  
    7272  ///This \c \#define creates the same convenience typedefs as defined by
    7373  ///\ref GRAPH_TYPEDEFS(Graph) and three more, namely it creates
    74   ///\c UndirEdge, \c UndirEdgeIt, \c IncEdgeIt,
    75   ///\c BoolUndirEdgeMap, \c IntUndirEdgeMap,  \c DoubleUndirEdgeMap. 
     74  ///\c UEdge, \c UEdgeIt, \c IncEdgeIt,
     75  ///\c BoolUEdgeMap, \c IntUEdgeMap,  \c DoubleUEdgeMap. 
    7676  ///
    7777  ///\note If \c G it a template parameter, it should be used in this way.
     
    8484#define UNDIRGRAPH_TYPEDEFS(Graph)                              \
    8585  GRAPH_TYPEDEFS(Graph)                                         \
    86     typedef Graph:: UndirEdge   UndirEdge;                      \
    87     typedef Graph:: UndirEdgeIt UndirEdgeIt;                    \
     86    typedef Graph:: UEdge   UEdge;                      \
     87    typedef Graph:: UEdgeIt UEdgeIt;                    \
    8888    typedef Graph:: IncEdgeIt   IncEdgeIt;                     
    89 //     typedef Graph::template UndirEdgeMap<bool> BoolUndirEdgeMap;     
    90 //     typedef Graph::template UndirEdgeMap<int> IntUndirEdgeMap;
    91 //     typedef Graph::template UndirEdgeMap<double> DoubleUndirEdgeMap;
     89//     typedef Graph::template UEdgeMap<bool> BoolUEdgeMap;     
     90//     typedef Graph::template UEdgeMap<int> IntUEdgeMap;
     91//     typedef Graph::template UEdgeMap<double> DoubleUEdgeMap;
    9292 
    9393
     
    163163  inline
    164164  typename enable_if<typename Graph::EdgeNumTag, int>::type
    165   _countUndirEdges(const Graph &g) {
    166     return g.undirEdgeNum();
    167   }
    168 
    169   template <typename Graph>
    170   inline int _countUndirEdges(Wrap<Graph> w) {
    171     return countItems<Graph, typename Graph::UndirEdgeIt>(w.value);
     165  _countUEdges(const Graph &g) {
     166    return g.uEdgeNum();
     167  }
     168
     169  template <typename Graph>
     170  inline int _countUEdges(Wrap<Graph> w) {
     171    return countItems<Graph, typename Graph::UEdgeIt>(w.value);
    172172  }
    173173
     
    179179
    180180  template <typename Graph>
    181   inline int countUndirEdges(const Graph& g) {
    182     return _countUndirEdges<Graph>(g);
     181  inline int countUEdges(const Graph& g) {
     182    return _countUEdges<Graph>(g);
    183183  }
    184184
     
    326326  typename enable_if<
    327327    typename Graph::FindEdgeTag,
    328     typename Graph::UndirEdge>::type
    329   _findUndirEdge(const Graph &g,
     328    typename Graph::UEdge>::type
     329  _findUEdge(const Graph &g,
    330330            typename Graph::Node u, typename Graph::Node v,
    331             typename Graph::UndirEdge prev = INVALID) {
    332     return g.findUndirEdge(u, v, prev);
    333   }
    334 
    335   template <typename Graph>
    336   inline typename Graph::UndirEdge
    337   _findUndirEdge(Wrap<Graph> w,
     331            typename Graph::UEdge prev = INVALID) {
     332    return g.findUEdge(u, v, prev);
     333  }
     334
     335  template <typename Graph>
     336  inline typename Graph::UEdge
     337  _findUEdge(Wrap<Graph> w,
    338338            typename Graph::Node u,
    339339            typename Graph::Node v,
    340             typename Graph::UndirEdge prev = INVALID) {
     340            typename Graph::UEdge prev = INVALID) {
    341341    const Graph& g = w.value;
    342342    if (prev == INVALID) {
     
    351351  }
    352352
    353   /// \brief Finds an undir edge between two nodes of a graph.
    354   ///
    355   /// Finds an undir edge from node \c u to node \c v in graph \c g.
     353  /// \brief Finds an uedge between two nodes of a graph.
     354  ///
     355  /// Finds an uedge from node \c u to node \c v in graph \c g.
    356356  ///
    357357  /// If \c prev is \ref INVALID (this is the default value), then
     
    362362  /// Thus you can iterate through each edge from \c u to \c v as it follows.
    363363  /// \code
    364   /// for(UndirEdge e = findUndirEdge(g,u,v); e != INVALID;
    365   ///     e = findUndirEdge(g,u,v,e)) {
     364  /// for(UEdge e = findUEdge(g,u,v); e != INVALID;
     365  ///     e = findUEdge(g,u,v,e)) {
    366366  ///   ...
    367367  /// }
     
    370370  // /// interface here...
    371371  template <typename Graph>
    372   inline typename Graph::UndirEdge
    373   findUndirEdge(const Graph &g,
     372  inline typename Graph::UEdge
     373  findUEdge(const Graph &g,
    374374                typename Graph::Node u,
    375375                typename Graph::Node v,
    376                 typename Graph::UndirEdge prev = INVALID) {
    377     return _findUndirEdge<Graph>(g, u, v, prev);
    378   }
    379 
    380   /// \brief Iterator for iterating on undir edges connected the same nodes.
    381   ///
    382   /// Iterator for iterating on undir edges connected the same nodes. It is
    383   /// higher level interface for the findUndirEdge() function. You can
     376                typename Graph::UEdge prev = INVALID) {
     377    return _findUEdge<Graph>(g, u, v, prev);
     378  }
     379
     380  /// \brief Iterator for iterating on uedges connected the same nodes.
     381  ///
     382  /// Iterator for iterating on uedges connected the same nodes. It is
     383  /// higher level interface for the findUEdge() function. You can
    384384  /// use it the following way:
    385385  /// \code
    386   /// for (ConUndirEdgeIt<Graph> it(g, src, trg); it != INVALID; ++it) {
     386  /// for (ConUEdgeIt<Graph> it(g, src, trg); it != INVALID; ++it) {
    387387  ///   ...
    388388  /// }
     
    391391  /// \author Balazs Dezso
    392392  template <typename _Graph>
    393   class ConUndirEdgeIt : public _Graph::UndirEdge {
     393  class ConUEdgeIt : public _Graph::UEdge {
    394394  public:
    395395
    396396    typedef _Graph Graph;
    397     typedef typename Graph::UndirEdge Parent;
    398 
    399     typedef typename Graph::UndirEdge UndirEdge;
     397    typedef typename Graph::UEdge Parent;
     398
     399    typedef typename Graph::UEdge UEdge;
    400400    typedef typename Graph::Node Node;
    401401
    402402    /// \brief Constructor.
    403403    ///
    404     /// Construct a new ConUndirEdgeIt iterating on the edges which
     404    /// Construct a new ConUEdgeIt iterating on the edges which
    405405    /// connects the \c u and \c v node.
    406     ConUndirEdgeIt(const Graph& g, Node u, Node v) : graph(g) {
    407       Parent::operator=(findUndirEdge(graph, u, v));
     406    ConUEdgeIt(const Graph& g, Node u, Node v) : graph(g) {
     407      Parent::operator=(findUEdge(graph, u, v));
    408408    }
    409409
    410410    /// \brief Constructor.
    411411    ///
    412     /// Construct a new ConUndirEdgeIt which continues the iterating from
     412    /// Construct a new ConUEdgeIt which continues the iterating from
    413413    /// the \c e edge.
    414     ConUndirEdgeIt(const Graph& g, UndirEdge e) : Parent(e), graph(g) {}
     414    ConUEdgeIt(const Graph& g, UEdge e) : Parent(e), graph(g) {}
    415415   
    416416    /// \brief Increment operator.
    417417    ///
    418418    /// It increments the iterator and gives back the next edge.
    419     ConUndirEdgeIt& operator++() {
    420       Parent::operator=(findUndirEdge(graph, graph.source(*this),
     419    ConUEdgeIt& operator++() {
     420      Parent::operator=(findUEdge(graph, graph.source(*this),
    421421                                      graph.target(*this), *this));
    422422      return *this;
     
    597597  ///
    598598  /// Class to copy an undirected graph to an other graph (duplicate a graph).
    599   /// The simplest way of using it is through the \c copyUndirGraph() function.
     599  /// The simplest way of using it is through the \c copyUGraph() function.
    600600  template <typename Target, typename Source>
    601   class UndirGraphCopy {
     601  class UGraphCopy {
    602602  public:
    603603    typedef typename Source::Node Node;
     
    605605    typedef typename Source::Edge Edge;
    606606    typedef typename Source::EdgeIt EdgeIt;
    607     typedef typename Source::UndirEdge UndirEdge;
    608     typedef typename Source::UndirEdgeIt UndirEdgeIt;
     607    typedef typename Source::UEdge UEdge;
     608    typedef typename Source::UEdgeIt UEdgeIt;
    609609
    610610    typedef typename Source::
     
    612612   
    613613    typedef typename Source::
    614     template UndirEdgeMap<typename Target::UndirEdge> UndirEdgeRefMap;
     614    template UEdgeMap<typename Target::UEdge> UEdgeRefMap;
    615615
    616616  private:
    617617
    618618    struct EdgeRefMap {
    619       EdgeRefMap(UndirGraphCopy& _gc) : gc(_gc) {}
     619      EdgeRefMap(UGraphCopy& _gc) : gc(_gc) {}
    620620      typedef typename Source::Edge Key;
    621621      typedef typename Target::Edge Value;
    622622
    623623      Value operator[](const Key& key) {
    624         return gc.target.direct(gc.undirEdgeRef[key],
     624        return gc.target.direct(gc.uEdgeRef[key],
    625625                                gc.target.direction(key));
    626626      }
    627627     
    628       UndirGraphCopy& gc;
     628      UGraphCopy& gc;
    629629    };
    630630   
    631631  public:
    632632
    633     /// \brief Constructor for the UndirGraphCopy.
     633    /// \brief Constructor for the UGraphCopy.
    634634    ///
    635635    /// It copies the content of the \c _source graph into the
    636636    /// \c _target graph. It creates also two references, one beetween
    637637    /// the two nodeset and one beetween the two edgesets.
    638     UndirGraphCopy(Target& _target, const Source& _source)
     638    UGraphCopy(Target& _target, const Source& _source)
    639639      : source(_source), target(_target),
    640         nodeRefMap(_source), edgeRefMap(*this), undirEdgeRefMap(_source) {
     640        nodeRefMap(_source), edgeRefMap(*this), uEdgeRefMap(_source) {
    641641      for (NodeIt it(source); it != INVALID; ++it) {
    642642        nodeRefMap[it] = target.addNode();
    643643      }
    644       for (UndirEdgeIt it(source); it != INVALID; ++it) {
    645         undirEdgeRefMap[it] = target.addEdge(nodeRefMap[source.source(it)],
     644      for (UEdgeIt it(source); it != INVALID; ++it) {
     645        uEdgeRefMap[it] = target.addEdge(nodeRefMap[source.source(it)],
    646646                                        nodeRefMap[source.target(it)]);
    647647      }
     
    652652    /// Copies the node references into the given map.
    653653    template <typename NodeRef>
    654     const UndirGraphCopy& nodeRef(NodeRef& map) const {
     654    const UGraphCopy& nodeRef(NodeRef& map) const {
    655655      for (NodeIt it(source); it != INVALID; ++it) {
    656656        map.set(it, nodeRefMap[it]);
     
    663663    /// Reverse and copies the node references into the given map.
    664664    template <typename NodeRef>
    665     const UndirGraphCopy& nodeCrossRef(NodeRef& map) const {
     665    const UGraphCopy& nodeCrossRef(NodeRef& map) const {
    666666      for (NodeIt it(source); it != INVALID; ++it) {
    667667        map.set(nodeRefMap[it], it);
     
    674674    /// Copies the edge references into the given map.
    675675    template <typename EdgeRef>
    676     const UndirGraphCopy& edgeRef(EdgeRef& map) const {
     676    const UGraphCopy& edgeRef(EdgeRef& map) const {
    677677      for (EdgeIt it(source); it != INVALID; ++it) {
    678678        map.set(edgeRefMap[it], it);
     
    686686    /// Reverse and copies the undirected edge references into the given map.
    687687    template <typename EdgeRef>
    688     const UndirGraphCopy& edgeCrossRef(EdgeRef& map) const {
     688    const UGraphCopy& edgeCrossRef(EdgeRef& map) const {
    689689      for (EdgeIt it(source); it != INVALID; ++it) {
    690690        map.set(it, edgeRefMap[it]);
     
    697697    /// Copies the undirected edge references into the given map.
    698698    template <typename EdgeRef>
    699     const UndirGraphCopy& undirEdgeRef(EdgeRef& map) const {
    700       for (UndirEdgeIt it(source); it != INVALID; ++it) {
    701         map.set(it, undirEdgeRefMap[it]);
     699    const UGraphCopy& uEdgeRef(EdgeRef& map) const {
     700      for (UEdgeIt it(source); it != INVALID; ++it) {
     701        map.set(it, uEdgeRefMap[it]);
    702702      }
    703703      return *this;
     
    709709    /// Reverse and copies the undirected edge references into the given map.
    710710    template <typename EdgeRef>
    711     const UndirGraphCopy& undirEdgeCrossRef(EdgeRef& map) const {
    712       for (UndirEdgeIt it(source); it != INVALID; ++it) {
    713         map.set(undirEdgeRefMap[it], it);
     711    const UGraphCopy& uEdgeCrossRef(EdgeRef& map) const {
     712      for (UEdgeIt it(source); it != INVALID; ++it) {
     713        map.set(uEdgeRefMap[it], it);
    714714      }
    715715      return *this;
     
    723723    /// type. 
    724724    template <typename TargetMap, typename SourceMap>
    725     const UndirGraphCopy& nodeMap(TargetMap& tMap,
     725    const UGraphCopy& nodeMap(TargetMap& tMap,
    726726                                  const SourceMap& sMap) const {
    727727      copyMap(tMap, sMap, NodeIt(source), nodeRefMap);
     
    736736    /// type. 
    737737    template <typename TargetMap, typename SourceMap>
    738     const UndirGraphCopy& edgeMap(TargetMap& tMap,
     738    const UGraphCopy& edgeMap(TargetMap& tMap,
    739739                                  const SourceMap& sMap) const {
    740740      copyMap(tMap, sMap, EdgeIt(source), edgeRefMap);
     
    749749    /// type. 
    750750    template <typename TargetMap, typename SourceMap>
    751     const UndirGraphCopy& undirEdgeMap(TargetMap& tMap,
     751    const UGraphCopy& uEdgeMap(TargetMap& tMap,
    752752                                  const SourceMap& sMap) const {
    753       copyMap(tMap, sMap, UndirEdgeIt(source), undirEdgeRefMap);
     753      copyMap(tMap, sMap, UEdgeIt(source), uEdgeRefMap);
    754754      return *this;
    755755    }
     
    769769    }
    770770
    771     /// \brief Gives back the stored undir edge references.
    772     ///
    773     /// Gives back the stored undir edge references.
    774     const UndirEdgeRefMap& undirEdgeRef() const {
    775       return undirEdgeRefMap;
     771    /// \brief Gives back the stored uedge references.
     772    ///
     773    /// Gives back the stored uedge references.
     774    const UEdgeRefMap& uEdgeRef() const {
     775      return uEdgeRefMap;
    776776    }
    777777
     
    785785    NodeRefMap nodeRefMap;
    786786    EdgeRefMap edgeRefMap;
    787     UndirEdgeRefMap undirEdgeRefMap;
     787    UEdgeRefMap uEdgeRefMap;
    788788  };
    789789
     
    802802  /// edges.
    803803  template <typename Target, typename Source>
    804   UndirGraphCopy<Target, Source>
    805   copyUndirGraph(Target& target, const Source& source) {
    806     return UndirGraphCopy<Target, Source>(target, source);
     804  UGraphCopy<Target, Source>
     805  copyUGraph(Target& target, const Source& source) {
     806    return UGraphCopy<Target, Source>(target, source);
    807807  }
    808808
     
    906906    typedef _Graph Graph;
    907907
    908     /// The key type of InvertableMap (Node, Edge, UndirEdge).
     908    /// The key type of InvertableMap (Node, Edge, UEdge).
    909909    typedef typename _Map::Key Key;
    910910    /// The value type of the InvertableMap.
     
    10371037  /// \param _Graph The graph class the \c DescriptorMap belongs to.
    10381038  /// \param _Item The Item is the Key of the Map. It may be Node, Edge or
    1039   /// UndirEdge.
     1039  /// UEdge.
    10401040#ifndef DOXYGEN
    10411041  /// \param _Map A ReadWriteMap mapping from the item type to integer.
     
    10561056    typedef _Graph Graph;
    10571057
    1058     /// The key type of DescriptorMap (Node, Edge, UndirEdge).
     1058    /// The key type of DescriptorMap (Node, Edge, UEdge).
    10591059    typedef typename _Map::Key Key;
    10601060    /// The value type of DescriptorMap.
     
    12971297
    12981298    typedef typename Graph::Edge Value;
    1299     typedef typename Graph::UndirEdge Key;
     1299    typedef typename Graph::UEdge Key;
    13001300
    13011301    /// \brief Constructor
     
    13361336
    13371337    typedef typename Graph::Edge Value;
    1338     typedef typename Graph::UndirEdge Key;
     1338    typedef typename Graph::UEdge Key;
    13391339
    13401340    /// \brief Constructor
  • lemon/graph_writer.h

    r1901 r1909  
    316316  /// \brief The undirected graph writer class.
    317317  ///
    318   /// The \c UndirGraphWriter class provides the undir graph output. To write
     318  /// The \c UGraphWriter class provides the ugraph output. To write
    319319  /// a graph you should first give writing commands to the writer. You can
    320   /// declare write command as \c NodeMap, \c EdgeMap or \c UndirEdgeMap
    321   /// writing and labeled Node, Edge or UndirEdge writing.
    322   ///
    323   /// \code
    324   /// UndirGraphWriter<UndirListGraph> writer(std::cout, graph);
     320  /// declare write command as \c NodeMap, \c EdgeMap or \c UEdgeMap
     321  /// writing and labeled Node, Edge or UEdge writing.
     322  ///
     323  /// \code
     324  /// UGraphWriter<ListUGraph> writer(std::cout, graph);
    325325  /// \endcode
    326326  ///
    327327  /// The \c writeNodeMap() function declares a \c NodeMap writing
    328   /// command in the \c UndirGraphWriter. You should give as parameter
     328  /// command in the \c UGraphWriter. You should give as parameter
    329329  /// the name of the map and the map object. The NodeMap writing
    330330  /// command with name "label" should write a unique map because it
     
    332332  ///
    333333  /// \code
    334   /// IdMap<UndirListGraph, Node> nodeLabelMap;
     334  /// IdMap<ListUGraph, Node> nodeLabelMap;
    335335  /// writer.writeNodeMap("label", nodeLabelMap);
    336336  ///
     
    339339  /// \endcode
    340340  ///
    341   /// With the \c writeUndirEdgeMap() member function you can give an
     341  /// With the \c writeUEdgeMap() member function you can give an
    342342  /// undirected edge map writing command similar to the NodeMaps.
    343343  ///
     
    345345  /// DescriptorMap<ListGraph, Edge, ListGraph::EdgeMap<int> >
    346346  ///   edgeDescMap(graph);
    347   /// writer.writeUndirEdgeMap("descriptor", edgeDescMap);
    348   ///
    349   /// writer.writeUndirEdgeMap("weight", weightMap);
    350   /// writer.writeUndirEdgeMap("label", labelMap);
     347  /// writer.writeUEdgeMap("descriptor", edgeDescMap);
     348  ///
     349  /// writer.writeUEdgeMap("weight", weightMap);
     350  /// writer.writeUEdgeMap("label", labelMap);
    351351  /// \endcode
    352352  ///
     
    359359  ///
    360360  ///
    361   /// With \c writeNode() and \c writeUndirEdge() functions you can
     361  /// With \c writeNode() and \c writeUEdge() functions you can
    362362  /// designate nodes and undirected edges in the graph. For example, you can
    363363  /// write out the source and target of the graph.
     
    367367  /// writer.writeNode("target", targetNode);
    368368  ///
    369   /// writer.writeUndirEdge("observed", undirEdge);
     369  /// writer.writeUEdge("observed", uEdge);
    370370  /// \endcode
    371371  ///
     
    385385  /// \author Balazs Dezso
    386386  template <typename _Graph, typename _WriterTraits = DefaultWriterTraits>
    387   class UndirGraphWriter {
     387  class UGraphWriter {
    388388  public:
    389389   
     
    391391    typedef typename Graph::Node Node;
    392392    typedef typename Graph::Edge Edge;
    393     typedef typename Graph::UndirEdge UndirEdge;
     393    typedef typename Graph::UEdge UEdge;
    394394
    395395    typedef _WriterTraits WriterTraits;
    396396
    397     /// \brief Construct a new UndirGraphWriter.
    398     ///
    399     /// Construct a new UndirGraphWriter. It writes the given graph
     397    /// \brief Construct a new UGraphWriter.
     398    ///
     399    /// Construct a new UGraphWriter. It writes the given graph
    400400    /// to the given stream.
    401     UndirGraphWriter(std::ostream& _os, const Graph& _graph)
     401    UGraphWriter(std::ostream& _os, const Graph& _graph)
    402402      : writer(new LemonWriter(_os)), own_writer(true),
    403403        nodeset_writer(*writer, _graph, std::string()),
    404         undir_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
     404        u_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
    405405        node_writer(*writer, nodeset_writer, std::string()),
    406         undir_edge_writer(*writer, undir_edgeset_writer, std::string()),
     406        u_edge_writer(*writer, u_edgeset_writer, std::string()),
    407407        attribute_writer(*writer, std::string()) {}
    408408
    409     /// \brief Construct a new UndirGraphWriter.
    410     ///
    411     /// Construct a new UndirGraphWriter. It writes the given graph
     409    /// \brief Construct a new UGraphWriter.
     410    ///
     411    /// Construct a new UGraphWriter. It writes the given graph
    412412    /// to the given file.
    413     UndirGraphWriter(const std::string& _filename, const Graph& _graph)
     413    UGraphWriter(const std::string& _filename, const Graph& _graph)
    414414      : writer(new LemonWriter(_filename)), own_writer(true),
    415415        nodeset_writer(*writer, _graph, std::string()),
    416         undir_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
     416        u_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
    417417        node_writer(*writer, nodeset_writer, std::string()),
    418         undir_edge_writer(*writer, undir_edgeset_writer, std::string()),
     418        u_edge_writer(*writer, u_edgeset_writer, std::string()),
    419419        attribute_writer(*writer, std::string()) {}
    420420
    421     /// \brief Construct a new UndirGraphWriter.
    422     ///
    423     /// Construct a new UndirGraphWriter. It writes the given graph
     421    /// \brief Construct a new UGraphWriter.
     422    ///
     423    /// Construct a new UGraphWriter. It writes the given graph
    424424    /// to given LemonReader.
    425     UndirGraphWriter(LemonWriter& _writer, const Graph& _graph)
     425    UGraphWriter(LemonWriter& _writer, const Graph& _graph)
    426426      : writer(_writer), own_writer(false),
    427427        nodeset_writer(*writer, _graph, std::string()),
    428         undir_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
     428        u_edgeset_writer(*writer, _graph, nodeset_writer, std::string()),
    429429        node_writer(*writer, nodeset_writer, std::string()),
    430         undir_edge_writer(*writer, undir_edgeset_writer, std::string()),
     430        u_edge_writer(*writer, u_edgeset_writer, std::string()),
    431431        attribute_writer(*writer, std::string()) {}
    432432
     
    434434    ///
    435435    /// Destruct the graph writer.
    436     ~UndirGraphWriter() {
     436    ~UGraphWriter() {
    437437      if (own_writer)
    438438        delete writer;
     
    443443   /// This function issues a new <i> node map writing command</i> to the writer.
    444444    template <typename Map>
    445     UndirGraphWriter& writeNodeMap(std::string name, const Map& map) {
     445    UGraphWriter& writeNodeMap(std::string name, const Map& map) {
    446446      nodeset_writer.writeNodeMap(name, map);
    447447      return *this;
     
    452452   /// This function issues a new <i> node map writing command</i> to the writer.
    453453    template <typename Writer, typename Map>
    454     UndirGraphWriter& writeNodeMap(std::string name, const Map& map,
     454    UGraphWriter& writeNodeMap(std::string name, const Map& map,
    455455                              const Writer& writer = Writer()) {
    456456      nodeset_writer.writeNodeMap(name, map, writer);
     
    462462   /// This function issues a new <i> edge map writing command</i> to the writer.
    463463    template <typename Map>
    464     UndirGraphWriter& writeEdgeMap(std::string name, const Map& map) {
    465       undir_edgeset_writer.writeEdgeMap(name, map);
     464    UGraphWriter& writeEdgeMap(std::string name, const Map& map) {
     465      u_edgeset_writer.writeEdgeMap(name, map);
    466466      return *this;
    467467    }
     
    471471   /// This function issues a new <i> edge map writing command</i> to the writer.
    472472    template <typename Writer, typename Map>
    473     UndirGraphWriter& writeEdgeMap(std::string name, const Map& map,
     473    UGraphWriter& writeEdgeMap(std::string name, const Map& map,
    474474                                   const Writer& writer = Writer()) {
    475       undir_edgeset_writer.writeEdgeMap(name, map, writer);
     475      u_edgeset_writer.writeEdgeMap(name, map, writer);
    476476      return *this;
    477477    }
     
    482482    /// command</i> to the writer.
    483483    template <typename Map>
    484     UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map) {
    485       undir_edgeset_writer.writeUndirEdgeMap(name, map);
     484    UGraphWriter& writeUEdgeMap(std::string name, const Map& map) {
     485      u_edgeset_writer.writeUEdgeMap(name, map);
    486486      return *this;
    487487    }
     
    492492    /// command</i> to the writer.
    493493   template <typename Writer, typename Map>
    494     UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map,
     494    UGraphWriter& writeUEdgeMap(std::string name, const Map& map,
    495495                                        const Writer& writer = Writer()) {
    496       undir_edgeset_writer.writeUndirEdgeMap(name, map, writer);
     496      u_edgeset_writer.writeUEdgeMap(name, map, writer);
    497497      return *this;
    498498    }
     
    502502    /// This function issues a new <i> labeled node writing
    503503    /// command</i> to the writer.
    504     UndirGraphWriter& writeNode(std::string name, const Node& node) {
     504    UGraphWriter& writeNode(std::string name, const Node& node) {
    505505      node_writer.writeNode(name, node);
    506506      return *this;
     
    511511    /// This function issues a new <i> labeled edge writing
    512512    /// command</i> to the writer.
    513     UndirGraphWriter& writeEdge(std::string name, const Edge& edge) {
    514       undir_edge_writer.writeEdge(name, edge);
     513    UGraphWriter& writeEdge(std::string name, const Edge& edge) {
     514      u_edge_writer.writeEdge(name, edge);
    515515    }
    516516
     
    520520    /// Issue a new <i>labeled undirected edge writing command</i> to
    521521    /// the writer.
    522     UndirGraphWriter& writeUndirEdge(std::string name, const UndirEdge& edge) {
    523       undir_edge_writer.writeUndirEdge(name, edge);
     522    UGraphWriter& writeUEdge(std::string name, const UEdge& edge) {
     523      u_edge_writer.writeUEdge(name, edge);
    524524    }
    525525
     
    529529    /// command</i> to the writer.
    530530    template <typename Value>
    531     UndirGraphWriter& writeAttribute(std::string name, const Value& value) {
     531    UGraphWriter& writeAttribute(std::string name, const Value& value) {
    532532      attribute_writer.writeAttribute(name, value);
    533533      return *this;
     
    539539    /// command</i> to the writer.
    540540    template <typename Writer, typename Value>
    541     UndirGraphWriter& writeAttribute(std::string name, const Value& value,
     541    UGraphWriter& writeAttribute(std::string name, const Value& value,
    542542                               const Writer& writer) {
    543543      attribute_writer.writeAttribute<Writer>(name, value, writer);
     
    575575    /// named edge map then it will write the map value belonging to the edge.
    576576    void writeLabel(std::ostream& os, const Edge& item) const {
    577       undir_edgeset_writer.writeLabel(os, item);
     577      u_edgeset_writer.writeLabel(os, item);
    578578    }
    579579
     
    583583    /// an "label" named edge map then it will write the map value belonging to
    584584    /// the edge.
    585     void writeLabel(std::ostream& os, const UndirEdge& item) const {
    586       undir_edgeset_writer.writeLabel(os, item);
     585    void writeLabel(std::ostream& os, const UEdge& item) const {
     586      u_edgeset_writer.writeLabel(os, item);
    587587    }
    588588
     
    594594
    595595    NodeSetWriter<Graph, WriterTraits> nodeset_writer;
    596     UndirEdgeSetWriter<Graph, WriterTraits> undir_edgeset_writer;
     596    UEdgeSetWriter<Graph, WriterTraits> u_edgeset_writer;
    597597
    598598    NodeWriter<Graph> node_writer;
    599     UndirEdgeWriter<Graph> undir_edge_writer;
     599    UEdgeWriter<Graph> u_edge_writer;
    600600   
    601601    AttributeWriter<WriterTraits> attribute_writer;
     
    605605  ///
    606606  /// It is a helper function to write an undirected graph to the given output
    607   /// stream. It gives back an UndirGraphWriter object and this object
     607  /// stream. It gives back an UGraphWriter object and this object
    608608  /// can write more maps, labeled nodes and edges and attributes.
    609609  /// \warning Do not forget to call the \c run() function.
     
    612612  /// \param g The graph.
    613613  template <typename Graph>
    614   UndirGraphWriter<Graph> undirGraphWriter(std::ostream& os, const Graph &g) {
    615     return UndirGraphWriter<Graph>(os, g);
     614  UGraphWriter<Graph> uGraphWriter(std::ostream& os, const Graph &g) {
     615    return UGraphWriter<Graph>(os, g);
    616616  }
    617617
     
    619619  ///
    620620  /// It is a helper function to write an undirected graph to the given output
    621   /// file. It gives back an UndirGraphWriter object and this object
     621  /// file. It gives back an UGraphWriter object and this object
    622622  /// can write more maps, labeled nodes, edges, undirected edges and
    623623  /// attributes.
     
    628628  /// \param g The graph.
    629629  template <typename Graph>
    630   UndirGraphWriter<Graph> undirGraphWriter(const std::string& fn,
     630  UGraphWriter<Graph> uGraphWriter(const std::string& fn,
    631631                                           const Graph &g) {
    632     return UndirGraphWriter<Graph>(fn, g);
     632    return UGraphWriter<Graph>(fn, g);
    633633  }
    634634
  • lemon/grid_graph.h

    r1875 r1909  
    339339
    340340
    341   typedef StaticMappableUndirGraphExtender<
    342     IterableUndirGraphExtender<
    343     AlterableUndirGraphExtender<
    344     UndirGraphExtender<GridGraphBase> > > > ExtendedGridGraphBase;
     341  typedef StaticMappableUGraphExtender<
     342    IterableUGraphExtender<
     343    AlterableUGraphExtender<
     344    UGraphExtender<GridGraphBase> > > > ExtendedGridGraphBase;
    345345
    346346  /// \ingroup graphs
     
    365365  /// \endcode
    366366  ///
    367   /// The graph type is fully conform to the \ref concept::UndirGraph
     367  /// The graph type is fully conform to the \ref concept::UGraph
    368368  /// "Undirected Graph" concept.
    369369  ///
     
    464464    /// outgoing edge then it gives back INVALID.
    465465    Edge down(Node n) const {
    466       UndirEdge ue = _down(n);
     466      UEdge ue = _down(n);
    467467      return ue != INVALID ? direct(ue, true) : INVALID;
    468468    }
     
    473473    /// outgoing edge then it gives back INVALID.
    474474    Edge up(Node n) const {
    475       UndirEdge ue = _up(n);
     475      UEdge ue = _up(n);
    476476      return ue != INVALID ? direct(ue, false) : INVALID;
    477477    }
     
    482482    /// outgoing edge then it gives back INVALID.
    483483    Edge right(Node n) const {
    484       UndirEdge ue = _right(n);
     484      UEdge ue = _right(n);
    485485      return ue != INVALID ? direct(ue, true) : INVALID;
    486486    }
     
    491491    /// outgoing edge then it gives back INVALID.
    492492    Edge left(Node n) const {
    493       UndirEdge ue = _left(n);
     493      UEdge ue = _left(n);
    494494      return ue != INVALID ? direct(ue, false) : INVALID;
    495495    }
  • lemon/hypercube_graph.h

    r1875 r1909  
    255255  ///
    256256  /// The graph type is fully conform to the \ref concept::StaticGraph
    257   /// concept but it does not conform to the \ref concept::UndirGraph.
     257  /// concept but it does not conform to the \ref concept::UGraph.
    258258  ///
    259259  /// \see HyperCubeGraphBase
  • lemon/kruskal.h

    r1875 r1909  
    5252  /// \param g The graph the algorithm runs on.
    5353  /// It can be either \ref concept::StaticGraph "directed" or
    54   /// \ref concept::UndirGraph "undirected".
     54  /// \ref concept::UGraph "undirected".
    5555  /// If the graph is directed, the algorithm consider it to be
    5656  /// undirected by disregarding the direction of the edges.
     
    9090  ///
    9191  /// \warning If kruskal is run on an
    92   /// \ref lemon::concept::UndirGraph "undirected graph", be sure that the
     92  /// \ref lemon::concept::UGraph "undirected graph", be sure that the
    9393  /// map storing the tree is also undirected
    94   /// (e.g. UndirListGraph::UndirEdgeMap<bool>, otherwise the values of the
     94  /// (e.g. ListUGraph::UEdgeMap<bool>, otherwise the values of the
    9595  /// half of the edges will not be set.
    9696  ///
    9797  /// \todo Discuss the case of undirected graphs: In this case the algorithm
    98   /// also require <tt>Edge</tt>s instead of <tt>UndirEdge</tt>s, as some
     98  /// also require <tt>Edge</tt>s instead of <tt>UEdge</tt>s, as some
    9999  /// people would expect. So, one should be careful not to add both of the
    100   /// <tt>Edge</tt>s belonging to a certain <tt>UndirEdge</tt>.
     100  /// <tt>Edge</tt>s belonging to a certain <tt>UEdge</tt>.
    101101  /// (\ref kruskal() and \ref KruskalMapInput are kind enough to do so.)
    102102
     
    226226
    227227    template<class _GR>
    228     typename enable_if<typename _GR::UndirTag,void>::type
     228    typename enable_if<typename _GR::UTag,void>::type
    229229    fillWithEdges(const _GR& g, const Map& m,dummy<0> = 0)
    230230    {
    231       for(typename GR::UndirEdgeIt e(g);e!=INVALID;++e)
     231      for(typename GR::UEdgeIt e(g);e!=INVALID;++e)
    232232        push_back(value_type(g.direct(e, true), m[e]));
    233233    }
    234234
    235235    template<class _GR>
    236     typename disable_if<typename _GR::UndirTag,void>::type
     236    typename disable_if<typename _GR::UTag,void>::type
    237237    fillWithEdges(const _GR& g, const Map& m,dummy<1> = 1)
    238238    {
  • lemon/lemon_reader.h

    r1901 r1909  
    105105    class ForwardComposeMap {
    106106    public:
    107       typedef typename Graph::UndirEdge Key;
     107      typedef typename Graph::UEdge Key;
    108108      typedef typename Map::Value Value;
    109109
     
    135135    class BackwardComposeMap {
    136136    public:
    137       typedef typename Graph::UndirEdge Key;
     137      typedef typename Graph::UEdge Key;
    138138      typedef typename Map::Value Value;
    139139
     
    11681168  ///
    11691169  /// The lemon format can store multiple undirected edgesets with several
    1170   /// maps. The undirected edgeset section's header line is \c \@undiredgeset
    1171   /// \c undiredgeset_name, but the \c undiredgeset_name may be empty.
     1170  /// maps. The undirected edgeset section's header line is \c \@uedgeset
     1171  /// \c uedgeset_name, but the \c uedgeset_name may be empty.
    11721172  ///
    11731173  /// The first line of the section contains the names of the maps separated
     
    11841184  /// as id map. This map should contain only unique values and when the
    11851185  /// \c readLabel() member will read a value from the given stream it will
    1186   /// give back that undiricted edge which is mapped to this value.
     1186  /// give back that uicted edge which is mapped to this value.
    11871187  ///
    11881188  /// The undirected edgeset reader needs a node id reader to identify which
     
    11921192  /// \relates LemonReader
    11931193  template <typename _Graph, typename _Traits = DefaultReaderTraits>
    1194   class UndirEdgeSetReader : public LemonReader::SectionReader {
     1194  class UEdgeSetReader : public LemonReader::SectionReader {
    11951195    typedef LemonReader::SectionReader Parent;
    11961196  public:
     
    12001200    typedef typename Graph::Node Node;
    12011201    typedef typename Graph::Edge Edge;
    1202     typedef typename Graph::UndirEdge UndirEdge;
     1202    typedef typename Graph::UEdge UEdge;
    12031203    typedef typename Traits::Skipper DefaultSkipper;
    12041204
    12051205    /// \brief Constructor.
    12061206    ///
    1207     /// Constructor for UndirEdgeSetReader. It creates the UndirEdgeSetReader
     1207    /// Constructor for UEdgeSetReader. It creates the UEdgeSetReader
    12081208    /// and attach it into the given LemonReader. The undirected edgeset
    12091209    /// reader will add the readed undirected edges to the given Graph. It
    12101210    /// will use the given node id reader to read the source and target
    12111211    /// nodes of the edges. The reader will read the section only if the
    1212     /// \c _name and the \c undiredgset_name are the same.
     1212    /// \c _name and the \c uedgset_name are the same.
    12131213    template <typename NodeLabelReader>
    1214     UndirEdgeSetReader(LemonReader& _reader,
     1214    UEdgeSetReader(LemonReader& _reader,
    12151215                       Graph& _graph,
    12161216                       const NodeLabelReader& _nodeLabelReader,
     
    12241224    /// \brief Destructor.
    12251225    ///
    1226     /// Destructor for UndirEdgeSetReader.
    1227     virtual ~UndirEdgeSetReader() {
     1226    /// Destructor for UEdgeSetReader.
     1227    virtual ~UEdgeSetReader() {
    12281228      for (typename MapReaders::iterator it = readers.begin();
    12291229           it != readers.end(); ++it) {
     
    12331233
    12341234  private:
    1235     UndirEdgeSetReader(const UndirEdgeSetReader&);
    1236     void operator=(const UndirEdgeSetReader&);
     1235    UEdgeSetReader(const UEdgeSetReader&);
     1236    void operator=(const UEdgeSetReader&);
    12371237
    12381238  public:
     
    12421242    /// Add a new edge undirected map reader command for the reader.
    12431243    template <typename Map>
    1244     UndirEdgeSetReader& readUndirEdgeMap(std::string name, Map& map) {
     1244    UEdgeSetReader& readUEdgeMap(std::string name, Map& map) {
    12451245      return _readMap<
    12461246        typename Traits::template Reader<typename Map::Value>, Map,
     
    12491249
    12501250    template <typename Map>
    1251     UndirEdgeSetReader& readUndirEdgeMap(std::string name, const Map& map) {
     1251    UEdgeSetReader& readUEdgeMap(std::string name, const Map& map) {
    12521252      return _readMap<
    12531253        typename Traits::template Reader<typename Map::Value>, Map,
     
    12591259    /// Add a new edge undirected map reader command for the reader.
    12601260    template <typename Reader, typename Map>
    1261     UndirEdgeSetReader& readUndirEdgeMap(std::string name, Map& map,
     1261    UEdgeSetReader& readUEdgeMap(std::string name, Map& map,
    12621262                                         const Reader& reader = Reader()) {
    12631263      return _readMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
     
    12661266
    12671267    template <typename Reader, typename Map>
    1268     UndirEdgeSetReader& readUndirEdgeMap(std::string name, const Map& map,
     1268    UEdgeSetReader& readUEdgeMap(std::string name, const Map& map,
    12691269                                         const Reader& reader = Reader()) {
    12701270      return _readMap<Reader, Map, typename _reader_bits::Arg<Map>::Type >
     
    12751275
    12761276    template <typename Reader, typename Map, typename MapParameter>
    1277     UndirEdgeSetReader& _readMap(std::string name, MapParameter map,
     1277    UEdgeSetReader& _readMap(std::string name, MapParameter map,
    12781278                                 const Reader& reader = Reader()) {
    1279       checkConcept<concept::WriteMap<UndirEdge, typename Map::Value>, Map>();
     1279      checkConcept<concept::WriteMap<UEdge, typename Map::Value>, Map>();
    12801280      checkConcept<_reader_bits::ItemReader<typename Map::Value>, Reader>();
    12811281      if (readers.find(name) != readers.end()) {
     
    12861286      readers.insert(
    12871287        make_pair(name, new _reader_bits::
    1288                   MapReader<UndirEdge, Map, Reader>(map, reader)));
     1288                  MapReader<UEdge, Map, Reader>(map, reader)));
    12891289      return *this;
    12901290    }
     
    12961296    /// Add a new undirected edge map skipper command for the reader.
    12971297    template <typename Reader>
    1298     UndirEdgeSetReader& skipUndirEdgeMap(std::string name,
     1298    UEdgeSetReader& skipUEdgeMap(std::string name,
    12991299                                         const Reader& reader = Reader()) {
    13001300      if (readers.find(name) != readers.end()) {
     
    13041304      }
    13051305      readers.insert(make_pair(name, new _reader_bits::
    1306                                SkipReader<UndirEdge, Reader>(reader)));
     1306                               SkipReader<UEdge, Reader>(reader)));
    13071307      return *this;
    13081308    }
     
    13121312    /// Add a new directed edge map reader command for the reader.
    13131313    template <typename Map>
    1314     UndirEdgeSetReader& readEdgeMap(std::string name, Map& map) {
     1314    UEdgeSetReader& readEdgeMap(std::string name, Map& map) {
    13151315      return _readDirMap<
    13161316        typename Traits::template Reader<typename Map::Value>, Map,
     
    13191319
    13201320    template <typename Map>
    1321     UndirEdgeSetReader& readEdgeMap(std::string name, const Map& map) {
     1321    UEdgeSetReader& readEdgeMap(std::string name, const Map& map) {
    13221322      return _readDirMap<
    13231323        typename Traits::template Reader<typename Map::Value>, Map,
     
    13291329    /// Add a new directed edge map reader command for the reader.
    13301330    template <typename Reader, typename Map>
    1331     UndirEdgeSetReader& readEdgeMap(std::string name, Map& map,
     1331    UEdgeSetReader& readEdgeMap(std::string name, Map& map,
    13321332                                    const Reader& reader = Reader()) {
    13331333      return _readDirMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
     
    13361336
    13371337    template <typename Reader, typename Map>
    1338     UndirEdgeSetReader& readEdgeMap(std::string name, const Map& map,
     1338    UEdgeSetReader& readEdgeMap(std::string name, const Map& map,
    13391339                                    const Reader& reader = Reader()) {
    13401340      return _readDirMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
     
    13451345
    13461346    template <typename Reader, typename Map, typename MapParameter>
    1347     UndirEdgeSetReader& _readDirMap(std::string name, MapParameter map,
     1347    UEdgeSetReader& _readDirMap(std::string name, MapParameter map,
    13481348                                    const Reader& reader = Reader()) {
    13491349      checkConcept<_reader_bits::ItemReader<typename Map::Value>, Reader>();
     
    13621362    /// Add a new directed edge map skipper command for the reader.
    13631363    template <typename Reader>
    1364     UndirEdgeSetReader& skipEdgeMap(std::string name,
     1364    UEdgeSetReader& skipEdgeMap(std::string name,
    13651365                                    const Reader& reader = Reader()) {
    13661366      skipMap("+" + name, reader);
     
    13741374    /// the section with the given header line.
    13751375    ///
    1376     /// It gives back true when the header line starts with \c \@undiredgeset,
     1376    /// It gives back true when the header line starts with \c \@uedgeset,
    13771377    /// and the header line's name and the edgeset's name are the same.
    13781378    virtual bool header(const std::string& line) {
     
    13811381      std::string id;
    13821382      ls >> command >> name;
    1383       return command == "@undiredgeset" && name == id;
     1383      return command == "@uedgeset" && name == id;
    13841384    }
    13851385
     
    13911391        throw DataFormatError("Cannot find nodeset or label map");
    13921392      }
    1393       std::vector<_reader_bits::MapReaderBase<UndirEdge>* > index;
     1393      std::vector<_reader_bits::MapReaderBase<UEdge>* > index;
    13941394      std::string line;
    13951395
     
    14221422        Node from = nodeLabelReader->read(ls);
    14231423        Node to = nodeLabelReader->read(ls);
    1424         UndirEdge edge = graph.addEdge(from, to);
     1424        UEdge edge = graph.addEdge(from, to);
    14251425        for (int i = 0; i < (int)index.size(); ++i) {
    14261426          index[i]->read(ls, edge);
     
    14431443    /// It reads an id from the stream and gives back which undirected edge
    14441444    /// belongs to it. It is possible only if there was read an "label" named map.
    1445     void readLabel(std::istream& is, UndirEdge& undirEdge) const {
    1446       undirEdge = inverter->read(is);
     1445    void readLabel(std::istream& is, UEdge& uEdge) const {
     1446      uEdge = inverter->read(is);
    14471447    }
    14481448
     
    14561456      char c;
    14571457      is >> c;
    1458       UndirEdge undirEdge = inverter->read(is);
     1458      UEdge uEdge = inverter->read(is);
    14591459      if (c == '+') {
    1460         edge = graph.direct(undirEdge, true);
     1460        edge = graph.direct(uEdge, true);
    14611461      } else if (c == '-') {
    1462         edge = graph.direct(undirEdge, false);
     1462        edge = graph.direct(uEdge, false);
    14631463      } else {
    14641464        throw DataFormatError("Wrong id format for edge "
     
    14701470
    14711471    typedef std::map<std::string,
    1472                      _reader_bits::MapReaderBase<UndirEdge>*> MapReaders;
     1472                     _reader_bits::MapReaderBase<UEdge>*> MapReaders;
    14731473    MapReaders readers;
    14741474   
    14751475    Graph& graph;   
    14761476    std::string name;
    1477     _reader_bits::SkipReader<UndirEdge, DefaultSkipper> skipper;
    1478 
    1479     std::auto_ptr<_reader_bits::MapInverterBase<UndirEdge> > inverter;
     1477    _reader_bits::SkipReader<UEdge, DefaultSkipper> skipper;
     1478
     1479    std::auto_ptr<_reader_bits::MapInverterBase<UEdge> > inverter;
    14801480    std::auto_ptr<_reader_bits::LabelReaderBase<Node> > nodeLabelReader;
    14811481  };
     
    16971697  /// \brief SectionReader for reading labeled undirected edges.
    16981698  ///
    1699   /// The undirected edges section's header line is \c \@undiredges
    1700   /// \c undiredges_name, but the \c undiredges_name may be empty.
     1699  /// The undirected edges section's header line is \c \@uedges
     1700  /// \c uedges_name, but the \c uedges_name may be empty.
    17011701  ///
    17021702  /// Each line in the section contains the name of the undirected edge
     
    17051705  /// \relates LemonReader
    17061706  template <typename _Graph>
    1707   class UndirEdgeReader : public LemonReader::SectionReader {
     1707  class UEdgeReader : public LemonReader::SectionReader {
    17081708    typedef LemonReader::SectionReader Parent;
    17091709    typedef _Graph Graph;
    17101710    typedef typename Graph::Edge Edge;
    1711     typedef typename Graph::UndirEdge UndirEdge;
     1711    typedef typename Graph::UEdge UEdge;
    17121712  public:
    17131713   
    17141714    /// \brief Constructor.
    17151715    ///
    1716     /// Constructor for UndirEdgeReader. It creates the UndirEdgeReader and
     1716    /// Constructor for UEdgeReader. It creates the UEdgeReader and
    17171717    /// attach it into the given LemonReader. It will use the given
    17181718    /// undirected edge id reader to give back the edges. The reader will
    1719     /// read the section only if the \c _name and the \c undiredges_name are
     1719    /// read the section only if the \c _name and the \c uedges_name are
    17201720    /// the same.
    17211721    template <typename _LabelReader>
    1722     UndirEdgeReader(LemonReader& _reader, const _LabelReader& _labelReader,
     1722    UEdgeReader(LemonReader& _reader, const _LabelReader& _labelReader,
    17231723               const std::string& _name = std::string())
    17241724      : Parent(_reader), name(_name) {
    1725       checkConcept<_reader_bits::ItemLabelReader<UndirEdge>, _LabelReader>();
     1725      checkConcept<_reader_bits::ItemLabelReader<UEdge>, _LabelReader>();
    17261726      checkConcept<_reader_bits::ItemLabelReader<Edge>, _LabelReader>();
    1727       undirEdgeLabelReader.reset(new _reader_bits::
    1728                               LabelReader<UndirEdge, _LabelReader>(_labelReader));
     1727      uEdgeLabelReader.reset(new _reader_bits::
     1728                              LabelReader<UEdge, _LabelReader>(_labelReader));
    17291729      edgeLabelReader.reset(new _reader_bits::
    17301730                         LabelReader<Edge, _LabelReader>(_labelReader));
     
    17331733    /// \brief Destructor.
    17341734    ///
    1735     /// Destructor for UndirEdgeReader.
    1736     virtual ~UndirEdgeReader() {}
     1735    /// Destructor for UEdgeReader.
     1736    virtual ~UEdgeReader() {}
    17371737  private:
    1738     UndirEdgeReader(const UndirEdgeReader&);
    1739     void operator=(const UndirEdgeReader&);
    1740 
    1741   public:
    1742 
    1743     /// \brief Add an undirected edge reader command for the UndirEdgeReader.
    1744     ///
    1745     /// Add an undirected edge reader command for the UndirEdgeReader.
    1746     void readUndirEdge(const std::string& name, UndirEdge& item) {
    1747       if (undirEdgeReaders.find(name) != undirEdgeReaders.end()) {
     1738    UEdgeReader(const UEdgeReader&);
     1739    void operator=(const UEdgeReader&);
     1740
     1741  public:
     1742
     1743    /// \brief Add an undirected edge reader command for the UEdgeReader.
     1744    ///
     1745    /// Add an undirected edge reader command for the UEdgeReader.
     1746    void readUEdge(const std::string& name, UEdge& item) {
     1747      if (uEdgeReaders.find(name) != uEdgeReaders.end()) {
    17481748        ErrorMessage msg;
    17491749        msg << "Multiple read rule for undirected edge: " << name;
    17501750        throw IOParameterError(msg.message());
    17511751      }
    1752       undirEdgeReaders.insert(make_pair(name, _reader_bits::
    1753                                         ItemStore<UndirEdge>(item)));
    1754     }
    1755 
    1756     /// \brief Add an edge reader command for the UndirEdgeReader.
    1757     ///
    1758     /// Add an edge reader command for the UndirEdgeReader.
     1752      uEdgeReaders.insert(make_pair(name, _reader_bits::
     1753                                        ItemStore<UEdge>(item)));
     1754    }
     1755
     1756    /// \brief Add an edge reader command for the UEdgeReader.
     1757    ///
     1758    /// Add an edge reader command for the UEdgeReader.
    17591759    void readEdge(const std::string& name, Edge& item) {
    17601760      if (edgeReaders.find(name) != edgeReaders.end()) {
     
    17781778      std::string id;
    17791779      ls >> command >> name;
    1780       return command == "@undiredges" && name == id;
     1780      return command == "@uedges" && name == id;
    17811781    }
    17821782
     
    17881788        throw DataFormatError("Cannot find undirected edgeset or label map");
    17891789      }
    1790       if (!undirEdgeLabelReader->isLabelReader()) {
     1790      if (!uEdgeLabelReader->isLabelReader()) {
    17911791        throw DataFormatError("Cannot find undirected edgeset or label map");
    17921792      }
     
    17971797        ls >> id;
    17981798        {
    1799           typename UndirEdgeReaders::iterator it = undirEdgeReaders.find(id);
    1800           if (it != undirEdgeReaders.end()) {
    1801             it->second.read(undirEdgeLabelReader->read(ls));
     1799          typename UEdgeReaders::iterator it = uEdgeReaders.find(id);
     1800          if (it != uEdgeReaders.end()) {
     1801            it->second.read(uEdgeLabelReader->read(ls));
    18021802            it->second.touch();
    18031803            continue;
     
    18201820        }
    18211821      }
    1822       for (typename UndirEdgeReaders::iterator it = undirEdgeReaders.begin();
    1823            it != undirEdgeReaders.end(); ++it) {
     1822      for (typename UEdgeReaders::iterator it = uEdgeReaders.begin();
     1823           it != uEdgeReaders.end(); ++it) {
    18241824        if (!it->second.touched()) {
    18251825          ErrorMessage msg;
    1826           msg << "UndirEdge not found in file: " << it->first;
     1826          msg << "UEdge not found in file: " << it->first;
    18271827          throw IOParameterError(msg.message());
    18281828        }
     
    18351835
    18361836    typedef std::map<std::string,
    1837                      _reader_bits::ItemStore<UndirEdge> > UndirEdgeReaders;
    1838     UndirEdgeReaders undirEdgeReaders;
    1839     std::auto_ptr<_reader_bits::LabelReaderBase<UndirEdge> > undirEdgeLabelReader;
     1837                     _reader_bits::ItemStore<UEdge> > UEdgeReaders;
     1838    UEdgeReaders uEdgeReaders;
     1839    std::auto_ptr<_reader_bits::LabelReaderBase<UEdge> > uEdgeLabelReader;
    18401840
    18411841    typedef std::map<std::string, _reader_bits::ItemStore<Edge> > EdgeReaders;
     
    20262026    ///
    20272027    /// Gives back how many undirected edgesets are in the file.
    2028     int undirEdgeSetNum() const {
    2029       return undiredgesets.size();
     2028    int uEdgeSetNum() const {
     2029      return uedgesets.size();
    20302030    }
    20312031
     
    20342034    ///
    20352035    /// Gives back the name of undirected edgeset on the indiced position.
    2036     std::string undirEdgeSetName(int index) const {
    2037       return undiredgesets[index].name;
     2036    std::string uEdgeSetName(int index) const {
     2037      return uedgesets[index].name;
    20382038    }
    20392039
     
    20422042    ///
    20432043    /// Gives back the map names of undirected edgeset on the indiced position.
    2044     const std::vector<std::string>& undirEdgeSetMaps(int index) const {
    2045       return undiredgesets[index].items;
     2044    const std::vector<std::string>& uEdgeSetMaps(int index) const {
     2045      return uedgesets[index].items;
    20462046    }
    20472047
     
    20962096    ///
    20972097    /// Gives back how many labeled undirected edges section are in the file.
    2098     int undirEdgesNum() const {
    2099       return undiredges.size();
     2098    int uEdgesNum() const {
     2099      return uedges.size();
    21002100    }
    21012101
     
    21052105    /// Gives back the name of labeled undirected edges section on the
    21062106    /// indiced position.
    2107     std::string undirEdgesName(int index) const {
    2108       return undiredges[index].name;
     2107    std::string uEdgesName(int index) const {
     2108      return uedges[index].name;
    21092109    }
    21102110
     
    21142114    /// Gives back the names of the labeled undirected edges in the
    21152115    /// indiced section.
    2116     const std::vector<std::string>& undirEdgesItems(int index) const {
    2117       return undiredges[index].items;
     2116    const std::vector<std::string>& uEdgesItems(int index) const {
     2117      return uedges[index].items;
    21182118    }
    21192119
     
    21612161        current = command;
    21622162        edgesets.push_back(SectionInfo(name));
    2163       } else if (command == "@undiredgeset") {
     2163      } else if (command == "@uedgeset") {
    21642164        current = command;
    2165         undiredgesets.push_back(SectionInfo(name));
     2165        uedgesets.push_back(SectionInfo(name));
    21662166      } else if (command == "@nodes") {
    21672167        current = command;
     
    21702170        current = command;
    21712171        edges.push_back(SectionInfo(name));
    2172       } else if (command == "@undiredges") {
     2172      } else if (command == "@uedges") {
    21732173        current = command;
    2174         undiredges.push_back(SectionInfo(name));
     2174        uedges.push_back(SectionInfo(name));
    21752175      } else if (command == "@attributes") {
    21762176        current = command;
     
    21912191      } else if (current == "@edgeset") {
    21922192        readMapNames(is, edgesets.back().items);
    2193       } else if (current == "@undiredgeset") {
    2194         readMapNames(is, undiredgesets.back().items);
     2193      } else if (current == "@uedgeset") {
     2194        readMapNames(is, uedgesets.back().items);
    21952195      } else if (current == "@nodes") {
    21962196        readItemNames(is, nodes.back().items);
    21972197      } else if (current == "@edges") {
    21982198        readItemNames(is, edges.back().items);
    2199       } else if (current == "@undiredges") {
    2200         readItemNames(is, undiredges.back().items);
     2199      } else if (current == "@uedges") {
     2200        readItemNames(is, uedges.back().items);
    22012201      } else if (current == "@attributes") {
    22022202        readItemNames(is, attributes.back().items);
     
    22342234    std::vector<SectionInfo> nodesets;
    22352235    std::vector<SectionInfo> edgesets;
    2236     std::vector<SectionInfo> undiredgesets;
     2236    std::vector<SectionInfo> uedgesets;
    22372237
    22382238    std::vector<SectionInfo> nodes;
    22392239    std::vector<SectionInfo> edges;
    2240     std::vector<SectionInfo> undiredges;
     2240    std::vector<SectionInfo> uedges;
    22412241
    22422242    std::vector<SectionInfo> attributes;
  • lemon/lemon_writer.h

    r1901 r1909  
    9292    class ForwardComposeMap {
    9393    public:
    94       typedef typename Graph::UndirEdge Key;
     94      typedef typename Graph::UEdge Key;
    9595      typedef typename Map::Value Value;
    9696
     
    116116    class BackwardComposeMap {
    117117    public:
    118       typedef typename Graph::UndirEdge Key;
     118      typedef typename Graph::UEdge Key;
    119119      typedef typename Map::Value Value;
    120120
     
    709709  ///
    710710  /// The lemon format can store multiple undirected edgesets with several
    711   /// maps. The undirected edgeset section's header line is \c \@undiredgeset
    712   /// \c undiredgeset_name, but the \c undiredgeset_name may be empty.
     711  /// maps. The undirected edgeset section's header line is \c \@uedgeset
     712  /// \c uedgeset_name, but the \c uedgeset_name may be empty.
    713713  ///
    714714  /// The first line of the section contains the names of the maps separated
     
    735735  /// \relates LemonWriter
    736736  template <typename _Graph, typename _Traits = DefaultWriterTraits>
    737   class UndirEdgeSetWriter : public LemonWriter::SectionWriter {
     737  class UEdgeSetWriter : public LemonWriter::SectionWriter {
    738738    typedef LemonWriter::SectionWriter Parent;
    739739  public:
     
    743743    typedef typename Graph::Node Node;
    744744    typedef typename Graph::Edge Edge;
    745     typedef typename Graph::UndirEdge UndirEdge;
     745    typedef typename Graph::UEdge UEdge;
    746746
    747747    /// \brief Constructor.
    748748    ///
    749     /// Constructor for UndirEdgeSetWriter. It creates the UndirEdgeSetWriter
     749    /// Constructor for UEdgeSetWriter. It creates the UEdgeSetWriter
    750750    /// and attach it into the given LemonWriter. It will write node labels by
    751751    /// the \c _nodeLabelWriter. If the \c _forceLabelMap parameter is true
     
    753753    /// "label" named map.
    754754    template <typename NodeLabelWriter>
    755     UndirEdgeSetWriter(LemonWriter& _writer, const Graph& _graph,
     755    UEdgeSetWriter(LemonWriter& _writer, const Graph& _graph,
    756756                       const NodeLabelWriter& _nodeLabelWriter,
    757757                       const std::string& _name = std::string(),
     
    766766    /// \brief Destructor.
    767767    ///
    768     /// Destructor for UndirEdgeSetWriter.
    769     virtual ~UndirEdgeSetWriter() {
     768    /// Destructor for UEdgeSetWriter.
     769    virtual ~UEdgeSetWriter() {
    770770      typename MapWriters::iterator it;
    771771      for (it = writers.begin(); it != writers.end(); ++it) {
     
    775775
    776776  private:
    777     UndirEdgeSetWriter(const UndirEdgeSetWriter&);
    778     void operator=(const UndirEdgeSetWriter&);
     777    UEdgeSetWriter(const UEdgeSetWriter&);
     778    void operator=(const UEdgeSetWriter&);
    779779
    780780  public:
     
    784784    /// Add a new undirected map writer command for the writer.
    785785    template <typename Map>
    786     UndirEdgeSetWriter& writeUndirEdgeMap(std::string name, const Map& map) {
    787       return writeUndirEdgeMap<typename Traits::
     786    UEdgeSetWriter& writeUEdgeMap(std::string name, const Map& map) {
     787      return writeUEdgeMap<typename Traits::
    788788        template Writer<typename Map::Value>, Map>(name, map);
    789789    }
     
    793793    /// Add a new undirected map writer command for the writer.
    794794    template <typename Writer, typename Map>
    795     UndirEdgeSetWriter& writeUndirEdgeMap(std::string name, const Map& map,
     795    UEdgeSetWriter& writeUEdgeMap(std::string name, const Map& map,
    796796                                          const Writer& writer = Writer()) {
    797       checkConcept<concept::ReadMap<UndirEdge, typename Map::Value>, Map>();
     797      checkConcept<concept::ReadMap<UEdge, typename Map::Value>, Map>();
    798798      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, Writer>();
    799799      writers.push_back(
    800800        make_pair(name, new _writer_bits::
    801                   MapWriter<UndirEdge, Map, Writer>(map, writer)));
     801                  MapWriter<UEdge, Map, Writer>(map, writer)));
    802802      return *this;
    803803    }
     
    807807    /// Add a new directed map writer command for the writer.
    808808    template <typename Map>
    809     UndirEdgeSetWriter& writeEdgeMap(std::string name, const Map& map) {
     809    UEdgeSetWriter& writeEdgeMap(std::string name, const Map& map) {
    810810      return writeEdgeMap<typename Traits::
    811811        template Writer<typename Map::Value>, Map>(name, map);
     
    816816    /// Add a new directed map writer command for the writer.
    817817    template <typename Writer, typename Map>
    818     UndirEdgeSetWriter& writeEdgeMap(std::string name, const Map& map,
     818    UEdgeSetWriter& writeEdgeMap(std::string name, const Map& map,
    819819                                     const Writer& writer = Writer()) {
    820820      checkConcept<concept::ReadMap<Edge, typename Map::Value>, Map>();
    821821      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, Writer>();
    822       writeUndirEdge("+" + name,
     822      writeUEdge("+" + name,
    823823                     _writer_bits::forwardComposeMap(graph, map), writer);
    824       writeUndirEdge("-" + name,
     824      writeUEdge("-" + name,
    825825                     _writer_bits::backwardComposeMap(graph, map), writer);
    826826      return *this;
     
    833833    /// It gives back the header of the section.
    834834    virtual std::string header() {
    835       return "@undiredgeset " + name;
     835      return "@uedgeset " + name;
    836836    }
    837837
     
    858858      }
    859859      os << std::endl;
    860       for (typename Graph::UndirEdgeIt it(graph); it != INVALID; ++it) {
     860      for (typename Graph::UEdgeIt it(graph); it != INVALID; ++it) {
    861861        nodeLabelWriter->write(os, graph.source(it));
    862862        os << '\t';
     
    892892    /// undirected edge. Otherwise if the \c forceLabel parameter was true it
    893893    /// will write its id in the graph.
    894     void writeLabel(std::ostream& os, const UndirEdge& item) const {
     894    void writeLabel(std::ostream& os, const UEdge& item) const {
    895895      if (forceLabelMap) {
    896896        os << graph.id(item);
     
    923923
    924924    typedef std::vector<std::pair<std::string, _writer_bits::
    925                                   MapWriterBase<UndirEdge>*> > MapWriters;
     925                                  MapWriterBase<UEdge>*> > MapWriters;
    926926    MapWriters writers;
    927927
    928     _writer_bits::MapWriterBase<UndirEdge>* labelMap;
     928    _writer_bits::MapWriterBase<UEdge>* labelMap;
    929929    bool forceLabelMap;
    930930   
     
    11001100  /// \brief SectionWriter for writing named undirected edges.
    11011101  ///
    1102   /// The undirected edges section's header line is \c \@undiredges
    1103   /// \c undiredges_name, but the \c undiredges_name may be empty.
     1102  /// The undirected edges section's header line is \c \@uedges
     1103  /// \c uedges_name, but the \c uedges_name may be empty.
    11041104  ///
    11051105  /// Each line in the section contains the name of the undirected edge and
     
    11081108  /// \relates LemonWriter
    11091109  template <typename _Graph>
    1110   class UndirEdgeWriter : public LemonWriter::SectionWriter {
     1110  class UEdgeWriter : public LemonWriter::SectionWriter {
    11111111    typedef LemonWriter::SectionWriter Parent;
    11121112    typedef _Graph Graph;
    11131113    typedef typename Graph::Node Node;
    11141114    typedef typename Graph::Edge Edge;
    1115     typedef typename Graph::UndirEdge UndirEdge;
     1115    typedef typename Graph::UEdge UEdge;
    11161116  public:
    11171117   
    11181118    /// \brief Constructor.
    11191119    ///
    1120     /// Constructor for UndirEdgeWriter. It creates the UndirEdgeWriter and
     1120    /// Constructor for UEdgeWriter. It creates the UEdgeWriter and
    11211121    /// attach it into the given LemonWriter. The given \c _LabelWriter
    11221122    /// will write the undirected edges' label what can be an undirected
    11231123    /// edgeset writer.
    11241124    template <typename _LabelWriter>
    1125     UndirEdgeWriter(LemonWriter& _writer, const _LabelWriter& _labelWriter,
     1125    UEdgeWriter(LemonWriter& _writer, const _LabelWriter& _labelWriter,
    11261126               const std::string& _name = std::string())
    11271127      : Parent(_writer), name(_name) {
    11281128      checkConcept<_writer_bits::ItemLabelWriter<Edge>, _LabelWriter>();
    1129       checkConcept<_writer_bits::ItemLabelWriter<UndirEdge>, _LabelWriter>();
    1130       undirEdgeLabelWriter.reset(new _writer_bits::
    1131                               LabelWriter<UndirEdge, _LabelWriter>(_labelWriter));
     1129      checkConcept<_writer_bits::ItemLabelWriter<UEdge>, _LabelWriter>();
     1130      uEdgeLabelWriter.reset(new _writer_bits::
     1131                              LabelWriter<UEdge, _LabelWriter>(_labelWriter));
    11321132      edgeLabelWriter.reset(new _writer_bits::
    11331133                         LabelWriter<Edge, _LabelWriter>(_labelWriter));
     
    11361136    /// \brief Destructor.
    11371137    ///
    1138     /// Destructor for UndirEdgeWriter.
    1139     virtual ~UndirEdgeWriter() {}
    1140   private:
    1141     UndirEdgeWriter(const UndirEdgeWriter&);
    1142     void operator=(const UndirEdgeWriter&);
    1143 
    1144   public:
    1145 
    1146     /// \brief Add an edge writer command for the UndirEdgeWriter.
    1147     ///
    1148     /// Add an edge writer command for the UndirEdgeWriter.
     1138    /// Destructor for UEdgeWriter.
     1139    virtual ~UEdgeWriter() {}
     1140  private:
     1141    UEdgeWriter(const UEdgeWriter&);
     1142    void operator=(const UEdgeWriter&);
     1143
     1144  public:
     1145
     1146    /// \brief Add an edge writer command for the UEdgeWriter.
     1147    ///
     1148    /// Add an edge writer command for the UEdgeWriter.
    11491149    void writeEdge(const std::string& name, const Edge& item) {
    11501150      edgeWriters.push_back(make_pair(name, &item));
    11511151    }
    11521152
    1153     /// \brief Add an undirected edge writer command for the UndirEdgeWriter.
    1154     ///
    1155     /// Add an undirected edge writer command for the UndirEdgeWriter.
    1156     void writeUndirEdge(const std::string& name, const UndirEdge& item) {
    1157       undirEdgeWriters.push_back(make_pair(name, &item));
     1153    /// \brief Add an undirected edge writer command for the UEdgeWriter.
     1154    ///
     1155    /// Add an undirected edge writer command for the UEdgeWriter.
     1156    void writeUEdge(const std::string& name, const UEdge& item) {
     1157      uEdgeWriters.push_back(make_pair(name, &item));
    11581158    }
    11591159
     
    11641164    /// It gives back the header of the section.
    11651165    virtual std::string header() {
    1166       return "@undiredges " + name;
     1166      return "@uedges " + name;
    11671167    }
    11681168
     
    11741174        throw DataFormatError("Cannot find undirected edgeset or label map");
    11751175      }
    1176       if (!undirEdgeLabelWriter->isLabelWriter()) {
     1176      if (!uEdgeLabelWriter->isLabelWriter()) {
    11771177        throw DataFormatError("Cannot find undirected edgeset or label map");
    11781178      }
    1179       for (int i = 0; i < (int)undirEdgeWriters.size(); ++i) {
    1180         os << undirEdgeWriters[i].first << ' ';
    1181         undirEdgeLabelWriter->write(os, *(undirEdgeWriters[i].second));
     1179      for (int i = 0; i < (int)uEdgeWriters.size(); ++i) {
     1180        os << uEdgeWriters[i].first << ' ';
     1181        uEdgeLabelWriter->write(os, *(uEdgeWriters[i].second));
    11821182        os << std::endl;
    11831183      }
     
    11941194
    11951195    typedef std::vector<std::pair<std::string,
    1196                                   const UndirEdge*> > UndirEdgeWriters;
    1197     UndirEdgeWriters undirEdgeWriters;
    1198     std::auto_ptr<_writer_bits::LabelWriterBase<UndirEdge> > undirEdgeLabelWriter;
     1196                                  const UEdge*> > UEdgeWriters;
     1197    UEdgeWriters uEdgeWriters;
     1198    std::auto_ptr<_writer_bits::LabelWriterBase<UEdge> > uEdgeLabelWriter;
    11991199
    12001200    typedef std::vector<std::pair<std::string, const Edge*> > EdgeWriters;
  • lemon/list_graph.h

    r1875 r1909  
    2020///\ingroup graphs
    2121///\file
    22 ///\brief ListGraph, UndirListGraph classes.
     22///\brief ListGraph, ListUGraph classes.
    2323
    2424#include <lemon/bits/erasable_graph_extender.h>
     
    577577  /**************** Undirected List Graph ****************/
    578578
    579   typedef ErasableUndirGraphExtender<
    580     ClearableUndirGraphExtender<
    581     ExtendableUndirGraphExtender<
    582     MappableUndirGraphExtender<
    583     IterableUndirGraphExtender<
    584     AlterableUndirGraphExtender<
    585     UndirGraphExtender<ListGraphBase> > > > > > > ExtendedUndirListGraphBase;
     579  typedef ErasableUGraphExtender<
     580    ClearableUGraphExtender<
     581    ExtendableUGraphExtender<
     582    MappableUGraphExtender<
     583    IterableUGraphExtender<
     584    AlterableUGraphExtender<
     585    UGraphExtender<ListGraphBase> > > > > > > ExtendedListUGraphBase;
    586586
    587587  /// \addtogroup graphs
     
    593593  ///
    594594  ///It conforms to the
    595   ///\ref concept::UndirGraph "UndirGraph" concept.
     595  ///\ref concept::UGraph "UGraph" concept.
    596596  ///
    597   ///\sa concept::UndirGraph.
     597  ///\sa concept::UGraph.
    598598  ///
    599599  ///\todo Snapshot, reverseEdge(), changeTarget(), changeSource(), contract()
    600600  ///haven't been implemented yet.
    601601  ///
    602   class UndirListGraph : public ExtendedUndirListGraphBase {
     602  class ListUGraph : public ExtendedListUGraphBase {
    603603  public:
    604     typedef ExtendedUndirListGraphBase Parent;
     604    typedef ExtendedListUGraphBase Parent;
    605605    /// \brief Changes the target of \c e to \c n
    606606    ///
     
    610610    /// referencing the changed edge remain
    611611    /// valid. However <tt>InEdge</tt>'s are invalidated.
    612     void changeTarget(UndirEdge e, Node n) {
     612    void changeTarget(UEdge e, Node n) {
    613613      _changeTarget(e,n);
    614614    }
     
    620620    ///referencing the changed edge remain
    621621    ///valid. However <tt>OutEdge</tt>'s are invalidated.
    622     void changeSource(UndirEdge e, Node n) {
     622    void changeSource(UEdge e, Node n) {
    623623      _changeSource(e,n);
    624624    }
  • lemon/max_matching.h

    r1875 r1909  
    6060    typedef typename Graph::Node Node;
    6161    typedef typename Graph::Edge Edge;
    62     typedef typename Graph::UndirEdge UndirEdge;
    63     typedef typename Graph::UndirEdgeIt UndirEdgeIt;
     62    typedef typename Graph::UEdge UEdge;
     63    typedef typename Graph::UEdgeIt UEdgeIt;
    6464    typedef typename Graph::NodeIt NodeIt;
    6565    typedef typename Graph::IncEdgeIt IncEdgeIt;
     
    9999    ///heuristic of postponing shrinks for dense graphs.
    100100    void run() {
    101       if ( countUndirEdges(g) < HEUR_density*countNodes(g) ) {
     101      if ( countUEdges(g) < HEUR_density*countNodes(g) ) {
    102102        greedyMatching();
    103103        runEdmonds(0);
     
    213213    }
    214214
    215     ///Reads a matching from an \c UndirEdge valued \c Node map.
    216 
    217     ///Reads a matching from an \c UndirEdge valued \c Node map. \c
    218     ///map[v] must be an \c UndirEdge incident to \c v. This map must
     215    ///Reads a matching from an \c UEdge valued \c Node map.
     216
     217    ///Reads a matching from an \c UEdge valued \c Node map. \c
     218    ///map[v] must be an \c UEdge incident to \c v. This map must
    219219    ///have the property that if \c g.oppositeNode(u,map[u])==v then
    220220    ///\c \c g.oppositeNode(v,map[v])==u holds, and now some edge
     
    223223    void readNMapEdge(NMapE& map) {
    224224     for(NodeIt v(g); v!=INVALID; ++v) {
    225        UndirEdge e=map[v];
     225       UEdge e=map[v];
    226226        if ( e!=INVALID )
    227227          _mate.set(v,g.oppositeNode(v,e));
     
    229229    }
    230230   
    231     ///Writes the matching stored to an \c UndirEdge valued \c Node map.
    232 
    233     ///Writes the stored matching to an \c UndirEdge valued \c Node
    234     ///map. \c map[v] will be an \c UndirEdge incident to \c v. This
     231    ///Writes the matching stored to an \c UEdge valued \c Node map.
     232
     233    ///Writes the stored matching to an \c UEdge valued \c Node
     234    ///map. \c map[v] will be an \c UEdge incident to \c v. This
    235235    ///map will have the property that if \c g.oppositeNode(u,map[u])
    236236    ///== v then \c map[u]==map[v] holds, and now this edge is an edge
     
    264264    template<typename EMapB>
    265265    void readEMapBool(EMapB& map) {
    266       for(UndirEdgeIt e(g); e!=INVALID; ++e) {
     266      for(UEdgeIt e(g); e!=INVALID; ++e) {
    267267        if ( map[e] ) {
    268268          Node u=g.source(e);     
     
    283283    template<typename EMapB>
    284284    void writeEMapBool (EMapB& map) const {
    285       for(UndirEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);
     285      for(UEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);
    286286
    287287      typename Graph::template NodeMap<bool> todo(g,true);
  • lemon/path.h

    r1875 r1909  
    386386  /// \todo May we need just path for undirected graph instead of this.
    387387  template<typename Graph>
    388   class UndirPath {
     388  class UPath {
    389389