3 #ifndef LEMON_IDMAPPABLE_GRAPH_EXTENDER_H
4 #define LEMON_IDMAPPABLE_GRAPH_EXTENDER_H
9 template <typename Base>
10 class IdMappableGraphExtender : public Base {
13 typedef IdMappableGraphExtender Graph;
16 typedef typename Parent::Node Node;
17 typedef typename Parent::Edge Edge;
27 NodeIdMap(const Graph& g) : graph(&g) {}
29 int operator[](const Node& node) const { return graph->id(node); }
31 int maxId() const {return graph->maxNodeId(); }
40 EdgeIdMap(const Graph& g) : graph(&g) {}
42 int operator[](const Edge& edge) const { return graph->id(edge); }
44 int maxId() const {return graph->maxEdgeId(); }