src/hugo/list_graph.h
changeset 900 fc7bc2dacee5
parent 891 74589d20dbc3
child 904 b40afcf42a4d
equal deleted inserted replaced
20:9c8b5a53dc4d 21:d58684d8b276
    11 #include <climits>
    11 #include <climits>
    12 
    12 
    13 #include <hugo/invalid.h>
    13 #include <hugo/invalid.h>
    14 
    14 
    15 #include <hugo/map_registry.h>
    15 #include <hugo/map_registry.h>
    16 #include <hugo/default_map.h>
    16 #include <hugo/array_map.h>
    17 
    17 
    18 #include <hugo/sym_map.h>
    18 #include <hugo/sym_map.h>
    19 
    19 
    20 #include <hugo/map_defines.h>
    20 #include <hugo/map_defines.h>
    21 
    21 
    78     CREATE_MAP_REGISTRIES;
    78     CREATE_MAP_REGISTRIES;
    79     /// Creating node and edge maps.
    79     /// Creating node and edge maps.
    80 
    80 
    81     /// \todo
    81     /// \todo
    82     /// It apears in the documentation as if it were a function definition.
    82     /// It apears in the documentation as if it were a function definition.
    83     CREATE_MAPS(DefaultMap);
    83     CREATE_MAPS(ArrayMap);
    84 
    84 
    85   public:
    85   public:
    86 
    86 
    87     ListGraph() 
    87     ListGraph() 
    88       : nodes(), first_node(-1),
    88       : nodes(), first_node(-1),
   443     typedef SymListGraph Graph;
   443     typedef SymListGraph Graph;
   444 
   444 
   445     /// Creating symmetric map registry.
   445     /// Creating symmetric map registry.
   446     CREATE_SYM_EDGE_MAP_REGISTRY;
   446     CREATE_SYM_EDGE_MAP_REGISTRY;
   447     /// Creating symmetric edge map.
   447     /// Creating symmetric edge map.
   448     CREATE_SYM_EDGE_MAP(DefaultMap);
   448     CREATE_SYM_EDGE_MAP(ArrayMap);
   449 
   449 
   450     SymListGraph() : ListGraph() { }
   450     SymListGraph() : ListGraph() { }
   451     SymListGraph(const ListGraph &_g) : ListGraph(_g) { }
   451     SymListGraph(const ListGraph &_g) : ListGraph(_g) { }
   452     ///Adds a pair of oppositely directed edges to the graph.
   452     ///Adds a pair of oppositely directed edges to the graph.
   453     Edge addEdge(Node u, Node v)
   453     Edge addEdge(Node u, Node v)
   528     class InEdgeIt;
   528     class InEdgeIt;
   529     
   529     
   530     /// Creating node map registry.
   530     /// Creating node map registry.
   531     CREATE_NODE_MAP_REGISTRY;
   531     CREATE_NODE_MAP_REGISTRY;
   532     /// Creating node maps.
   532     /// Creating node maps.
   533     CREATE_NODE_MAP(DefaultMap);
   533     CREATE_NODE_MAP(ArrayMap);
   534 
   534 
   535     /// Creating empty map structure for edges.
   535     /// Creating empty map structure for edges.
   536     template <typename Value>
   536     template <typename Value>
   537     class EdgeMap {
   537     class EdgeMap {
   538     public:
   538     public:
   539       EdgeMap() {}
       
   540       EdgeMap(const Graph&) {}
   539       EdgeMap(const Graph&) {}
   541       EdgeMap(const Graph&, const Value&) {}
   540       EdgeMap(const Graph&, const Value&) {}
   542 
   541 
   543       EdgeMap(const EdgeMap&) {}
   542       EdgeMap(const EdgeMap&) {}
   544       template <typename CMap> EdgeMap(const CMap&) {}
   543       template <typename CMap> EdgeMap(const CMap&) {}
   880 
   879 
   881 
   880 
   882     /// Creates edge map registry.
   881     /// Creates edge map registry.
   883     CREATE_EDGE_MAP_REGISTRY;
   882     CREATE_EDGE_MAP_REGISTRY;
   884     /// Creates edge maps.
   883     /// Creates edge maps.
   885     CREATE_EDGE_MAP(DefaultMap);
   884     CREATE_EDGE_MAP(ArrayMap);
   886 
   885 
   887     /// Imports node maps from the NodeGraphType.
   886     /// Imports node maps from the NodeGraphType.
   888     IMPORT_NODE_MAP(NodeGraphType, graph.G, EdgeSet, graph);
   887     IMPORT_NODE_MAP(NodeGraphType, graph.G, EdgeSet, graph);
   889     
   888     
   890     
   889