src/work/alpar/emptygraph.h
changeset 53 cc5eb73a3a93
parent 52 a4fc9c5dcee5
child 54 acd0dc288149
equal deleted inserted replaced
0:3c4352cb2266 1:2c39e47106d0
     1 // -*-mode: c++; -*-
     1 // -*-mode: c++; -*-
     2 
     2 
     3 template <class N, class E>
       
     4 class Graph
     3 class Graph
     5 {
     4 {
     6 public:
     5 public:
     7   typedef E EdgeType;
     6   typedef E EdgeType;
     8   typedef N NodeType;
     7   typedef N NodeType;
    52   {
    51   {
    53   public:
    52   public:
    54     typedef T value_type;
    53     typedef T value_type;
    55     void set(const NodeIt i, const T &t);
    54     void set(const NodeIt i, const T &t);
    56     T get(const NodeIt i) const;
    55     T get(const NodeIt i) const;
    57     T operator[](const NodeIt i);
    56     T &operator[](const NodeIt i);
    58       
    57       
    59     NodeMap(const Graph &G);
    58     NodeMap(const Graph &G);
    60   };
    59   };
    61 
    60 
    62   template<class T> class EdgeMap
    61   template<class T> class EdgeMap
    63   {
    62   {
    64   public:
    63   public:
    65     typedef T value_type;
    64     typedef T value_type;
    66     void set(const EdgeIt i, const T &t);
    65     void set(const EdgeIt i, const T &t);
    67     T get(const EdgeIt i) const;
    66     T get(const EdgeIt i) const;
    68     T operator[](const EdgeIt i);
    67     T &operator[](const EdgeIt i);
    69       
    68       
    70     EdgeMap(const Graph &G);
    69     EdgeMap(const Graph &G);
    71   };
    70   };
    72 };
    71 };