lemon/graph_adaptor.h
changeset 1829 183b4cbf9733
parent 1755 bf267b301a5e
child 1839 b2dfd32b4895
equal deleted inserted replaced
12:89b18a0b6919 13:1a0d69418368
    31 #include <lemon/bits/clearable_graph_extender.h>
    31 #include <lemon/bits/clearable_graph_extender.h>
    32 #include <lemon/bits/extendable_graph_extender.h>
    32 #include <lemon/bits/extendable_graph_extender.h>
    33 #include <lemon/bits/iterable_graph_extender.h>
    33 #include <lemon/bits/iterable_graph_extender.h>
    34 #include <lemon/bits/alteration_notifier.h>
    34 #include <lemon/bits/alteration_notifier.h>
    35 #include <lemon/bits/default_map.h>
    35 #include <lemon/bits/default_map.h>
    36 #include <lemon/bits/undir_graph_extender.h>
    36 #include <lemon/bits/graph_extender.h>
    37 #include <iostream>
    37 #include <iostream>
    38 
    38 
    39 namespace lemon {
    39 namespace lemon {
    40 
    40 
    41   // Graph adaptors
    41   // Graph adaptors
  1857     }
  1857     }
  1858 
  1858 
  1859     int id(const Node& node) const { return graph->id(node); }
  1859     int id(const Node& node) const { return graph->id(node); }
  1860     int id(const Edge& edge) const { return edge.id; }
  1860     int id(const Edge& edge) const { return edge.id; }
  1861 
  1861 
  1862     Node fromId(int id, Node) const { return graph->fromId(id, Node()); }
  1862     Node nodeFromId(int id) const { return graph->fromId(id, Node()); }
  1863     Edge fromId(int id, Edge) const { return Edge(id); }
  1863     Edge edgeFromId(int id) const { return Edge(id); }
  1864 
  1864 
  1865     int maxId(Node) const { return graph->maxId(Node()); };
  1865     int maxNodeId() const { return graph->maxId(Node()); };
  1866     int maxId(Edge) const { return edges.size() - 1; }
  1866     int maxEdgeId() const { return edges.size() - 1; }
  1867 
  1867 
  1868     Node source(const Edge& edge) const { return edges[edge.id].source;}
  1868     Node source(const Edge& edge) const { return edges[edge.id].source;}
  1869     Node target(const Edge& edge) const { return edges[edge.id].target;}
  1869     Node target(const Edge& edge) const { return edges[edge.id].target;}
  1870 
  1870 
  1871   };
  1871   };