686 ///either broken program, invalid state of the graph, valid but |
686 ///either broken program, invalid state of the graph, valid but |
687 ///not the restored graph or no change. Because the runtime performance |
687 ///not the restored graph or no change. Because the runtime performance |
688 ///the validity of the snapshot is not stored. |
688 ///the validity of the snapshot is not stored. |
689 class Snapshot |
689 class Snapshot |
690 { |
690 { |
691 SmartUGraph *g; |
691 SmartUGraph *graph; |
692 protected: |
692 protected: |
693 friend class SmartUGraph; |
693 friend class SmartUGraph; |
694 unsigned int node_num; |
694 unsigned int node_num; |
695 unsigned int edge_num; |
695 unsigned int edge_num; |
696 public: |
696 public: |
697 ///Default constructor. |
697 ///Default constructor. |
698 |
698 |
699 ///Default constructor. |
699 ///Default constructor. |
700 ///To actually make a snapshot you must call save(). |
700 ///To actually make a snapshot you must call save(). |
701 /// |
701 /// |
702 Snapshot() : g(0) {} |
702 Snapshot() : graph(0) {} |
703 ///Constructor that immediately makes a snapshot |
703 ///Constructor that immediately makes a snapshot |
704 |
704 |
705 ///This constructor immediately makes a snapshot of the graph. |
705 ///This constructor immediately makes a snapshot of the graph. |
706 ///\param g The graph we make a snapshot of. |
706 ///\param g The graph we make a snapshot of. |
707 Snapshot(SmartUGraph &g) { |
707 Snapshot(SmartUGraph &g) { |