COIN-OR::LEMON - Graph Library

Changeset 378:c3f93631cd24 in lemon-0.x for src/work/deba/test_graph.h


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

Legend:

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

    r377 r378  
    88#include "invalid.h"
    99
    10 #include "edge_map_registry.h"
    11 #include "node_map_registry.h"
    12 #include "edge_map_base.h"
    13 #include "node_map_base.h"
    1410#include "vector_map.h"
    1511
     
    4339  private:
    4440
    45                 NodeMapRegistry<ListGraph, Node> node_maps(*this);
    46                 EdgeMapRegistry<ListGraph, Edge> edge_maps(*this);
     41                typedef MapRegistry<ListGraph, Node, NodeIt> NodeMapRegistry;
     42                NodeMapRegistry node_maps;
     43               
     44                typedef MapRegistry<ListGraph, Edge, EdgeIt> EdgeMapRegistry;
     45                EdgeMapRegistry edge_maps;
    4746 
    4847        public:
     
    5049
    5150    template <typename T>
    52     class NodeMap : public VectorMap<ListGraph, Node, T, NodeMapBase> {
     51    class NodeMap : public VectorMap<ListGraph, Node, NodeIt, T> {
    5352                public:
    54                         NodeMap(ListGraph& g) : VectorMap<ListGraph, Node, T, NodeMapBase>(g) {}
     53                        NodeMap(ListGraph& g) : VectorMap<ListGraph, Node, NodeIt, T>(g.node_maps) {}
    5554                };
    5655               
    57                 EdgeMapRegistry<ListGraph, Edge> edge_maps;
    58 
    5956    template <typename T>
    60     class EdgeMap : public VectorMap<ListGraph, Edge, T, EdgeMapBase> {};
     57    class EdgeMap : public VectorMap<ListGraph, Edge, EdgeIt, T> {
     58                public:
     59                        EdgeMap(ListGraph& g) : VectorMap<ListGraph, Edge, EdgeIt, T>(g.edge_maps) {}
     60                };
    6161
    6262
     
    216216    /* default constructor */
    217217
    218     ListGraph() : node_id(0), edge_id(0), _node_num(0), _edge_num(0), _first_node(0), _last_node(0) { }
     218    ListGraph() : node_id(0), edge_id(0), _node_num(0), _edge_num(0), _first_node(0), _last_node(0),
     219                        edge_maps(*this), node_maps(*this) { }
    219220   
    220221    ~ListGraph() {
Note: See TracChangeset for help on using the changeset viewer.