equal
deleted
inserted
replaced
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 }; |