COIN-OR::LEMON - Graph Library

Changeset 1909:2d806130e700 in lemon-0.x for lemon/bits


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

Location:
lemon/bits
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • 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]);
Note: See TracChangeset for help on using the changeset viewer.