COIN-OR::LEMON - Graph Library

Changeset 571:9632ea8be6ca in lemon-0.x for src/work/deba/test_graph.h


Ignore:
Timestamp:
05/07/04 10:18:30 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@746
Message:
 
File:
1 edited

Legend:

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

    r378 r571  
    88#include "invalid.h"
    99
    10 #include "vector_map.h"
     10#include "vector_map_factory.h"
    1111
    1212namespace hugo {
     
    3939  private:
    4040
     41 
     42        public:
     43       
    4144                typedef MapRegistry<ListGraph, Node, NodeIt> NodeMapRegistry;
    4245                NodeMapRegistry node_maps;
    4346               
     47               
    4448                typedef MapRegistry<ListGraph, Edge, EdgeIt> EdgeMapRegistry;
    4549                EdgeMapRegistry edge_maps;
     50
     51                typedef VectorMapFactory<ListGraph, Edge, EdgeIt> EdgeMapFactory;
     52                typedef VectorMapFactory<ListGraph, Node, NodeIt> NodeMapFactory;
    4653 
    47         public:
    48  
    49 
    50     template <typename T>
    51     class NodeMap : public VectorMap<ListGraph, Node, NodeIt, T> {
    52                 public:
    53                         NodeMap(ListGraph& g) : VectorMap<ListGraph, Node, NodeIt, T>(g.node_maps) {}
    54                 };
    55                
    56     template <typename T>
    57     class EdgeMap : public VectorMap<ListGraph, Edge, EdgeIt, T> {
    58                 public:
    59                         EdgeMap(ListGraph& g) : VectorMap<ListGraph, Edge, EdgeIt, T>(g.edge_maps) {}
    60                 };
    61 
    6254
    6355    int node_id;
     
    216208    /* default constructor */
    217209
    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) { }
     210    ListGraph() : node_id(0), edge_id(0), _node_num(0), _edge_num(0), _first_node(0), _last_node(0){ }
    220211   
    221212    ~ListGraph() {
Note: See TracChangeset for help on using the changeset viewer.