src/lemon/list_graph.h
changeset 979 b5fb023cdb7b
parent 959 c80ef5912903
child 980 0f1044b7a3af
equal deleted inserted replaced
5:7e66231720af 6:63a29d33d0c8
    63   public:
    63   public:
    64     
    64     
    65     typedef ListGraphBase Graph;
    65     typedef ListGraphBase Graph;
    66     
    66     
    67     class Node {
    67     class Node {
    68       friend class Graph;
    68       friend class ListGraphBase;
    69     protected:
    69     protected:
    70 
    70 
    71       int id;
    71       int id;
    72       Node(int pid) { id = pid;}
    72       Node(int pid) { id = pid;}
    73 
    73 
    78       bool operator!=(const Node& node) const {return id != node.id;}
    78       bool operator!=(const Node& node) const {return id != node.id;}
    79       bool operator<(const Node& node) const {return id < node.id;}
    79       bool operator<(const Node& node) const {return id < node.id;}
    80     };
    80     };
    81 
    81 
    82     class Edge {
    82     class Edge {
    83       friend class Graph;
    83       friend class ListGraphBase;
    84     protected:
    84     protected:
    85 
    85 
    86       int id;
    86       int id;
    87       Edge(int pid) { id = pid;}
    87       Edge(int pid) { id = pid;}
    88 
    88