Index: lemon/smart_graph.h
===================================================================
--- lemon/smart_graph.h	(revision 157)
+++ lemon/smart_graph.h	(revision 209)
@@ -1,5 +1,5 @@
-/* -*- C++ -*-
+/* -*- mode: C++; indent-tabs-mode: nil; -*-
  *
- * This file is a part of LEMON, a generic C++ optimization library
+ * This file is a part of LEMON, a generic C++ optimization library.
  *
  * Copyright (C) 2003-2008
@@ -46,18 +46,18 @@
   protected:
 
-    struct NodeT 
+    struct NodeT
     {
-      int first_in, first_out;      
+      int first_in, first_out;
       NodeT() {}
     };
-    struct ArcT 
+    struct ArcT
     {
-      int target, source, next_in, next_out;      
-      ArcT() {}  
+      int target, source, next_in, next_out;
+      ArcT() {}
     };
 
     std::vector<NodeT> nodes;
     std::vector<ArcT> arcs;
-        
+
   public:
 
@@ -70,7 +70,7 @@
 
     SmartDigraphBase() : nodes(), arcs() { }
-    SmartDigraphBase(const SmartDigraphBase &_g) 
+    SmartDigraphBase(const SmartDigraphBase &_g)
       : nodes(_g.nodes), arcs(_g.arcs) { }
-    
+
     typedef True NodeNumTag;
     typedef True EdgeNumTag;
@@ -83,5 +83,5 @@
 
     Node addNode() {
-      int n = nodes.size();     
+      int n = nodes.size();
       nodes.push_back(NodeT());
       nodes[n].first_in = -1;
@@ -89,9 +89,9 @@
       return Node(n);
     }
-    
+
     Arc addArc(Node u, Node v) {
-      int n = arcs.size(); 
+      int n = arcs.size();
       arcs.push_back(ArcT());
-      arcs[n].source = u._id; 
+      arcs[n].source = u._id;
       arcs[n].target = v._id;
       arcs[n].next_out = nodes[u._id].first_out;
@@ -116,9 +116,9 @@
     static Arc arcFromId(int id) { return Arc(id);}
 
-    bool valid(Node n) const { 
-      return n._id >= 0 && n._id < static_cast<int>(nodes.size()); 
-    }
-    bool valid(Arc a) const { 
-      return a._id >= 0 && a._id < static_cast<int>(arcs.size()); 
+    bool valid(Node n) const {
+      return n._id >= 0 && n._id < static_cast<int>(nodes.size());
+    }
+    bool valid(Arc a) const {
+      return a._id >= 0 && a._id < static_cast<int>(arcs.size());
     }
 
@@ -137,5 +137,5 @@
       bool operator<(const Node i) const {return _id < i._id;}
     };
-    
+
 
     class Arc {
@@ -181,5 +181,5 @@
       arc._id = nodes[node._id].first_in;
     }
-    
+
     void nextIn(Arc& arc) const {
       arc._id = arcs[arc._id].next_in;
@@ -223,24 +223,24 @@
 
   public:
-    
+
     /// Constructor
-    
+
     /// Constructor.
     ///
     SmartDigraph() {};
-    
+
     ///Add a new node to the digraph.
-    
+
     /// \return the new node.
     ///
     Node addNode() { return Parent::addNode(); }
-    
+
     ///Add a new arc to the digraph.
-    
+
     ///Add a new arc to the digraph with source node \c s
     ///and target node \c t.
     ///\return the new arc.
-    Arc addArc(const Node& s, const Node& t) { 
-      return Parent::addArc(s, t); 
+    Arc addArc(const Node& s, const Node& t) {
+      return Parent::addArc(s, t);
     }
 
@@ -270,5 +270,5 @@
     ///
     /// This function gives back true if the given node is valid,
-    /// ie. it is a real node of the graph.  
+    /// ie. it is a real node of the graph.
     ///
     /// \warning A removed node (using Snapshot) could become valid again
@@ -279,5 +279,5 @@
     ///
     /// This function gives back true if the given arc is valid,
-    /// ie. it is a real arc of the graph.  
+    /// ie. it is a real arc of the graph.
     ///
     /// \warning A removed arc (using Snapshot) could become valid again
@@ -286,5 +286,5 @@
 
     ///Clear the digraph.
-    
+
     ///Erase all the nodes and arcs from the digraph.
     ///
@@ -294,5 +294,5 @@
 
     ///Split a node.
-    
+
     ///This function splits a node. First a new node is added to the digraph,
     ///then the source of each outgoing arc of \c n is moved to this new node.
@@ -319,5 +319,5 @@
 
   public:
-    
+
     class Snapshot;
 
@@ -328,15 +328,15 @@
       while(s.arc_num<arcs.size()) {
         Arc arc = arcFromId(arcs.size()-1);
-	Parent::notifier(Arc()).erase(arc);
-	nodes[arcs.back().source].first_out=arcs.back().next_out;
-	nodes[arcs.back().target].first_in=arcs.back().next_in;
-	arcs.pop_back();
+        Parent::notifier(Arc()).erase(arc);
+        nodes[arcs.back().source].first_out=arcs.back().next_out;
+        nodes[arcs.back().target].first_in=arcs.back().next_in;
+        arcs.pop_back();
       }
       while(s.node_num<nodes.size()) {
         Node node = nodeFromId(nodes.size()-1);
-	Parent::notifier(Node()).erase(node);
-	nodes.pop_back();
-      }
-    }    
+        Parent::notifier(Node()).erase(node);
+        nodes.pop_back();
+      }
+    }
 
   public:
@@ -356,5 +356,5 @@
     ///not the restored digraph or no change. Because the runtime performance
     ///the validity of the snapshot is not stored.
-    class Snapshot 
+    class Snapshot
     {
       SmartDigraph *_graph;
@@ -365,5 +365,5 @@
     public:
       ///Default constructor.
-      
+
       ///Default constructor.
       ///To actually make a snapshot you must call save().
@@ -371,10 +371,10 @@
       Snapshot() : _graph(0) {}
       ///Constructor that immediately makes a snapshot
-      
+
       ///This constructor immediately makes a snapshot of the digraph.
       ///\param _g The digraph we make a snapshot of.
       Snapshot(SmartDigraph &graph) : _graph(&graph) {
-	node_num=_graph->nodes.size();
-	arc_num=_graph->arcs.size();
+        node_num=_graph->nodes.size();
+        arc_num=_graph->arcs.size();
       }
 
@@ -386,13 +386,13 @@
       ///call, the previous snapshot gets lost.
       ///\param _g The digraph we make the snapshot of.
-      void save(SmartDigraph &graph) 
+      void save(SmartDigraph &graph)
       {
-	_graph=&graph;
-	node_num=_graph->nodes.size();
-	arc_num=_graph->arcs.size();
+        _graph=&graph;
+        node_num=_graph->nodes.size();
+        arc_num=_graph->arcs.size();
       }
 
       ///Undo the changes until a snapshot.
-      
+
       ///Undo the changes until a snapshot created by save().
       ///
@@ -402,5 +402,5 @@
       void restore()
       {
-	_graph->restoreSnapshot(*this);
+        _graph->restoreSnapshot(*this);
       }
     };
@@ -415,5 +415,5 @@
       int first_out;
     };
- 
+
     struct ArcT {
       int target;
@@ -425,7 +425,7 @@
 
     int first_free_arc;
-    
-  public:
-    
+
+  public:
+
     typedef SmartGraphBase Digraph;
 
@@ -433,5 +433,5 @@
     class Arc;
     class Edge;
-    
+
     class Node {
       friend class SmartGraphBase;
@@ -486,6 +486,6 @@
       : nodes(), arcs() {}
 
-    
-    int maxNodeId() const { return nodes.size()-1; } 
+
+    int maxNodeId() const { return nodes.size()-1; }
     int maxEdgeId() const { return arcs.size() / 2 - 1; }
     int maxArcId() const { return arcs.size()-1; }
@@ -505,5 +505,5 @@
     }
 
-    void first(Node& node) const { 
+    void first(Node& node) const {
       node._id = nodes.size() - 1;
     }
@@ -513,5 +513,5 @@
     }
 
-    void first(Arc& arc) const { 
+    void first(Arc& arc) const {
       arc._id = arcs.size() - 1;
     }
@@ -521,5 +521,5 @@
     }
 
-    void first(Edge& arc) const { 
+    void first(Edge& arc) const {
       arc._id = arcs.size() / 2 - 1;
     }
@@ -562,8 +562,8 @@
       } else {
         arc._id = -1;
-        d = true;      
-      }
-    }
-    
+        d = true;
+      }
+    }
+
     static int id(Node v) { return v._id; }
     static int id(Arc e) { return e._id; }
@@ -574,27 +574,27 @@
     static Edge edgeFromId(int id) { return Edge(id);}
 
-    bool valid(Node n) const { 
-      return n._id >= 0 && n._id < static_cast<int>(nodes.size()); 
-    }
-    bool valid(Arc a) const { 
+    bool valid(Node n) const {
+      return n._id >= 0 && n._id < static_cast<int>(nodes.size());
+    }
+    bool valid(Arc a) const {
       return a._id >= 0 && a._id < static_cast<int>(arcs.size());
     }
-    bool valid(Edge e) const { 
-      return e._id >= 0 && 2 * e._id < static_cast<int>(arcs.size()); 
-    }
-
-    Node addNode() {     
+    bool valid(Edge e) const {
+      return e._id >= 0 && 2 * e._id < static_cast<int>(arcs.size());
+    }
+
+    Node addNode() {
       int n = nodes.size();
       nodes.push_back(NodeT());
       nodes[n].first_out = -1;
-      
+
       return Node(n);
     }
-    
+
     Edge addEdge(Node u, Node v) {
       int n = arcs.size();
       arcs.push_back(ArcT());
       arcs.push_back(ArcT());
-      
+
       arcs[n].target = u._id;
       arcs[n | 1].target = v._id;
@@ -603,10 +603,10 @@
       nodes[v._id].first_out = n;
 
-      arcs[n | 1].next_out = nodes[u._id].first_out;	
+      arcs[n | 1].next_out = nodes[u._id].first_out;
       nodes[u._id].first_out = (n | 1);
 
       return Edge(n / 2);
     }
-    
+
     void clear() {
       arcs.clear();
@@ -626,5 +626,5 @@
   /// that <b> it does support only limited (only stack-like)
   /// node and arc deletions</b>.
-  /// Except from this it conforms to 
+  /// Except from this it conforms to
   /// the \ref concepts::Graph "Graph concept".
   ///
@@ -656,5 +656,5 @@
 
     /// Constructor
-    
+
     /// Constructor.
     ///
@@ -662,16 +662,16 @@
 
     ///Add a new node to the graph.
-    
+
     /// \return the new node.
     ///
     Node addNode() { return Parent::addNode(); }
-    
+
     ///Add a new edge to the graph.
-    
+
     ///Add a new edge to the graph with node \c s
     ///and \c t.
     ///\return the new edge.
-    Edge addEdge(const Node& s, const Node& t) { 
-      return Parent::addEdge(s, t); 
+    Edge addEdge(const Node& s, const Node& t) {
+      return Parent::addEdge(s, t);
     }
 
@@ -679,5 +679,5 @@
     ///
     /// This function gives back true if the given node is valid,
-    /// ie. it is a real node of the graph.  
+    /// ie. it is a real node of the graph.
     ///
     /// \warning A removed node (using Snapshot) could become valid again
@@ -688,5 +688,5 @@
     ///
     /// This function gives back true if the given arc is valid,
-    /// ie. it is a real arc of the graph.  
+    /// ie. it is a real arc of the graph.
     ///
     /// \warning A removed arc (using Snapshot) could become valid again
@@ -697,5 +697,5 @@
     ///
     /// This function gives back true if the given edge is valid,
-    /// ie. it is a real edge of the graph.  
+    /// ie. it is a real edge of the graph.
     ///
     /// \warning A removed edge (using Snapshot) could become valid again
@@ -704,5 +704,5 @@
 
     ///Clear the graph.
-    
+
     ///Erase all the nodes and edges from the graph.
     ///
@@ -712,5 +712,5 @@
 
   public:
-    
+
     class Snapshot;
 
@@ -729,21 +729,21 @@
         int n=arcs.size()-1;
         Edge arc=edgeFromId(n/2);
-	Parent::notifier(Edge()).erase(arc);
+        Parent::notifier(Edge()).erase(arc);
         std::vector<Arc> dir;
         dir.push_back(arcFromId(n));
         dir.push_back(arcFromId(n-1));
-	Parent::notifier(Arc()).erase(dir);
-	nodes[arcs[n].target].first_out=arcs[n].next_out;
-	nodes[arcs[n-1].target].first_out=arcs[n-1].next_out;
-	arcs.pop_back();
-	arcs.pop_back();
+        Parent::notifier(Arc()).erase(dir);
+        nodes[arcs[n].target].first_out=arcs[n].next_out;
+        nodes[arcs[n-1].target].first_out=arcs[n-1].next_out;
+        arcs.pop_back();
+        arcs.pop_back();
       }
       while(s.node_num<nodes.size()) {
         int n=nodes.size()-1;
         Node node = nodeFromId(n);
-	Parent::notifier(Node()).erase(node);
-	nodes.pop_back();
-      }
-    }    
+        Parent::notifier(Node()).erase(node);
+        nodes.pop_back();
+      }
+    }
 
   public:
@@ -764,5 +764,5 @@
     ///not the restored digraph or no change. Because the runtime performance
     ///the validity of the snapshot is not stored.
-    class Snapshot 
+    class Snapshot
     {
       SmartGraph *_graph;
@@ -773,5 +773,5 @@
     public:
       ///Default constructor.
-      
+
       ///Default constructor.
       ///To actually make a snapshot you must call save().
@@ -779,5 +779,5 @@
       Snapshot() : _graph(0) {}
       ///Constructor that immediately makes a snapshot
-      
+
       ///This constructor immediately makes a snapshot of the digraph.
       ///\param g The digraph we make a snapshot of.
@@ -793,5 +793,5 @@
       ///call, the previous snapshot gets lost.
       ///\param g The digraph we make the snapshot of.
-      void save(SmartGraph &graph) 
+      void save(SmartGraph &graph)
       {
         graph.saveSnapshot(*this);
@@ -799,5 +799,5 @@
 
       ///Undo the changes until a snapshot.
-      
+
       ///Undo the changes until a snapshot created by save().
       ///
@@ -811,5 +811,5 @@
     };
   };
-  
+
 } //namespace lemon
 
