COIN-OR::LEMON - Graph Library

Changeset 1267:a93f94dbe3d3 in lemon-0.x for src/lemon/vector_map.h


Ignore:
Timestamp:
03/26/05 00:31:57 (15 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1694
Message:

First version of iterable maps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/vector_map.h

    r1164 r1267  
    2121#include <algorithm>
    2222
     23#include <lemon/utility.h>
     24#include <lemon/map_iterator.h>
    2325#include <lemon/alteration_notifier.h>
    2426
     
    4547       
    4648
    47   template <typename _Graph,
    48             typename _Item,
    49             typename _Value>
     49  template <
     50    typename _Graph,
     51    typename _Item,   
     52    typename _Value
     53    >
    5054  class VectorMap : public AlterationNotifier<_Item>::ObserverBase {
    5155  public:
     
    8387    /// The pointer type of the map;
    8488    typedef typename Container::const_pointer ConstPointer;
     89
     90    typedef True FullTypeTag;
    8591
    8692    /// Constructor to attach the new map into the registry.
     
    206212      container.clear();
    207213    }
    208 
     214   
    209215  private:
    210216               
     
    233239
    234240   
    235 
    236241    template <typename _Value>
    237     class NodeMap : public VectorMap<Graph, Node, _Value> {
     242    class NodeMap :
     243      public IterableMapExtender<VectorMap<Graph, Node, _Value> > {
    238244    public:
    239245      typedef VectorMappableGraphExtender<_Base> Graph;
     
    241247      typedef typename Graph::Node Node;
    242248
    243       typedef VectorMap<Graph, Node, _Value> Parent;
     249      typedef IterableMapExtender<VectorMap<Graph, Node, _Value> > Parent;
    244250
    245251      //typedef typename Parent::Graph Graph;
     
    254260
    255261    template <typename _Value>
    256     class EdgeMap : public VectorMap<Graph, Edge, _Value> {
     262    class EdgeMap
     263      : public IterableMapExtender<VectorMap<Graph, Edge, _Value> > {
    257264    public:
    258265      typedef VectorMappableGraphExtender<_Base> Graph;
     
    260267      typedef typename Graph::Edge Edge;
    261268
    262       typedef VectorMap<Graph, Edge, _Value> Parent;
     269      typedef IterableMapExtender<VectorMap<Graph, Edge, _Value> > Parent;
    263270
    264271      //typedef typename Parent::Graph Graph;
Note: See TracChangeset for help on using the changeset viewer.