COIN-OR::LEMON - Graph Library

Changeset 377:33fe0ee01dc5 in lemon-0.x for src/work/deba/test_graph.h


Ignore:
Timestamp:
04/22/04 18:36:57 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@507
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/deba/test_graph.h

    r340 r377  
    66#include <vector>
    77
    8 #include <invalid.h>
    9 
    10 #include "vector_map.h"
     8#include "invalid.h"
     9
    1110#include "edge_map_registry.h"
    1211#include "node_map_registry.h"
    1312#include "edge_map_base.h"
    1413#include "node_map_base.h"
     14#include "vector_map.h"
    1515
    1616namespace hugo {
     
    4141 //   template <typename T> friend class EdgeMap;
    4242 
    43                 NodeMapRegistry<ListGraph, Node> node_maps;
     43  private:
     44
     45                NodeMapRegistry<ListGraph, Node> node_maps(*this);
     46                EdgeMapRegistry<ListGraph, Edge> edge_maps(*this);
     47 
     48        public:
     49 
    4450
    4551    template <typename T>
    46     class NodeMap : public VectorMap<ListGraph, Edge, T, EdgeMapBase> {};
     52    class NodeMap : public VectorMap<ListGraph, Node, T, NodeMapBase> {
     53                public:
     54                        NodeMap(ListGraph& g) : VectorMap<ListGraph, Node, T, NodeMapBase>(g) {}
     55                };
    4756               
    4857                EdgeMapRegistry<ListGraph, Edge> edge_maps;
    4958
    5059    template <typename T>
    51     class EdgeMap : public VectorMap<Graph, Node, T, NodeMapBase> {};
     60    class EdgeMap : public VectorMap<ListGraph, Edge, T, EdgeMapBase> {};
    5261
    5362
     
    311320
    312321    void erase(Node i) {
    313                         node_map.erase(i);
     322                        node_maps.erase(i);
    314323      while (first<OutEdgeIt>(i).valid()) erase(first<OutEdgeIt>(i));
    315324      while (first<InEdgeIt>(i).valid()) erase(first<InEdgeIt>(i));
Note: See TracChangeset for help on using the changeset viewer.