src/lemon/smart_graph.h
changeset 975 12b9993b217c
parent 973 6a6f3ac07b20
child 977 48962802d168
equal deleted inserted replaced
6:0e0b78863514 7:c682ef4702ec
   230 
   230 
   231   ///A smart graph class.
   231   ///A smart graph class.
   232 
   232 
   233   ///This is a simple and fast graph implementation.
   233   ///This is a simple and fast graph implementation.
   234   ///It is also quite memory efficient, but at the price
   234   ///It is also quite memory efficient, but at the price
   235   ///that <b> it does not support node and edge deletion</b>.
   235   ///that <b> it does support only limited (only stack-like)
       
   236   ///node and edge deletions</b>.
   236   ///It conforms to 
   237   ///It conforms to 
   237   ///the \ref concept::ExtendableGraph "ExtendableGraph" concept.
   238   ///the \ref concept::ExtendableGraph "ExtendableGraph" concept.
   238   ///\sa concept::ExtendableGraph.
   239   ///\sa concept::ExtendableGraph.
   239   ///
   240   ///
   240   ///\todo Some member functions could be \c static.
   241   ///\todo Some member functions could be \c static.
   241   ///
       
   242   ///\todo A possibly useful functionality: a function saveState()
       
   243   ///(or snapshot() ) would
       
   244   ///give back a data sturcture X and then the function restoreState(X)
       
   245   ///(or rollBack() )
       
   246   ///would remove the nodes and edges added after the call of saveState().
       
   247   ///Of course it should be used as a stack. (Maybe X is not necessary.)
       
   248   ///
   242   ///
   249   ///\author Alpar Juttner
   243   ///\author Alpar Juttner
   250   class SmartGraph :public ClearableSmartGraphBase {
   244   class SmartGraph :public ClearableSmartGraphBase {
   251   public:
   245   public:
   252     /// Finds an edge between two nodes.
   246     /// Finds an edge between two nodes.
   291     ///\return An stucture SnapShot describing the pesent state of the
   285     ///\return An stucture SnapShot describing the pesent state of the
   292     ///graph.
   286     ///graph.
   293     ///\note After you rolled back to a state, you cannot roll "back" to
   287     ///\note After you rolled back to a state, you cannot roll "back" to
   294     ///a later state, in other word you cannot add again the edges deleted
   288     ///a later state, in other word you cannot add again the edges deleted
   295     ///by rollBack().
   289     ///by rollBack().
       
   290     ///\todo This function might be called saveState() or getState().
   296     SnapShot makeSnapShot() 
   291     SnapShot makeSnapShot() 
   297     {
   292     {
   298       SnapShot s;
   293       SnapShot s;
   299       s.node_num=nodes.size();
   294       s.node_num=nodes.size();
   300       s.edge_num=edges.size();
   295       s.edge_num=edges.size();