lemon/smart_graph.h
changeset 885 1f2a734581f8
parent 280 e7f8647ce760
child 329 d900fd1e760f
child 370 00c8843d491d
equal deleted inserted replaced
9:97ffafd89c99 10:1aff93efd528
   363       ///
   363       ///
   364       Snapshot() : _graph(0) {}
   364       Snapshot() : _graph(0) {}
   365       ///Constructor that immediately makes a snapshot
   365       ///Constructor that immediately makes a snapshot
   366 
   366 
   367       ///This constructor immediately makes a snapshot of the digraph.
   367       ///This constructor immediately makes a snapshot of the digraph.
   368       ///\param _g The digraph we make a snapshot of.
   368       ///\param graph The digraph we make a snapshot of.
   369       Snapshot(SmartDigraph &graph) : _graph(&graph) {
   369       Snapshot(SmartDigraph &graph) : _graph(&graph) {
   370         node_num=_graph->nodes.size();
   370         node_num=_graph->nodes.size();
   371         arc_num=_graph->arcs.size();
   371         arc_num=_graph->arcs.size();
   372       }
   372       }
   373 
   373 
   375 
   375 
   376       ///Make a snapshot of the digraph.
   376       ///Make a snapshot of the digraph.
   377       ///
   377       ///
   378       ///This function can be called more than once. In case of a repeated
   378       ///This function can be called more than once. In case of a repeated
   379       ///call, the previous snapshot gets lost.
   379       ///call, the previous snapshot gets lost.
   380       ///\param _g The digraph we make the snapshot of.
   380       ///\param graph The digraph we make the snapshot of.
   381       void save(SmartDigraph &graph)
   381       void save(SmartDigraph &graph)
   382       {
   382       {
   383         _graph=&graph;
   383         _graph=&graph;
   384         node_num=_graph->nodes.size();
   384         node_num=_graph->nodes.size();
   385         arc_num=_graph->arcs.size();
   385         arc_num=_graph->arcs.size();
   773       ///
   773       ///
   774       Snapshot() : _graph(0) {}
   774       Snapshot() : _graph(0) {}
   775       ///Constructor that immediately makes a snapshot
   775       ///Constructor that immediately makes a snapshot
   776 
   776 
   777       ///This constructor immediately makes a snapshot of the digraph.
   777       ///This constructor immediately makes a snapshot of the digraph.
   778       ///\param g The digraph we make a snapshot of.
   778       ///\param graph The digraph we make a snapshot of.
   779       Snapshot(SmartGraph &graph) {
   779       Snapshot(SmartGraph &graph) {
   780         graph.saveSnapshot(*this);
   780         graph.saveSnapshot(*this);
   781       }
   781       }
   782 
   782 
   783       ///Make a snapshot.
   783       ///Make a snapshot.
   784 
   784 
   785       ///Make a snapshot of the graph.
   785       ///Make a snapshot of the graph.
   786       ///
   786       ///
   787       ///This function can be called more than once. In case of a repeated
   787       ///This function can be called more than once. In case of a repeated
   788       ///call, the previous snapshot gets lost.
   788       ///call, the previous snapshot gets lost.
   789       ///\param g The digraph we make the snapshot of.
   789       ///\param graph The digraph we make the snapshot of.
   790       void save(SmartGraph &graph)
   790       void save(SmartGraph &graph)
   791       {
   791       {
   792         graph.saveSnapshot(*this);
   792         graph.saveSnapshot(*this);
   793       }
   793       }
   794 
   794