src/include/smart_graph.h
changeset 404 d888ca4e6c00
parent 398 ecebcedd8960
child 407 e34e1bc610cf
equal deleted inserted replaced
3:b04c68b58f06 4:5cb70fe9d72d
    21   ///It is also quite memory efficient, but at the price
    21   ///It is also quite memory efficient, but at the price
    22   ///that <b> it does not support node and edge deletion</b>.
    22   ///that <b> it does not support node and edge deletion</b>.
    23   ///It conforms to the graph interface documented under
    23   ///It conforms to the graph interface documented under
    24   ///the description of \ref GraphSkeleton.
    24   ///the description of \ref GraphSkeleton.
    25   ///\sa \ref GraphSkeleton.
    25   ///\sa \ref GraphSkeleton.
       
    26   ///
       
    27   ///\todo Some member functions could be \c static.
    26   class SmartGraph {
    28   class SmartGraph {
    27 
    29 
    28     struct NodeT 
    30     struct NodeT 
    29     {
    31     {
    30       int first_in,first_out;      
    32       int first_in,first_out;      
   198     };
   200     };
   199     
   201     
   200     class NodeIt : public Node {
   202     class NodeIt : public Node {
   201       friend class SmartGraph;
   203       friend class SmartGraph;
   202     public:
   204     public:
       
   205       NodeIt() : Node() { }
       
   206       NodeIt(Invalid i) : Node(i) { }
   203       NodeIt(const SmartGraph& G) : Node(G.nodes.size()?0:-1) { }
   207       NodeIt(const SmartGraph& G) : Node(G.nodes.size()?0:-1) { }
   204       NodeIt() : Node() { }
       
   205     };
   208     };
   206 
   209 
   207     class Edge {
   210     class Edge {
   208       friend class SmartGraph;
   211       friend class SmartGraph;
   209       template <typename T> friend class EdgeMap;
   212       template <typename T> friend class EdgeMap;