COIN-OR::LEMON - Graph Library

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


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

File:
1 edited

Legend:

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