equal
deleted
inserted
replaced
5 #include <iostream> |
5 #include <iostream> |
6 #include <vector> |
6 #include <vector> |
7 |
7 |
8 #include "invalid.h" |
8 #include "invalid.h" |
9 |
9 |
10 #include "vector_map_factory.h" |
10 #include "map_registry.h" |
|
11 #include "array_map_factory.h" |
|
12 |
|
13 #include "map_defines.h" |
11 |
14 |
12 namespace hugo { |
15 namespace hugo { |
13 |
16 |
14 template <typename It> |
17 template <typename It> |
15 int count(It it) { |
18 int count(It it) { |
28 class EdgeIt; |
31 class EdgeIt; |
29 class OutEdgeIt; |
32 class OutEdgeIt; |
30 class InEdgeIt; |
33 class InEdgeIt; |
31 class SymEdgeIt; |
34 class SymEdgeIt; |
32 |
35 |
33 // template <typename T> class NodeMap; |
36 typedef ListGraph Graph; |
34 // template <typename T> class EdgeMap; |
37 |
|
38 CREATE_MAP_REGISTRIES |
|
39 CREATE_MAPS(ArrayMapFactory) |
|
40 |
35 private: |
41 private: |
36 // template <typename T> friend class NodeMap; |
|
37 // template <typename T> friend class EdgeMap; |
|
38 |
|
39 private: |
|
40 |
|
41 |
|
42 public: |
|
43 |
|
44 typedef MapRegistry<ListGraph, Node, NodeIt> NodeMapRegistry; |
|
45 typedef VectorMapFactory<NodeMapRegistry> NodeMapFactory; |
|
46 NodeMapRegistry node_maps; |
|
47 |
|
48 |
|
49 |
|
50 typedef MapRegistry<ListGraph, Edge, EdgeIt> EdgeMapRegistry; |
|
51 typedef VectorMapFactory<EdgeMapRegistry> EdgeMapFactory; |
|
52 EdgeMapRegistry edge_maps; |
|
53 |
|
54 |
42 |
55 int node_id; |
43 int node_id; |
56 int edge_id; |
44 int edge_id; |
57 int _node_num; |
45 int _node_num; |
58 int _edge_num; |
46 int _edge_num; |