Index: demo/Makefile.am
===================================================================
--- demo/Makefile.am	(revision 2497)
+++ demo/Makefile.am	(revision 2647)
@@ -1,53 +1,30 @@
-EXTRA_DIST += \
-	demo/Makefile \
-	demo/sub_graph_adaptor_demo.dim \
-	demo/circulation-input.lgf \
-	demo/coloring.lgf \
-	demo/dir_components.lgf \
-	demo/disjoint_paths_demo.lgf \
-	demo/graph_orientation.lgf \
-	demo/partitions.lgf \
-	demo/route.lgf \
-	demo/sample.lgf \
-	demo/simann_maxcut_demo.lgf \
-	demo/strongly_connected_orientation.lgf \
-	demo/sub_gad_input.lgf \
-	demo/u_components.lgf \
-	demo/steiner.lgf \
-	demo/sat-2.in
+#EXTRA_DIST += demo/sub_graph_adaptor_demo.dim
 
 if WANT_DEMO
 
-noinst_PROGRAMS += \
-	demo/arg_parser_demo \
-	demo/circulation_demo \
-	demo/csp_demo \
-	demo/dim_to_dot \
-	demo/dijkstra_demo \
-	demo/reader_writer_demo \
-	demo/eps_demo \
-	demo/graph_to_eps_demo \
-	demo/graph_orientation \
-	demo/min_route \
-	demo/hello_lemon \
-	demo/hello_world \
-	demo/maps_summary \
-	demo/sub_graph_adaptor_demo \
-	demo/descriptor_map_demo \
-	demo/coloring \
-	demo/grid_ugraph_demo \
-	demo/topology_demo \
-	demo/topological_ordering \
-	demo/simann_maxcut_demo \
-	demo/disjoint_paths_demo \
-	demo/strongly_connected_orientation \
-	demo/steiner_demo \
-	demo/sat-2
+#noinst_PROGRAMS += \
+#	demo/dim_to_dot \
+#	demo/dijkstra_demo \
+#	demo/reader_writer_demo \
+#	demo/dim_to_lgf \
+#	demo/eps_demo \
+#	demo/graph_to_eps_demo \
+#	demo/graph_orientation \
+#	demo/min_route \
+#	demo/hello_lemon \
+#	demo/sub_graph_adaptor_demo \
+#	demo/descriptor_map_demo \
+#	demo/coloring \
+#	demo/grid_ugraph_demo \
+#	demo/topology_demo \
+#	demo/simann_maxcut_demo \
+#	demo/disjoint_paths_demo \
+#	demo/strongly_connected_orientation
 
 if HAVE_GLPK
-noinst_PROGRAMS += demo/lp_demo demo/lp_maxflow_demo demo/mip_demo demo/sat
+#noinst_PROGRAMS += demo/lp_demo demo/lp_maxflow_demo
 else !HAVE_GLPK
 if HAVE_CPLEX
-noinst_PROGRAMS += demo/lp_demo demo/lp_maxflow_demo
+#noinst_PROGRAMS += demo/lp_demo demo/lp_maxflow_demo
 endif HAVE_CPLEX
 endif !HAVE_GLPK
@@ -55,63 +32,43 @@
 endif WANT_DEMO
 
-demo_arg_parser_demo_SOURCES = demo/arg_parser_demo.cc
+#demo_dim_to_dot_SOURCES = demo/dim_to_dot.cc
 
-demo_csp_demo_SOURCES = demo/csp_demo.cc
+#demo_dijkstra_demo_SOURCES = demo/dijkstra_demo.cc
 
-demo_circulation_demo_SOURCES = demo/circulation_demo.cc
+#demo_eps_demo_SOURCES = demo/eps_demo.cc
 
-demo_dim_to_dot_SOURCES = demo/dim_to_dot.cc
+#demo_reader_writer_demo_SOURCES = demo/reader_writer_demo.cc
 
-demo_dijkstra_demo_SOURCES = demo/dijkstra_demo.cc
+#demo_dim_to_lgf_SOURCES = demo/dim_to_lgf.cc
 
-demo_eps_demo_SOURCES = demo/eps_demo.cc
+#demo_coloring_SOURCES = demo/coloring.cc
 
-demo_reader_writer_demo_SOURCES = demo/reader_writer_demo.cc
+#demo_graph_to_eps_demo_SOURCES = demo/graph_to_eps_demo.cc
 
-demo_coloring_SOURCES = demo/coloring.cc
+#demo_grid_ugraph_demo_SOURCES = demo/grid_ugraph_demo.cc
 
-demo_maps_summary_SOURCES = demo/maps_summary.cc
+#demo_graph_orientation_SOURCES = demo/graph_orientation.cc
 
-demo_graph_to_eps_demo_SOURCES = demo/graph_to_eps_demo.cc
+#demo_min_route_SOURCES = demo/min_route.cc
 
-demo_grid_ugraph_demo_SOURCES = demo/grid_ugraph_demo.cc
+#demo_hello_lemon_SOURCES = demo/hello_lemon.cc
 
-demo_graph_orientation_SOURCES = demo/graph_orientation.cc
+#demo_sub_graph_adaptor_demo_SOURCES = \
+#	demo/sub_graph_adaptor_demo.cc \
+#	demo/tight_edge_filter_map.h
 
-demo_min_route_SOURCES = demo/min_route.cc
+#demo_lp_demo_SOURCES = demo/lp_demo.cc
+#demo_lp_demo_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
 
-demo_hello_lemon_SOURCES = demo/hello_lemon.cc
+#demo_lp_maxflow_demo_SOURCES = demo/lp_maxflow_demo.cc
+#demo_lp_maxflow_demo_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
 
-demo_hello_world_SOURCES = demo/hello_world.cc
+#demo_descriptor_map_demo_SOURCES = demo/descriptor_map_demo.cc
 
-demo_sub_graph_adaptor_demo_SOURCES = \
-	demo/sub_graph_adaptor_demo.cc \
-	demo/tight_edge_filter_map.h
+#demo_topology_demo_SOURCES = demo/topology_demo.cc
 
-demo_lp_demo_SOURCES = demo/lp_demo.cc
-demo_lp_demo_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
+#demo_simann_maxcut_demo_SOURCES = demo/simann_maxcut_demo.cc
 
-demo_mip_demo_SOURCES = demo/mip_demo.cc
-demo_mip_demo_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
+#demo_disjoint_paths_demo_SOURCES = demo/disjoint_paths_demo.cc
 
-demo_lp_maxflow_demo_SOURCES = demo/lp_maxflow_demo.cc
-demo_lp_maxflow_demo_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
-
-demo_descriptor_map_demo_SOURCES = demo/descriptor_map_demo.cc
-
-demo_topology_demo_SOURCES = demo/topology_demo.cc
-
-demo_topological_ordering_SOURCES = demo/topological_ordering.cc
-
-demo_simann_maxcut_demo_SOURCES = demo/simann_maxcut_demo.cc
-
-demo_disjoint_paths_demo_SOURCES = demo/disjoint_paths_demo.cc
-
-demo_strongly_connected_orientation_SOURCES = demo/strongly_connected_orientation.cc
-
-demo_steiner_demo_SOURCES=demo/steiner_demo.cc
-
-demo_sat_2_SOURCES=demo/sat-2.cc
-
-demo_sat_SOURCES=demo/sat.cc
-demo_sat_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
+#demo_strongly_connected_orientation_SOURCES = demo/strongly_connected_orientation.cc
Index: demo/arg_parser_demo.cc
===================================================================
--- demo/arg_parser_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Argument parser demo
-///
-/// This example shows how can the argument parser used.
-///
-/// \include arg_parser.cc
-
-#include <lemon/arg_parser.h>
-
-using namespace lemon;
-int main(int argc, const char **argv)
-{
-  ArgParser ap(argc,argv);
-  int i;
-  std::string s;
-  double d;
-  bool b,sil;
-  bool g1,g2,g3;
-  ap.refOption("n", "an integer input", i, true)
-    .refOption("val", "a double input", d)
-    .synonym("vals","val")
-    .refOption("name", "a string input", s)
-    .refOption("f", "a switch", b)
-    .refOption("nohelp", "", sil)
-    .refOption("gra","Choise A",g1)
-    .refOption("grb","Choise B",g2)
-    .refOption("grc","Choise C",g3)
-    .optionGroup("gr","gra")
-    .optionGroup("gr","grb")
-    .optionGroup("gr","grc")
-    .mandatoryGroup("gr")
-    .onlyOneGroup("gr")
-    .other("infile","The input file")
-    .other("...");
-  
-  ap.parse();
-
-  std::cout << "Parameters of '" << ap.commandName() << "':\n";
-
-  if(ap.given("n")) std::cout << "  Value of -n: " << i << std::endl;
-  if(ap.given("val")) std::cout << "  Value of -val: " << d << std::endl;
-  if(ap.given("name")) std::cout << "  Value of -name: " << s << std::endl;
-  if(ap.given("f")) std::cout << "  -f is given\n";
-  if(ap.given("nohelp")) std::cout << "  Value of -nohelp: " << sil << std::endl;
-
-  switch(ap.files().size()) {
-  case 0:
-    std::cout << "  No file argument was given.\n";
-    break;
-  case 1:
-    std::cout << "  1 file argument was given. It is:\n";
-    break;
-  default:
-    std::cout << "  "
-	      << ap.files().size() << " file arguments were given. They are:\n";
-  }
-  for(unsigned int i=0;i<ap.files().size();++i)
-    std::cout << "    '" << ap.files()[i] << "'\n";
-  
-}
Index: demo/circulation-input.lgf
===================================================================
--- demo/circulation-input.lgf	(revision 2452)
+++ 	(revision )
@@ -1,165 +1,0 @@
-@nodeset 
-coordinates_x	coordinates_y	delta	label	
--396.638	-311.798	0	0	
-154.409	-214.714	13	1	
--378.119	-135.808	0	2	
--138.182	-58.0452	0	3	
-55	-76.1018	0	4	
--167.302	169.88	0	5	
-71.6876	38.7452	0	6	
--328.784	257.777	0	7	
-354.242	67.9628	-13	8	
-147	266	0	9	
-@edgeset 
-		label	lo_cap	up_cap	
-0	1	0	0	20	
-0	2	1	0	0	
-1	1	2	0	3	
-1	2	3	0	8	
-1	3	4	0	8	
-2	5	5	0	5	
-3	2	6	0	5	
-3	5	7	0	5	
-3	6	8	0	5	
-4	3	9	0	3	
-5	7	10	0	3	
-5	6	11	0	10	
-5	8	12	0	10	
-6	8	13	0	8	
-8	9	14	0	20	
-8	1	15	0	5	
-9	5	16	0	5	
-@gui
-<arrow_pos>
- <item>
-  <first>0</first>
-  <second>
-   <x>-121.114</x><y>-263.256</y>
-  </second>
- </item>
- <item>
-  <first>1</first>
-  <second>
-   <x>-387.378</x><y>-223.803</y>
-  </second>
- </item>
- <item>
-  <first>2</first>
-  <second>
-   <x>253.622</x><y>-301.284</y>
-  </second>
- </item>
- <item>
-  <first>3</first>
-  <second>
-   <x>-111.855</x><y>-175.261</y>
-  </second>
- </item>
- <item>
-  <first>4</first>
-  <second>
-   <x>8.1134</x><y>-136.379</y>
-  </second>
- </item>
- <item>
-  <first>5</first>
-  <second>
-   <x>-272.71</x><y>17.0361</y>
-  </second>
- </item>
- <item>
-  <first>6</first>
-  <second>
-   <x>-258.151</x><y>-96.9267</y>
-  </second>
- </item>
- <item>
-  <first>7</first>
-  <second>
-   <x>-152.742</x><y>55.9176</y>
-  </second>
- </item>
- <item>
-  <first>8</first>
-  <second>
-   <x>-33.2474</x><y>-9.64996</y>
-  </second>
- </item>
- <item>
-  <first>9</first>
-  <second>
-   <x>-41.5912</x><y>-67.0735</y>
-  </second>
- </item>
- <item>
-  <first>10</first>
-  <second>
-   <x>-248.043</x><y>213.829</y>
-  </second>
- </item>
- <item>
-  <first>11</first>
-  <second>
-   <x>-47.8072</x><y>104.313</y>
-  </second>
- </item>
- <item>
-  <first>12</first>
-  <second>
-   <x>93.4701</x><y>118.922</y>
-  </second>
- </item>
- <item>
-  <first>13</first>
-  <second>
-   <x>212.965</x><y>53.354</y>
-  </second>
- </item>
- <item>
-  <first>14</first>
-  <second>
-   <x>250.621</x><y>166.981</y>
-  </second>
- </item>
- <item>
-  <first>15</first>
-  <second>
-   <x>254.326</x><y>-73.3755</y>
-  </second>
- </item>
- <item>
-  <first>16</first>
-  <second>
-   <x>-10.1511</x><y>217.94</y>
-  </second>
- </item>
-</arrow_pos>
-<active_nodemaps>
- <item>
-  <first>0</first>
-  <second></second>
- </item>
- <item>
-  <first>1</first>
-  <second>delta</second>
- </item>
- <item>
-  <first>2</first>
-  <second>label</second>
- </item>
-</active_nodemaps>
-<active_edgemaps>
- <item>
-  <first>0</first>
-  <second>up_cap</second>
- </item>
- <item>
-  <first>1</first>
-  <second></second>
- </item>
- <item>
-  <first>2</first>
-  <second>up_cap</second>
- </item>
-</active_edgemaps>
-@end
Index: demo/circulation_demo.cc
===================================================================
--- demo/circulation_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,107 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Demonstrating the usage of LEMON's General Flow algorithm
-///
-/// This demo program reads a general network circulation problem from the
-/// file 'circulation-input.lgf', runs the preflow based algorithm for
-/// finding a feasible solution and writes the output
-/// to 'circulation-input.lgf'
-///
-/// \include circulation_demo.cc
-
-#include <iostream>
-
-#include <lemon/list_graph.h>
-#include <lemon/circulation.h>
-#include <lemon/graph_reader.h>
-#include <lemon/graph_writer.h>
-
-using namespace lemon;
-
-
-int main (int, char*[])
-{
-
-    typedef ListGraph Graph;
-    typedef Graph::Node Node;
-    typedef Graph::NodeIt NodeIt;
-    typedef Graph::Edge Edge;
-    typedef Graph::EdgeIt EdgeIt;
-    typedef Graph::EdgeMap<int> EdgeMap;
-    typedef Graph::NodeMap<int> NodeMap;
-    typedef Graph::NodeMap<double> DNodeMap;
-
-    Graph g;
-    EdgeMap lo(g);
-    EdgeMap up(g);
-    NodeMap delta(g);
-    NodeMap nid(g);
-    EdgeMap eid(g);
-    DNodeMap cx(g);
-    DNodeMap cy(g);
-    
-    GraphReader<Graph>("circulation-input.lgf", g).
-      readEdgeMap("lo_cap", lo).
-      readEdgeMap("up_cap", up).
-      readNodeMap("delta", delta).
-      readEdgeMap("label", eid).
-      readNodeMap("label", nid).
-      readNodeMap("coordinates_x", cx).
-      readNodeMap("coordinates_y", cy).
-      run();
-
-    Circulation<Graph> gen(g,lo,up,delta);
-    bool ret=gen.run();
-    if(ret)
-      {
-	std::cout << "\nA feasible flow has been found.\n";
-	if(!gen.checkFlow()) std::cerr << "Oops!!!\n";
-	GraphWriter<Graph>("circulation-output.lgf", g).
-	  writeEdgeMap("lo_cap", lo).
-	  writeEdgeMap("up_cap", up).
-	  writeEdgeMap("flow", gen.flowMap()).
-	  writeNodeMap("delta", delta).
-	  writeEdgeMap("label", eid).
-	  writeNodeMap("label", nid).
-	  writeNodeMap("coordinates_x", cx).
-	  writeNodeMap("coordinates_y", cy).
-	  run();
-      }
-    else {
-      std::cout << "\nThere is no such a flow\n";
-      Graph::NodeMap<int> bar(g);
-      gen.barrierMap(bar);
-      if(!gen.checkBarrier()) std::cerr << "Dual Oops!!!\n";
-
-      GraphWriter<Graph>("circulation-output.lgf", g).
-	writeEdgeMap("lo_cap", lo).
-	writeEdgeMap("up_cap", up).
-	writeNodeMap("barrier", bar).
-	writeNodeMap("delta", delta).
-	writeEdgeMap("label", eid).
-	writeNodeMap("label", nid).
-	writeNodeMap("coordinates_x", cx).
-	writeNodeMap("coordinates_y", cy).
-	run();
-    }
-  std::cout << "The output is written to file 'circulation-output.lgf'\n\n";
-    
-}
Index: demo/coloring.cc
===================================================================
--- demo/coloring.cc	(revision 2553)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Coloring of a graph.
-///
-/// This example shows how can we color the nodes of a planar graph efficiently
-/// with six colors.
-///
-/// \include coloring.cc
-
-#include <vector>
-
-#include <iostream>
-
-#include <lemon/smart_graph.h>
-#include <lemon/bucket_heap.h>
-#include <lemon/graph_reader.h>
-#include <lemon/graph_to_eps.h>
-
-#include <fstream>
-
-
-using namespace std;
-using namespace lemon;
-
-int main() {
-
-  typedef SmartUGraph Graph;
-  typedef Graph::Node Node;
-  typedef Graph::NodeIt NodeIt;
-  typedef Graph::UEdge UEdge;
-  typedef Graph::IncEdgeIt IncEdgeIt;
-
-  std::cout << "Six coloring of a planar graph" << std::endl;
-  std::cout << "Input file: coloring.lgf" << std::endl;
-  std::cout << "Output file: coloring.eps" << std::endl;
-
-  Graph graph;
-
-  UGraphReader<Graph> reader("coloring.lgf", graph);
-  Graph::NodeMap<dim2::Point<double> > coords(graph);
-  reader.readNodeMap("coords", coords);
-  
-  reader.run();
-
-  Graph::NodeMap<int> color(graph, -2);
-  
-  Graph::NodeMap<int> heapMap(graph, -1);
-  BucketHeap<Graph::NodeMap<int> > heap(heapMap);
-  
-  for (NodeIt it(graph); it != INVALID; ++it) {
-    heap.push(it, countOutEdges(graph, it));
-  }
-
-  vector<Node> order;
-
-  while (!heap.empty()) {
-    Node node = heap.top();
-    heap.pop();
-    color[node] = -1;
-    order.push_back(node);
-    for (IncEdgeIt it(graph, node); it != INVALID; ++it) {
-      Node target = graph.runningNode(it); 
-      if (color[target] == -2) {
-	heap.decrease(target, heap[target] - 1);
-      }
-    }
-  }
-
-  for (int i = order.size() - 1; i >= 0; --i) {
-    set<int> forbidden;
-    for (IncEdgeIt it(graph, order[i]); it != INVALID; ++it) {
-      Node target = graph.runningNode(it); 
-      if (color[target] != -1) {
-	forbidden.insert(color[target]);
-      }
-    }
-    int current = 0;
-    while (forbidden.find(current) != forbidden.end()) ++current;
-    color[order[i]] = current;
-  }
-
-  Palette palette;
-
-  graphToEps(graph, "coloring.eps").
-    title("Six Colored Planar Graph").
-    copyright("(C) 2003-2007 LEMON Project").
-    coords(coords).nodeColors(composeMap(palette, color)).
-    nodeScale(5.0).scaleToA4().run();
-
-  return 0;
-}
Index: demo/coloring.lgf
===================================================================
--- demo/coloring.lgf	(revision 1909)
+++ 	(revision )
@@ -1,36 +1,0 @@
-@nodeset 
-coords	label	
-(162, 142)	10	
-(169, -35)	9	
-(-154, -37)	8	
-(-1, 12)	7	
-(-87, -197)	6	
-(360, 54)	5	
-(193, 257)	4	
-(-89, 224)	3	
-(-327, 46)	2	
-(157, -150)	1	
-(-282, -149)	0	
-@uedgeset 
-		label	
-9	10	17	
-1	9	15	
-3	9	14	
-2	8	4	
-6	8	1	
-0	8	0	
-8	7	7	
-0	6	2	
-9	5	16	
-4	5	13	
-1	5	12	
-10	4	18	
-3	4	11	
-10	3	19	
-7	3	10	
-1	3	6	
-2	3	3	
-0	2	5	
-7	1	9	
-6	1	8	
-@end
Index: demo/csp_demo.cc
===================================================================
--- demo/csp_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,80 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Demonstrating the usage of LEMON's algorithm for solving the
-/// Constrained shortest Path Problem 
-///
-/// \include csp_demo.cc
-
-#include <iostream>
-#include <lemon/list_graph.h>
-#include <lemon/csp.h>
-#include <lemon/random.h>
-
-
-using namespace lemon;
-
-
-int main (int, char*[])
-{
-
-    typedef ListGraph Graph;
-    typedef Graph::Node Node;
-    typedef Graph::Edge Edge;
-    typedef Graph::EdgeIt EdgeIt;
-    typedef Graph::EdgeMap<double> LengthMap;
-
-    Graph g;
-
-    const int N=100;
-    const int M=20000;
-    std::vector<Node> nodes;
-    std::vector<Edge> edges;
-    
-    for(int i=0;i<N;i++) nodes.push_back(g.addNode());
-
-    for(int i=0;i<M;i++)
-      edges.push_back(g.addEdge(nodes[rnd[N]],nodes[rnd[N]]));
-    
-    LengthMap cost(g);
-    LengthMap delay(g);
-    for(EdgeIt e(g);e!=INVALID;++e)
-      {
-	cost[e]=0.01+rnd(.99);
-	delay[e]=0.01+rnd(.99);
-      }
-    
-    ConstrainedShortestPath<Graph,LengthMap,LengthMap> csp(g,cost,delay);
-    for(double d=0;d<2;d+=.001)
-      {
-	double lo_bo;
-	std::cout << d << ": ";
-	SimplePath<Graph> r = csp.larac(nodes[0],nodes[1],d,lo_bo);
-	if(r.empty()) std::cout << "INFEASIBLE\n";
-	else std::cout << "delay: " << csp.delay(r)
-		       << " cost: " << csp.cost(r)
-		       << " (lb: " << lo_bo
-		       << " gap: " << csp.cost(r)-lo_bo
-		       << " , " << (csp.cost(r)-lo_bo)/csp.cost(r)*100
-		       << "%)" << std::endl;
-      }
-    			
-    return 0;
-}
Index: demo/descriptor_map_demo.cc
===================================================================
--- demo/descriptor_map_demo.cc	(revision 2569)
+++ 	(revision )
@@ -1,133 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup demos
-/// \file
-/// \brief Using descriptor map and own special map types.
-///
-/// This demo shows how can be used the DescriptorMap class
-/// which helps to use unique label for each node or edge.
-/// And it gives an example how easy is creating own map types.
-///
-/// \include descriptor_map_demo.cc
-
-#include <lemon/list_graph.h>
-#include <lemon/graph_utils.h>
-#include <lemon/graph_writer.h>
-#include <lemon/dim2.h>
-#include <lemon/graph_to_eps.h>
-
-#include <lemon/random.h>
-
-#include <iostream>
-
-#include <lemon/math.h>
-
-
-using namespace lemon;
-
-// Special dim2::Point<double> map type 
-//
-// It gives back a position for each node. The position of the nodes
-// are on the circle with the given center and radius.
-//
-// Because we use the descriptor map it will hold the proprty
-// described above even if a node added or deleted.
-template <typename Graph>
-class CircleMap {
-public:
-
-  typedef dim2::Point<double> Value;
-  typedef typename Graph::Node Key;
-
-  CircleMap(const Graph& _graph, 
-	    const Value& _center = Value(0.0, 0.0), 
-	    double _radius = 1.0) 
-    : descriptor(_graph), center(_center), radius(_radius) {}
-
-  Value operator[](const Key& key) const {
-    double angle = descriptor[key] * 2 * PI 
-      / double(descriptor.inverse().size());
-    double x = std::cos(angle) * radius + center.x;
-    double y = std::sin(angle) * radius + center.y;
-    return Value(x, y);
-  }
-
-private:
-  
-  DescriptorMap<Graph, typename Graph::Node> descriptor;
-  Value center;
-  double radius;
-};
-
-int main() {
-  typedef ListGraph Graph;
-  typedef Graph::Node Node;
-  typedef Graph::Edge Edge;
-  
-  // Generating a graph
-
-  std::cout << "Generating graph: " << std::endl;
-
-  Graph graph;
-  
-  const int NODE = 16;
-  for (int i = 0; i < NODE; ++i) {
-    graph.addNode();
-  } 
-
-  // Creating descriptor map and inverse
-  DescriptorMap<Graph, Node> nodeDesc(graph);
-  DescriptorMap<Graph, Node>::InverseMap nodeInv(nodeDesc);
-
-  // Adding edges
-  // The descriptor map always maps an integer value for each node.
-  // The range of the values is always [0..n - 1] where n is the
-  // number of the nodes of the graph. The inverse map gives back the
-  // the node by its descriptor value. 
-  //
-  // The inversemap cannot works without its DescriptorMap because
-  // it holds reference to it. 
-  const int EDGE = int(NODE * std::log(double(NODE)));
-  for (int i = 0; i < EDGE; ++i) {
-    int si = rnd[NODE];
-    int ti = rnd[NODE];
-      
-    graph.addEdge(nodeInv[si], nodeInv[ti]);
-  }
-
-  GraphWriter<Graph>(std::cout, graph).run();
-
-  std::cout << std::endl;
-  std::cout << "Postscript file: descriptor_map_demo.eps" << std::endl;
-
-  // Make postscript from the graph.
-    
-  CircleMap<Graph> coords(graph, dim2::Point<double>(0.0, 0.0), 10.0);
-    
-  graphToEps(graph,"descriptor_map_demo.eps").scaleToA4().
-    title("Generated graph").
-    copyright("(C) 2003-2007 LEMON Project").
-    coords(coords).
-    nodeScale(1.0).
-    enableParallel().parEdgeDist(1).
-    drawArrows().arrowWidth(1).arrowLength(1).
-    run();
- 
-  return 0;
-}
Index: demo/dijkstra_demo.cc
===================================================================
--- demo/dijkstra_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,106 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Demonstrating the usage of LEMON's Dijkstra algorithm
-///
-/// Dijkstra's algorithm computes shortest paths between two nodes in
-/// a graph with edge lengths. Here we only show some of the
-/// facilities supplied by our implementation: for the detailed
-/// documentation of the LEMON Dijkstra class read \ref lemon::Dijkstra "this".
-///
-/// \include dijkstra_demo.cc
-
-#include <iostream>
-
-#include <lemon/list_graph.h>
-#include <lemon/dijkstra.h>
-
-using namespace lemon;
-
-
-int main (int, char*[])
-{
-
-    typedef ListGraph Graph;
-    typedef Graph::Node Node;
-    typedef Graph::Edge Edge;
-    typedef Graph::EdgeMap<int> LengthMap;
-
-    Graph g;
-
-    //An example from Ahuja's book
-
-    Node s=g.addNode();
-    Node v2=g.addNode();
-    Node v3=g.addNode();
-    Node v4=g.addNode();
-    Node v5=g.addNode();
-    Node t=g.addNode();
-
-    Edge s_v2=g.addEdge(s, v2);
-    Edge s_v3=g.addEdge(s, v3);
-    Edge v2_v4=g.addEdge(v2, v4);
-    Edge v2_v5=g.addEdge(v2, v5);
-    Edge v3_v5=g.addEdge(v3, v5);
-    Edge v4_t=g.addEdge(v4, t);
-    Edge v5_t=g.addEdge(v5, t);
-  
-    LengthMap len(g);
-
-    len.set(s_v2, 10);
-    len.set(s_v3, 10);
-    len.set(v2_v4, 5);
-    len.set(v2_v5, 8);
-    len.set(v3_v5, 5);
-    len.set(v4_t, 8);
-    len.set(v5_t, 8);
-
-    std::cout << "This program is a simple demo of the LEMON Dijkstra class."
-	      << std::endl;
-    std::cout <<
-      "We calculate the shortest path from node s to node t in a graph."
-	      << std::endl;
-    std::cout << std::endl;
-
-
-    std::cout << "The id of s is " << g.id(s)<< ", the id of t is "
-	      << g.id(t) << "." << std::endl;
-
-    std::cout << "Dijkstra algorithm demo..." << std::endl;
-
-    Dijkstra<Graph, LengthMap> dijkstra_test(g,len);
-    
-    dijkstra_test.run(s);
-    
-    std::cout << "The distance of node t from node s: "
-	      << dijkstra_test.dist(t) << std::endl;
-
-    std::cout << "The shortest path from s to t goes through the following "
-	      << "nodes (the first one is t, the last one is s): "
-	      << std::endl;
-
-    for (Node v=t;v != s; v=dijkstra_test.predNode(v)) {
-      std::cout << g.id(v) << "<-";
-    }
-    
-    std::cout << g.id(s) << std::endl;	
-    
-    return 0;
-}
Index: demo/dim_to_dot.cc
===================================================================
--- demo/dim_to_dot.cc	(revision 2553)
+++ 	(revision )
@@ -1,92 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\file
-///\brief Dim (DIMACS) to Dot (Graphviz) converter
-///
-/// This program can convert the DIMACS format to Graphviz format.
-///
-/// <tt>dim_to_dot dimacs_max_flow_file > dot_output_file</tt>
-///
-/// This program makes a dot file from a DIMACS max flow file. 
-/// This program can be an aid in making up to date visualized 
-/// documantation of demo programs.
-///
-/// \include dim_to_dot.cc
-
-#include <iostream>
-#include <fstream>
-
-#include <lemon/smart_graph.h>
-#include <lemon/dimacs.h>
-
-using namespace lemon;
-
-using std::cout;
-using std::endl;
-
-int main(int argc, char *argv[]) 
-{
-  if(argc<2)
-  {
-      std::cerr << "USAGE: dim_to_dot input_file.dim" << std::endl;
-      std::cerr << "The file 'input_file.dim' has to contain a max flow instance in DIMACS format (e.g. sub_graph_adaptor_demo.dim is such a file)." << std::endl;
-      return 0;
-  }
-
-  //input stream to read the graph from
-  std::ifstream is(argv[1]);
-
-  typedef SmartGraph Graph;
-
-  typedef Graph::Edge Edge;
-  typedef Graph::Node Node;
-  typedef Graph::EdgeIt EdgeIt;
-  typedef Graph::NodeIt NodeIt;
-  typedef Graph::EdgeMap<int> LengthMap;
-
-  Graph g;
-  Node s, t;
-  LengthMap length(g);
-
-  readDimacs(is, g, length, s, t);
-
-  cout << "digraph lemon_dot_example {" << endl;
-  cout << "  node [ shape=ellipse, fontname=Helvetica, fontsize=10 ];" << endl;
-  for(NodeIt n(g); n!=INVALID; ++n) {
-    if (n==s) {
-      cout << "  n" << g.id(n) 
-	   << " [ label=\"" << g.id(n) << " (s)\" ]; " << endl;
-    } else {
-      if (n==t) {
-	cout << "  n" << g.id(n) 
-	     << " [ label=\"" << g.id(n) << " (t)\" ]; " << endl; 
-      } else {
-	cout << "  n" << g.id(n) 
-	     << " [ label=\"" << g.id(n) << "\" ]; " << endl; 
-      }
-    }
-  }
-  cout << "  edge [ shape=ellipse, fontname=Helvetica, fontsize=10 ];" << endl;
-  for(EdgeIt e(g); e!=INVALID; ++e) {
-    cout << "  n" << g.id(g.source(e)) << " -> " << " n" << g.id(g.target(e))
-	 << " [ label=\"" << g.id(e) 
-	 << ", length:" << length[e] << "\" ]; " << endl;
-  } 
-  cout << "}" << endl;
-}
Index: demo/dir_components.lgf
===================================================================
--- demo/dir_components.lgf	(revision 1901)
+++ 	(revision )
@@ -1,52 +1,0 @@
-@nodeset 
-coordinates_x	coordinates_y	label	
-218.178	27.2723	19	
-157.79	-130.517	18	
-44.8044	15.5841	17	
--465.576	-42.8564	16	
--675.963	-3.89604	15	
--574.666	-153.893	14	
--490.901	120.777	13	
--368.176	331.163	12	
--266.879	114.933	11	
--251.294	-335.059	10	
--173.374	377.916	9	
-169.478	311.683	8	
-5.84406	175.322	7	
-342.851	111.037	6	
-670.118	-118.829	5	
-364.28	-222.074	4	
--105.193	-261.035	3	
--227.918	-40.9084	2	
--389.604	-136.361	1	
-@edgeset 
-		label	
-17	19	23	
-19	18	24	
-18	17	25	
-3	17	21	
-14	16	18	
-13	16	17	
-16	15	19	
-15	14	20	
-11	13	15	
-13	12	16	
-12	11	14	
-1	10	1	
-11	9	13	
-7	9	12	
-6	8	10	
-8	7	11	
-7	6	9	
-4	6	6	
-6	5	7	
-19	4	22	
-5	4	8	
-3	4	5	
-10	3	2	
-3	2	3	
-2	1	4	
-@nodes 
-@edges 
-@attributes 
-@end
Index: demo/disjoint_paths_demo.cc
===================================================================
--- demo/disjoint_paths_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup demos
-/// \file
-/// \brief Node and edge disjoint paths in directed graph.
-///
-/// This demo program calculates how many edge disjoint and node disjoint
-/// paths are in a directed graph between a source and a target node.
-/// The edge disjoint paths can be computed with a flow algorithm,
-/// in this example we use the Preflow algorithm class. To get the node
-/// disjoint paths we should first adapt the graph with the SplitGraphAdaptor
-/// and just then calculate the flow.  
-///
-/// \include disjoint_paths_demo.cc
-
-#include <iostream>
-
-#include <lemon/smart_graph.h>
-#include <lemon/graph_adaptor.h>
-#include <lemon/graph_reader.h>
-#include <lemon/preflow.h>
-#include <lemon/graph_to_eps.h>
-
-using namespace lemon;
-using namespace std;
-
-Color color(bool b) {
-  return b ? RED : BLACK;
-}
-
-int main() {
-  cout << "This program calculates the number " 
-    "disjoint paths in a graph" << endl;
-  cout << "The graph is read from the disjoint_paths_demo.lgf file" << endl;
-  typedef SmartGraph Graph;
-
-  Graph graph;
-
-  Graph::NodeMap<dim2::Point<double> > coords(graph);
-  Graph::Node source, target;
-  GraphReader<Graph>("disjoint_paths_demo.lgf", graph).
-    readNodeMap("coords", coords).
-    readNode("source", source).readNode("target", target).run();
-
-  typedef ConstMap<Graph::Edge, int> Capacity;
-  Capacity capacity(1);
-
-  Graph::EdgeMap<int> flow(graph);
-
-  Preflow<Graph, Capacity> preflow(graph, capacity, source, target); 
-  
-  preflow.run();
-
-  cout << "Number of edge disjoint paths: " << preflow.flowValue() << endl;
-
-  graphToEps(graph, "edge_disjoint_paths.eps").
-    title("edge disjoint paths").scaleToA4().
-    copyright("(C) 2003-2007 LEMON Project").drawArrows().
-    edgeColors(composeMap(functorMap(color), preflow.flowMap())).
-    coords(coords).run();
-
-
-  cout << "The paths are written into edge_disjoint_paths.eps" << endl;
-
-  typedef SplitGraphAdaptor<SmartGraph> SGraph;
-
-  SGraph sgraph(graph);
-
-  typedef ConstMap<SGraph::Edge, int> SCapacity;
-  SCapacity scapacity(1);
-
-  SGraph::EdgeMap<int> sflow(sgraph);
-
-  Preflow<SGraph, SCapacity> spreflow(sgraph, scapacity, 
-				      SGraph::outNode(source), 
-				      SGraph::inNode(target));
-
-  spreflow.run();
-
-  cout << "Number of node disjoint paths: " << spreflow.flowValue() << endl;
-
-
-  graphToEps(sgraph, "node_disjoint_paths.eps").
-    title("node disjoint paths").scaleToA4().
-    copyright("(C) 2003-2007 LEMON Project").drawArrows().
-    edgeColors(composeMap(functorMap(color), spreflow.flowMap())).
-    coords(SGraph::combinedNodeMap(coords,
-				   shiftMap(coords,
-					    dim2::Point<double>(5, 0)))).
-    run();
-
-  cout << "The paths are written into node_disjoint_paths.eps" << endl;
-  
-  return 0;
-}
Index: demo/disjoint_paths_demo.lgf
===================================================================
--- demo/disjoint_paths_demo.lgf	(revision 2084)
+++ 	(revision )
@@ -1,46 +1,0 @@
-@nodeset 
-coords	label	
-(-20,17)	15	
-(39,13) 	14	
-(39,-11)	13	
-(-12,7)	        12	
-(25,-15)        11	
-(-18,-14)	10	
-(45,3)          9	
-(28,13)         8	
-(25,-5)         7	
-(1,21)          6	
-(3,3)           5	
-(3,-9)          4	
-(-9,15)         3	
-(-13,-4)        2	
-(-27,5)         1	
-@edgeset 
-		label	
-1	15	22	
-8	14	20	
-11	13	18	
-1	12	8	
-4	11	14	
-1	10	1	
-14	9	21	
-13	9	19	
-8	9	17	
-7	9	16	
-11	9	15	
-5	8	12	
-6	8	11	
-5	7	13	
-3	6	4	
-12	5	9	
-2	5	6	
-3	5	5	
-2	4	10	
-10	4	7	
-15	3	23	
-1	3	3	
-1	2	2	
-@nodes
-source 1
-target 9
-@end
Index: demo/eps_demo.cc
===================================================================
--- demo/eps_demo.cc	(revision 2569)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup demos
-/// \file
-/// \brief Demo of the EPS grawing class \ref lemon::EpsDrawer "EpsDrawer".
-///
-/// This demo program shows examples how to use the class \ref
-/// lemon::EpsDrawer "EpsDrawer". It takes no input but simply creates
-/// a file <tt>eps_demo.eps</tt> demonstrating the capability of \ref
-/// lemon::EpsDrawer "EpsDrawer".
-///
-/// \include eps_demo.cc
-
-#include <lemon/math.h>
-#include <lemon/eps.h>
-
-using namespace lemon;
-
-void kosar(EpsDrawer &ed)
-{
-  double d,r;
-  
-  r = sqrt(2);
-  
-  ed.save();
-  
-  ed.translate(256,256).scale(256,256);
-  ed.lineWidth(1/256);
-  
-  ed.collect();
-  
-  ed.moveTo(0,1);
-  
-  for(d=0;d<PI*2*5;d+=.1)
-    {
-      ed.lineTo(sin(d*3),cos(d*5));
-    }
-  
-  ed.stroke();
-  ed.restore();
-  
-}
-
-void fonts(EpsDrawer &ed)
-{
-  ed.save().centerMode(true);
-  
-  ed.font("Helvetica").fontSize(90);
-  ed.moveTo(256,512/3*2+50) << "Helvetica";
-  ed.font("Courier");
-  ed.moveTo(256,512/3+50) << "Courier" ;
-  ed.font("Times-Roman");
-  ed.moveTo(256,50) << "Times-Roman";
-  
-  ed.centerMode(false).restore();
-}
-
-int main()
-{
-
-  EpsDrawer ed("eps_demo.eps",512,512);
-  ed.scale(1,1);
-  
-  ed.color(0,0,0).collect();
-  ed.moveTo(0,0).lineTo(0,512).lineTo(512,512).lineTo(512,0).closePath().fill();
-  
-  ed.lineWidth(4);
-  
-  for(double r=0;r<=256;r+=2)
-    {
-      ed.color(r/256.0,0,1-r/256.0).circle(256,256,r);
-    }
-  
-  
-  ed.save();
-  ed.color(0,0,0);
-  ed.translate(256,256);
-  
-  for(int i=0;i<18;i++)
-    {
-      ed.rotate(20);
-      
-      for(double r=0;r<=256;r+=20)
-	ed.fontSize(r/10+1).rotate(2).moveTo(0,r) << r;
-      ed.rotate(-26);
-      
-    }
-  
-  ed.restore();
-  
-  fonts(ed.color(.7,.7,.7));
-  ed.color(0,1,0);
-
-  ed.node(ed.CIRCLE,128,333,25);
-  ed.node(ed.SQUARE,256,333,25);
-  ed.node(ed.DIAMOND,128+256,333,25);
-
-  kosar(ed);
-}
Index: demo/graph_orientation.cc
===================================================================
--- demo/graph_orientation.cc	(revision 2553)
+++ 	(revision )
@@ -1,120 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <lemon/list_graph.h>
-#include <lemon/graph_reader.h>
-#include <lemon/iterable_maps.h>
-#include <lemon/dim2.h>
-#include <lemon/graph_to_eps.h>
-
-
-using namespace lemon;
- 
-GRAPH_TYPEDEFS(ListGraph);
-
-int main(int argc, char** argv) 
-{
-  if(argc!=2) {
-    std::cerr << "\n  USAGE: " << argv[0]
-	      << " input_file.lgf" << std::endl << std::endl;
-    std::cerr << "  The file 'input_file.lgf' has to contain "
-	      << "at least three node maps called \n  'f', 'coordinates_x' "
-	      << "and 'coordinates_y'.\n"
-	      << "  The in-degree requirement is given by 'f', while the two "
-	      << "others is used\n  to create to output drawing."
-	      << std::endl;
-    return 1;
-  }
-  
-  ListGraph g;
-
-  ListGraph::NodeMap<int> f(g); //in-deg requirement;
-  ListGraph::NodeMap<int> label(g);
-  ListGraph::NodeMap<dim2::Point<double> > coords(g);
-  
-  try {
-    GraphReader<ListGraph> reader(argv[1],g);
-    reader.readNodeMap("f",f);
-    reader.readNodeMap("label",label);
-    reader.readNodeMap("coordinates_x",xMap(coords));
-    reader.readNodeMap("coordinates_y",yMap(coords));
-    reader.run();
-  } catch (DataFormatError& error) {
-    std::cerr << error.what() << std::endl;
-    return 1;
-  }
-
-  
-  ListGraph::NodeMap<int> level(g,0);
-  
-  ListGraph::NodeMap<int> def(g); //deficiency of the nodes
-  def = subMap(f,InDegMap<ListGraph>(g));
-  
-  IterableBoolMap<ListGraph, Node> active(g,false);
-  for(NodeIt n(g);n!=INVALID;++n) active[n]=(def[n]>0);
-  
-  ListGraph::EdgeMap<bool> rev(g,false); // rev[e]==true <=> e is to be 
-                                         //                  reversed
-
-  int nodeNum=countNodes(g);
-  
-  Node act;
-  while((act=IterableBoolMap<ListGraph, Node>::TrueIt(active))!=INVALID) {
-    std::cout << "Process node " << label[act]
-	      << " (def=" << def[act]
-	      << " lev=" << level[act] << "): ";
-    OutEdgeIt e(g,act);
-    while(e!=INVALID && level[g.target(e)]>=level[act]) ++e;
-    if(e!=INVALID) {
-      std::cout << " REVERT EDGE " << g.id(e)
-		<< " (" << label[g.source(e)] << "---"
-		<< label[g.target(e)] << ")"
-		<< std::endl;
-      if(--def[act]==0) active[act]=false;
-      if(++def[g.target(e)]>0) active[g.target(e)]=true;
-      g.reverseEdge(e);
-      rev[e]=!rev[e];
-    }
-    else {
-      std::cout << " LIFT" << std::endl;
-      if(++level[act]>nodeNum) {
-	std::cout << "NINCS ILYEN\n";
-	return 1;
-      }
-    }
-  }
-  
-  //Show the graph
-
-  graphToEps(g,"graph_orientation.eps").scaleToA4().
-    title("Sample .eps figure (fits to A4)").
-    copyright("(C) 2003-2007 LEMON Project").
-    absoluteNodeSizes().absoluteEdgeWidths().
-    nodeScale(15).
-    coords(coords).
-    negateY().
-    edgeColors(composeMap(Palette(),rev)).
-    edgeWidthScale(1).
-    nodeTexts(f).nodeTextSize(20).
-    drawArrows().arrowWidth(10).arrowLength(10).
-    run();
-
-  
-} //end of main()
-
-
Index: demo/graph_orientation.lgf
===================================================================
--- demo/graph_orientation.lgf	(revision 1901)
+++ 	(revision )
@@ -1,27 +1,0 @@
-@nodeset 
-coordinates_x	coordinates_y	f	label	
--198	-73	2	7	
-120	30	4	6	
--17	222	1	5	
-328	147	1	4	
-247	-179	0	3	
--28	-93	1	2	
--131	83	3	1	
-@edgeset 
-		label	
-7	6	3	
-1	6	2	
-2	6	1	
-4	5	10	
-6	5	6	
-3	4	9	
-6	4	7	
-2	3	12	
-6	3	8	
-7	2	4	
-5	1	11	
-7	1	5	
-@nodes 
-@edges 
-@attributes 
-@end
Index: demo/graph_to_eps_demo.cc
===================================================================
--- demo/graph_to_eps_demo.cc	(revision 2569)
+++ 	(revision )
@@ -1,208 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup demos
-/// \file
-/// \brief Demo of the graph grawing function \ref graphToEps()
-///
-/// This demo program shows examples how to  use the function \ref
-/// graphToEps(). It takes no input but simply creates  six
-/// <tt>.eps</tt> files demonstrating the capability of \ref
-/// graphToEps(), and showing how to draw directed/undirected graphs,
-/// how to handle parallel egdes, how to change the properties (like
-/// color, shape, size, title etc.) of nodes and edges individually
-/// using appropriate \ref maps-page "graph maps".
-///
-/// \include graph_to_eps_demo.cc
-
-#include <lemon/math.h>
-
-#include<lemon/graph_to_eps.h>
-#include<lemon/list_graph.h>
-#include<lemon/graph_utils.h>
-
-using namespace std;
-using namespace lemon;
-
-int main()
-{
-  Palette palette;
-  Palette paletteW(true);
-
-  ListGraph g;
-  typedef ListGraph::Node Node;
-  typedef ListGraph::NodeIt NodeIt;
-  typedef ListGraph::Edge Edge;
-  typedef dim2::Point<int> Point;
-  
-  Node n1=g.addNode();
-  Node n2=g.addNode();
-  Node n3=g.addNode();
-  Node n4=g.addNode();
-  Node n5=g.addNode();
-
-  ListGraph::NodeMap<Point> coords(g);
-  ListGraph::NodeMap<double> sizes(g);
-  ListGraph::NodeMap<int> colors(g);
-  ListGraph::NodeMap<int> shapes(g);
-  ListGraph::EdgeMap<int> ecolors(g);
-  ListGraph::EdgeMap<int> widths(g);
-  
-  coords[n1]=Point(50,50);  sizes[n1]=1; colors[n1]=1; shapes[n1]=0;
-  coords[n2]=Point(50,70);  sizes[n2]=2; colors[n2]=2; shapes[n2]=2;
-  coords[n3]=Point(70,70);  sizes[n3]=1; colors[n3]=3; shapes[n3]=0;
-  coords[n4]=Point(70,50);  sizes[n4]=2; colors[n4]=4; shapes[n4]=1;
-  coords[n5]=Point(85,60);  sizes[n5]=3; colors[n5]=5; shapes[n5]=2;
-  
-  Edge e;
-
-  e=g.addEdge(n1,n2); ecolors[e]=0; widths[e]=1;
-  e=g.addEdge(n2,n3); ecolors[e]=0; widths[e]=1;
-  e=g.addEdge(n3,n5); ecolors[e]=0; widths[e]=3;
-  e=g.addEdge(n5,n4); ecolors[e]=0; widths[e]=1;
-  e=g.addEdge(n4,n1); ecolors[e]=0; widths[e]=1;
-  e=g.addEdge(n2,n4); ecolors[e]=1; widths[e]=2;
-  e=g.addEdge(n3,n4); ecolors[e]=2; widths[e]=1;
-  
-  IdMap<ListGraph,Node> id(g);
-
-  cout << "Create 'graph_to_eps_demo_out_pure.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_pure.eps").
-    //scale(10).
-    coords(coords).
-    title("Sample .eps figure").
-    copyright("(C) 2003-2007 LEMON Project").
-    run();
-
-  cout << "Create 'graph_to_eps_demo_out.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out.eps").
-    //scale(10).
-    coords(coords).
-    title("Sample .eps figure").
-    copyright("(C) 2003-2007 LEMON Project").
-    absoluteNodeSizes().absoluteEdgeWidths().
-    nodeScale(2).nodeSizes(sizes).
-    nodeShapes(shapes).
-    nodeColors(composeMap(palette,colors)).
-    edgeColors(composeMap(palette,ecolors)).
-    edgeWidthScale(.4).edgeWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    run();
-
-
-  cout << "Create 'graph_to_eps_demo_out_arr.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_arr.eps").
-    //scale(10).
-    title("Sample .eps figure (with arrowheads)").
-    copyright("(C) 2003-2007 LEMON Project").
-    absoluteNodeSizes().absoluteEdgeWidths().
-    nodeColors(composeMap(palette,colors)).
-    coords(coords).
-    nodeScale(2).nodeSizes(sizes).
-    nodeShapes(shapes).
-    edgeColors(composeMap(palette,ecolors)).
-    edgeWidthScale(.4).edgeWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    drawArrows().arrowWidth(1).arrowLength(1).
-    run();
-
-  e=g.addEdge(n1,n4); ecolors[e]=2; widths[e]=1;
-  e=g.addEdge(n4,n1); ecolors[e]=1; widths[e]=2;
-
-  e=g.addEdge(n1,n2); ecolors[e]=1; widths[e]=1;
-  e=g.addEdge(n1,n2); ecolors[e]=2; widths[e]=1;
-  e=g.addEdge(n1,n2); ecolors[e]=3; widths[e]=1;
-  e=g.addEdge(n1,n2); ecolors[e]=4; widths[e]=1;
-  e=g.addEdge(n1,n2); ecolors[e]=5; widths[e]=1;
-  e=g.addEdge(n1,n2); ecolors[e]=6; widths[e]=1;
-  e=g.addEdge(n1,n2); ecolors[e]=7; widths[e]=1;
-
-  cout << "Create 'graph_to_eps_demo_out_par.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_par.eps").
-    //scale(10).
-    title("Sample .eps figure (parallel edges)").
-    copyright("(C) 2003-2007 LEMON Project").
-    absoluteNodeSizes().absoluteEdgeWidths().
-    nodeShapes(shapes).
-    coords(coords).
-    nodeScale(2).nodeSizes(sizes).
-    nodeColors(composeMap(palette,colors)).
-    edgeColors(composeMap(palette,ecolors)).
-    edgeWidthScale(.4).edgeWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    enableParallel().parEdgeDist(1.5).
-    run();
-  
-  cout << "Create 'graph_to_eps_demo_out_par_arr.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_par_arr.eps").
-    //scale(10).
-    title("Sample .eps figure (parallel edges and arrowheads)").
-    copyright("(C) 2003-2007 LEMON Project").
-    absoluteNodeSizes().absoluteEdgeWidths().
-    nodeScale(2).nodeSizes(sizes).
-    coords(coords).
-    nodeShapes(shapes).
-    nodeColors(composeMap(palette,colors)).
-    edgeColors(composeMap(palette,ecolors)).
-    edgeWidthScale(.3).edgeWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    enableParallel().parEdgeDist(1).
-    drawArrows().arrowWidth(1).arrowLength(1).
-    run();
-
-  cout << "Create 'graph_to_eps_demo_out_a4.eps'" << endl;
-  graphToEps(g,"graph_to_eps_demo_out_a4.eps").scaleToA4().
-    title("Sample .eps figure (fits to A4)").
-    copyright("(C) 2003-2007 LEMON Project").
-    absoluteNodeSizes().absoluteEdgeWidths().
-    nodeScale(2).nodeSizes(sizes).
-    coords(coords).
-    nodeShapes(shapes).
-    nodeColors(composeMap(palette,colors)).
-    edgeColors(composeMap(palette,ecolors)).
-    edgeWidthScale(.3).edgeWidths(widths).
-    nodeTexts(id).nodeTextSize(3).
-    enableParallel().parEdgeDist(1).
-    drawArrows().arrowWidth(1).arrowLength(1).
-    run();
-
-  ListGraph h;
-  ListGraph::NodeMap<int> hcolors(h);
-  ListGraph::NodeMap<Point> hcoords(h);
-  
-  int cols=int(sqrt(double(palette.size())));
-  for(int i=0;i<int(paletteW.size());i++) {
-    Node n=h.addNode();
-    hcoords[n]=Point(i%cols,i/cols);
-    hcolors[n]=i;
-  }
-  
-  cout << "Create 'graph_to_eps_demo_out_colors.eps'" << endl;
-  graphToEps(h,"graph_to_eps_demo_out_colors.eps").
-    //scale(60).
-    title("Sample .eps figure (Palette demo)").
-    copyright("(C) 2003-2007 LEMON Project").
-    coords(hcoords).
-    absoluteNodeSizes().absoluteEdgeWidths().
-    nodeScale(45).
-    distantColorNodeTexts().
-    //    distantBWNodeTexts().
-    nodeTexts(hcolors).nodeTextSize(.6).
-    nodeColors(composeMap(paletteW,hcolors)).
-    run();
-}
Index: demo/grid_ugraph_demo.cc
===================================================================
--- demo/grid_ugraph_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,102 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <lemon/grid_ugraph.h>
-#include <lemon/graph_adaptor.h>
-#include <lemon/graph_to_eps.h>
-#include <lemon/bfs.h>
-#include <lemon/dim2.h>
-
-#include <iostream>
-#include <fstream>
-
-///\ingroup demos
-///\file
-///\brief Labirinth example with grid ugraph.
-///
-///  Labirinth example with grid ugraph.
-///
-/// The input file is:
-///
-/// \include grid_ugraph_demo.in
-///
-/// The result:
-///
-/// \image html grid_ugraph_demo.png
-/// \image latex grid_ugraph_demo.eps "The labirinth" width=\textwidth
-///
-/// The source:
-///
-/// \include grid_ugraph_demo.cc
-
-using namespace lemon;
-using namespace std;
-
-int main() {
-  ifstream in("grid_ugraph_demo.in");
-  int width, height;
-  in >> width >> height;
-  int start_x, start_y;
-  in >> start_x >> start_y;
-  int stop_x, stop_y;
-  in >> stop_x >> stop_y;
-
-  GridUGraph ugraph(width, height);
-  GridUGraph::Node start = ugraph(start_x - 1, start_y - 1);
-  GridUGraph::Node stop = ugraph(stop_x - 1, stop_y - 1);
-  GridUGraph::NodeMap<bool> filter(ugraph);
-
-  for (int j = 0; j < height; ++j) {
-    in >> ws;
-    for (int i = 0; i < width; ++i) {
-      char c; in >> c;
-      filter[ugraph(i, j)] = (c == '.');
-    }
-  }
-
-  typedef NodeSubGraphAdaptor<GridUGraph,
-    GridUGraph::NodeMap<bool> > FilteredGraph;
-
-  FilteredGraph filtered(ugraph, filter);
-
-  Bfs<FilteredGraph> bfs(filtered);
-  std::cout << "The length of shortest path: " << 
-    bfs.run(start, stop) << std::endl;
-
-  FilteredGraph::EdgeMap<bool> path(filtered, false);
-  
-  for (GridUGraph::Node node = stop; 
-       node != start; node = bfs.predNode(node)) {
-    path[bfs.predEdge(node)] = true;
-  }
-  
-  graphToEps(filtered, "grid_ugraph_demo.eps").scaleToA4().
-    title("Grid ugraph").
-    copyright("(C) 2003-2007 LEMON Project").
-    coords(scaleMap(indexMap(ugraph), 10)).
-    enableParallel().
-    nodeScale(0.5).
-    drawArrows().
-    edgeColors(composeMap(Palette(), path)).
-    run();
-  
-  std::cout << "The shortest path is written to grid_ugraph_demo.eps" 
-	    << std::endl;
-
-  return 0;
-}
Index: demo/grid_ugraph_demo.in
===================================================================
--- demo/grid_ugraph_demo.in	(revision 1979)
+++ 	(revision )
@@ -1,10 +1,0 @@
-10 8
-1 1 10 8
-..X....X.X
-.XX.X.XX..
-....X..XX.
-XXXXXX.X..
-.........X
-.X.XXXXXXX
-.X...XX...
-.X.X....X.
Index: demo/hello_lemon.cc
===================================================================
--- demo/hello_lemon.cc	(revision 2553)
+++ 	(revision )
@@ -1,93 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief LEMON style "Hello World!" program
-///
-/// This program is intended to be a "Hello World!" program that shows
-/// the very basic notions of the LEMON library: \ref graphs "graphs" and
-/// \ref maps-page "maps". Click on the links to read more about these.
-///
-/// \include hello_lemon.cc
-
-#include <iostream>
-#include <lemon/list_graph.h>
-
-int main()
-{
-  typedef lemon::ListGraph Graph;
-  typedef Graph::EdgeIt EdgeIt;
-  typedef Graph::Edge Edge;
-  typedef Graph::NodeIt NodeIt;
-  typedef Graph::Node Node;
-  typedef Graph::EdgeMap<int> LengthMap;
-  using lemon::INVALID;
-
-  Graph g;
-  
-  Node s=g.addNode();
-  Node v2=g.addNode();
-  Node v3=g.addNode();
-  Node v4=g.addNode();
-  Node v5=g.addNode();
-  Node t=g.addNode();
-
-  Edge s_v2=g.addEdge(s, v2);
-  Edge s_v3=g.addEdge(s, v3);
-  Edge v2_v4=g.addEdge(v2, v4);
-  Edge v2_v5=g.addEdge(v2, v5);
-  Edge v3_v5=g.addEdge(v3, v5);
-  Edge v4_t=g.addEdge(v4, t);
-  Edge v5_t=g.addEdge(v5, t);
-  
-  LengthMap length(g);
-
-  length[s_v2]=10;
-  length[s_v3]=10;
-  length[v2_v4]=5;
-  length[v2_v5]=8;
-  length[v3_v5]=5;
-  length[v4_t]=8;
-  length[v5_t]=8;
-
-  std::cout << "Hello World!" << std::endl;
-  std::cout <<  std::endl;
-  std::cout << "This is library LEMON here! We have a graph!" << std::endl;
-  std::cout <<  std::endl;
-
-  std::cout << "Nodes:";
-  for (NodeIt i(g); i!=INVALID; ++i)
-    std::cout << " " << g.id(i);
-  std::cout << std::endl;
-
-  std::cout << "Edges:";
-  for (EdgeIt i(g); i!=INVALID; ++i)
-    std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
-  std::cout << std::endl;
-  std::cout <<  std::endl;
-
-  std::cout << "There is a map on the edges (length)!" << std::endl;
-  std::cout <<  std::endl;
-  for (EdgeIt i(g); i!=INVALID; ++i)
-    std::cout << "length(" << g.id(g.source(i)) << ","
-	      << g.id(g.target(i)) << ")="<<length[i]<<std::endl;
-
-  std::cout << std::endl;
-
-}
Index: demo/hello_world.cc
===================================================================
--- demo/hello_world.cc	(revision 2553)
+++ 	(revision )
@@ -1,125 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief LEMON style "Hello World!" program
-///
-/// This program is intended to be a "Hello World!" program that shows
-/// the very basic notions of the LEMON library: \ref graphs "graphs" and
-/// \ref maps-page "maps". Click on the links to read more about these.
-///
-/// \include hello_world.cc
-
-#include <iostream>
-#include <lemon/list_graph.h>
-
-using namespace lemon;
-
-typedef ListGraph::Node  Node;
-typedef ListGraph::Edge  Edge;
-
-
-int main()
-{
-  // Declare the graph itself and a NodeMap, witch will store the characters
-  // assigned to the nodes
-  ListGraph  graph;
-  ListGraph::NodeMap<char>  char_map(graph);
-
-  // Add nodes
-  Node  new_node = graph.addNode();
-  char_map[new_node] = 'H';
-
-  // Store the start node
-  Node  start_node = new_node;
-
-  Node  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'e';
-
-  // Here we add the first edge...
-  graph.addEdge( from_node, new_node );
-
-  // ... and we add some more nodes and edges to the graph
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'l';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'l';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'o';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = ' ';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'W';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'o';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'r';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'l';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = 'd';
-  graph.addEdge( from_node, new_node );
-
-  from_node = new_node;
-  new_node = graph.addNode();
-  char_map[new_node] = '\n';
-  graph.addEdge( from_node, new_node );
-
-
-  // iterating
-  Node  current_node = start_node;
-  while( current_node != INVALID )
-  {
-    std::cout << char_map[current_node] << std::flush;
-
-    ListGraph::OutEdgeIt  edge(graph, current_node);
-    if( edge != INVALID )
-      current_node = graph.target( edge );
-    else
-      current_node = INVALID;
-  }
-  
-  return 0;
-}
Index: demo/kruskal_demo.cc
===================================================================
--- demo/kruskal_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,134 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Minimum weight spanning tree by Kruskal algorithm (demo).
-///
-/// This demo program shows how to find a minimum weight spanning tree
-/// in a graph by using the Kruskal algorithm. 
-///
-/// \include kruskal_demo.cc
-
-#include <iostream>
-#include <vector>
-
-#include <lemon/maps.h>
-#include <lemon/kruskal.h>
-#include <lemon/list_graph.h>
-
-
-using namespace std;
-using namespace lemon;
-
-
-int main() {
-
-  typedef ListGraph::Node Node;
-  typedef ListGraph::Edge Edge;
-  typedef ListGraph::NodeIt NodeIt;
-  typedef ListGraph::EdgeIt EdgeIt;
-
-  ListGraph g;
-  //Make an example graph g.
-  Node s=g.addNode();
-  Node v1=g.addNode();
-  Node v2=g.addNode();
-  Node v3=g.addNode();
-  Node v4=g.addNode();
-  Node t=g.addNode();
-  
-  Edge e1 = g.addEdge(s, v1);
-  Edge e2 = g.addEdge(s, v2);
-  Edge e3 = g.addEdge(v1, v2);
-  Edge e4 = g.addEdge(v2, v1);
-  Edge e5 = g.addEdge(v1, v3);
-  Edge e6 = g.addEdge(v3, v2);
-  Edge e7 = g.addEdge(v2, v4);
-  Edge e8 = g.addEdge(v4, v3);
-  Edge e9 = g.addEdge(v3, t);
-  Edge e10 = g.addEdge(v4, t);
-
-  //Make the input for the kruskal.
-  typedef ListGraph::EdgeMap<int> ECostMap;
-  ECostMap edge_cost_map(g);
-
-  // Fill the edge_cost_map. 
-  edge_cost_map.set(e1, -10);
-  edge_cost_map.set(e2, -9);
-  edge_cost_map.set(e3, -8);
-  edge_cost_map.set(e4, -7);
-  edge_cost_map.set(e5, -6);
-  edge_cost_map.set(e6, -5);
-  edge_cost_map.set(e7, -4);
-  edge_cost_map.set(e8, -3);
-  edge_cost_map.set(e9, -2);
-  edge_cost_map.set(e10, -1);
-
-  // Make the map or the vector, which will contain the edges of the minimum
-  // spanning tree.
-
-  typedef ListGraph::EdgeMap<bool> EBoolMap;
-  EBoolMap tree_map(g);
-
-  vector<Edge> tree_edge_vec;
-
-
-  //Kruskal Algorithm.  
-
-  //Input: a graph (g); a costmap of the graph (edge_cost_map); a
-  //boolmap (tree_map) or a vector (tree_edge_vec) to store the edges
-  //of the output tree;
-
-  //Output: it gives back the value of the minimum spanning tree, and
-  //set true for the edges of the tree in the edgemap tree_map or
-  //store the edges of the tree in the vector tree_edge_vec;
-
-
-  // Kruskal with boolmap;
-  std::cout << "The weight of the minimum spanning tree is " << 
-    kruskal(g, edge_cost_map, tree_map)<<std::endl;
-
-  int k=0;
-  std::cout << "The edges of the tree:" ;
-  for(EdgeIt i(g); i!=INVALID; ++i)
-    if (tree_map[i]) { 
-      std::cout << g.id(i) <<";";
-      ++k;
-    }
-
-  std::cout << std::endl;
-  std::cout << "The size of the tree is: "<< k << std::endl;
-
-
-  // Kruskal with vector;
-  std::cout << "The weight of the minimum spanning tree again is " << 
-    kruskal(g, edge_cost_map, std::back_inserter(tree_edge_vec)) <<std::endl;
-
-
-
-  std::cout << "The edges of the tree again: " ;
-  for(int i=tree_edge_vec.size()-1; i>=0;  i--)
-    std::cout << g.id(tree_edge_vec[i]) << ";" ;
-  std::cout << std::endl;
-  std::cout << "The size of the tree again is: "<< tree_edge_vec.size()
-	    << std::endl; 
-
-  
-  return 0;
-}
Index: demo/lp_demo.cc
===================================================================
--- demo/lp_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,131 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup demos
-/// \file
-/// \brief A program demonstrating the LEMON LP solver interface
-///
-/// This program is a simple application of the LEMON LP solver
-/// interface: we formulate a linear programming (LP) problem and then
-/// solve it using the underlying solver (GLPK or CPLEX for
-/// example). For the detailed documentation of the LEMON LP solver
-/// interface read \ref lemon::LpSolverBase "this".
-///
-/// \include lp_demo.cc
-
-#include <lemon/lp.h>
-
-#include <iostream>
-
-using namespace lemon;
-
-int main()
-{     
- //The following example is taken from the documentation of the GLPK library.
- //See it in the GLPK reference manual and among the GLPK sample files (sample.c)
-
-  //A default solver is taken
-  Lp lp;
-  typedef Lp::Row Row;
-  typedef Lp::Col Col;
-  
-
-  std::cout<<"A program demonstrating the LEMON LP solver interface"<<std::endl; 
-  std::cout<<"Solver used: "<<default_solver_name<<std::endl;
-
-  //This will be a maximization
-  lp.max();
-
-  //We add coloumns (variables) to our problem
-  Col x1 = lp.addCol();
-  Col x2 = lp.addCol();
-  Col x3 = lp.addCol();
-
-  //Constraints
-  lp.addRow(x1+x2+x3 <=100);  
-  lp.addRow(10*x1+4*x2+5*x3<=600);  
-  lp.addRow(2*x1+2*x2+6*x3<=300);  
-  //Nonnegativity of the variables
-  lp.colLowerBound(x1, 0);
-  lp.colLowerBound(x2, 0);
-  lp.colLowerBound(x3, 0);
-  //Objective function
-  lp.obj(10*x1+6*x2+4*x3);
-  
-  //Call the routine of the underlying LP solver
-  lp.solve();
-
-  //Print results
-  if (lp.primalStatus()==LpSolverBase::OPTIMAL){
-    std::cout<<"Optimal solution found!"<<std::endl;
-    printf("optimum value = %g; x1 = %g; x2 = %g; x3 = %g\n", 
-	   lp.primalValue(), 
-	   lp.primal(x1), lp.primal(x2), lp.primal(x3));
-  }
-  else{
-    std::cout<<"Optimal solution not found!"<<std::endl;
-  }
-
-  //End of LEMON style code
-
-  //Here comes the same problem written in C using GLPK API routines
-
-//   LPX *lp;
-//       int ia[1+1000], ja[1+1000];
-//       double ar[1+1000], Z, x1, x2, x3;
-// s1:   lp = lpx_create_prob();
-// s2:   lpx_set_prob_name(lp, "sample");
-// s3:   lpx_set_obj_dir(lp, LPX_MAX);
-// s4:   lpx_add_rows(lp, 3);
-// s5:   lpx_set_row_name(lp, 1, "p");
-// s6:   lpx_set_row_bnds(lp, 1, LPX_UP, 0.0, 100.0);
-// s7:   lpx_set_row_name(lp, 2, "q");
-// s8:   lpx_set_row_bnds(lp, 2, LPX_UP, 0.0, 600.0);
-// s9:   lpx_set_row_name(lp, 3, "r");
-// s10:  lpx_set_row_bnds(lp, 3, LPX_UP, 0.0, 300.0);
-// s11:  lpx_add_cols(lp, 3);
-// s12:  lpx_set_col_name(lp, 1, "x1");
-// s13:  lpx_set_col_bnds(lp, 1, LPX_LO, 0.0, 0.0);
-// s14:  lpx_set_obj_coef(lp, 1, 10.0);
-// s15:  lpx_set_col_name(lp, 2, "x2");
-// s16:  lpx_set_col_bnds(lp, 2, LPX_LO, 0.0, 0.0);
-// s17:  lpx_set_obj_coef(lp, 2, 6.0);
-// s18:  lpx_set_col_name(lp, 3, "x3");
-// s19:  lpx_set_col_bnds(lp, 3, LPX_LO, 0.0, 0.0);
-// s20:  lpx_set_obj_coef(lp, 3, 4.0);
-// s21:  ia[1] = 1, ja[1] = 1, ar[1] =  1.0; /* a[1,1] =  1 */
-// s22:  ia[2] = 1, ja[2] = 2, ar[2] =  1.0; /* a[1,2] =  1 */
-// s23:  ia[3] = 1, ja[3] = 3, ar[3] =  1.0; /* a[1,3] =  1 */
-// s24:  ia[4] = 2, ja[4] = 1, ar[4] = 10.0; /* a[2,1] = 10 */
-// s25:  ia[5] = 3, ja[5] = 1, ar[5] =  2.0; /* a[3,1] =  2 */
-// s26:  ia[6] = 2, ja[6] = 2, ar[6] =  4.0; /* a[2,2] =  4 */
-// s27:  ia[7] = 3, ja[7] = 2, ar[7] =  2.0; /* a[3,2] =  2 */
-// s28:  ia[8] = 2, ja[8] = 3, ar[8] =  5.0; /* a[2,3] =  5 */
-// s29:  ia[9] = 3, ja[9] = 3, ar[9] =  6.0; /* a[3,3] =  6 */
-// s30:  lpx_load_matrix(lp, 9, ia, ja, ar);
-// s31:  lpx_simplex(lp);
-// s32:  Z = lpx_get_obj_val(lp);
-// s33:  x1 = lpx_get_col_prim(lp, 1);
-// s34:  x2 = lpx_get_col_prim(lp, 2);
-// s35:  x3 = lpx_get_col_prim(lp, 3);
-// s36:  printf("\nZ = %g; x1 = %g; x2 = %g; x3 = %g\n", Z, x1, x2, x3);
-// s37:  lpx_delete_prob(lp);
-//       return 0;
-
-  return 0;
-}
Index: demo/lp_maxflow_demo.cc
===================================================================
--- demo/lp_maxflow_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,125 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Max flow problem solved with an LP solver (demo).
-///
-/// This demo program shows how to solve a maximum (or maximal) flow
-/// problem using the LEMON LP solver interface. We would like to lay
-/// the emphasis on the simplicity of the way one can formulate LP
-/// constraints that arise in graph theory in our library LEMON .
-///
-/// \include lp_maxflow_demo.cc
-
-#include<lemon/graph_reader.h>
-#include<lemon/list_graph.h>
-#include <lemon/lp.h>
-
-#include <fstream>
-#include <iostream>
-
-
-
-using namespace lemon;
-
-template<class G,class C>
-double maxFlow(const G &g,const C &cap,typename G::Node s,typename G::Node t)
-{
-  Lp lp;
-  
-  typedef G Graph;
-  typedef typename G::Node Node;
-  typedef typename G::NodeIt NodeIt;
-  typedef typename G::Edge Edge;
-  typedef typename G::EdgeIt EdgeIt;
-  typedef typename G::OutEdgeIt OutEdgeIt;
-  typedef typename G::InEdgeIt InEdgeIt;
-  
-  //Define a map on the edges for the variables of the LP problem
-  typename G::template EdgeMap<Lp::Col> x(g);
-  lp.addColSet(x);
-  
-  //Nonnegativity and capacity constraints
-  for(EdgeIt e(g);e!=INVALID;++e) {
-    lp.colUpperBound(x[e],cap[e]);
-    lp.colLowerBound(x[e],0);
-  }
-
-
-  //Flow conservation constraints for the nodes (except for 's' and 't')
-  for(NodeIt n(g);n!=INVALID;++n) if(n!=s&&n!=t) {
-    Lp::Expr ex;
-    for(InEdgeIt  e(g,n);e!=INVALID;++e) ex+=x[e];
-    for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e];
-    lp.addRow(ex==0);
-  }
-  
-  //Objective function: the flow value entering 't'
-  Lp::Expr obj;
-  for(InEdgeIt  e(g,t);e!=INVALID;++e) obj+=x[e];
-  for(OutEdgeIt e(g,t);e!=INVALID;++e) obj-=x[e];
-  lp.obj(obj);
-
-
-  //Maximization
-  lp.max();
-
-#if DEFAULT_LP==GLPK
-  lp.presolver(true);
-  lp.messageLevel(3);
-#endif
-
-  std::cout<<"Solver used: "<<default_solver_name<<std::endl;
-
-  //Solve with the underlying solver
-  lp.solve();
-
-  return lp.primalValue();
-}
-
-int main(int argc, char *argv[]) 
-{
-  if(argc<2)
-  {
-      std::cerr << "  USAGE: lp_maxflow_demo input_file.lgf" << std::endl;
-      std::cerr << "  The file 'input_file.lgf' has to contain a max "
-		<< "flow instance in\n"
-		<< "  LEMON format (e.g. sample.lgf is such a file)."
-		<< std::endl;
-      return 0;
-  }
-
-
-  //input stream to read the graph from
-  std::ifstream is(argv[1]);
-
-
-  ListGraph g;
-  ListGraph::Node s;
-  ListGraph::Node t;
-  
-  ListGraph::EdgeMap<double> cap(g);
-  
-  GraphReader<ListGraph> reader(is,g);
-  reader.readNode("source",s).readNode("target",t)
-    .readEdgeMap("capacity",cap).run();
-  
-  std::cout << "Max flow value = " << maxFlow(g,cap,s,t) << std::endl;
-
-}
Index: demo/maps_summary.cc
===================================================================
--- demo/maps_summary.cc	(revision 2553)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief An introduction to LEMON maps
-///
-/// \include maps_summary.cc
-
-#include <iostream>
-#include <lemon/list_graph.h>
-
-using namespace lemon;
-
-
-template < typename GRAPH, typename MAP >
-typename MAP::Value  summary( GRAPH& gr, MAP& m )
-{
-  typename MAP::Value  summ = typename MAP::Value();
-  
-  for( typename GRAPH::NodeIt  n(gr); n != lemon::INVALID; ++n )
-    summ += m[n];
-
-  return summ;
-}
-
-
-int  main()
-{
-  ListGraph  gr;
-  ListGraph::NodeMap<double>  value(gr, 0.0);
-
-  //TODO: build a graph  
-  
-  std::cout << "The summary of assigned values is " << summary(gr,value) << std::endl;
-
-  return 0;
-}
Index: demo/min_route.cc
===================================================================
--- demo/min_route.cc	(revision 2569)
+++ 	(revision )
@@ -1,140 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <iostream>
-#include <fstream>
-
-#include <lemon/smart_graph.h>
-#include <lemon/dijkstra.h>
-#include <lemon/maps.h>
-#include <lemon/dim2.h>
-#include <lemon/graph_reader.h>
-
-#include <lemon/time_measure.h>
-
-#include <lemon/math.h>
-
-/// \ingroup demos
-/// \file
-/// \brief Minimal route on a planar graph with eucledian distances.
-///
-/// Minimal route on a planar graph with eucledian distances.
-///
-/// \include min_route.cc
-
-
-using namespace lemon;
-
-template <typename CoordMap>
-class PotentialMap {
-public:
-  typedef double Value;
-  typedef typename CoordMap::Key Key;
-
-  PotentialMap(const CoordMap& _coord, const dim2::Point<double>& _target)
-    : coord(_coord), target(_target) {}
-
-  double operator[](const Key& node) const {
-    return std::sqrt((coord[node].x - target.x) * (coord[node].x - target.x) + 
-		     (coord[node].y - target.y) * (coord[node].y - target.y));
-  }
-private:
-  const CoordMap& coord;
-  dim2::Point<double> target;
-};
-
-template <typename Graph, typename LengthMap, typename PotentialMap>
-class ReducedLengthMap {
-public:
-  typedef double Value;
-  typedef typename LengthMap::Key Key;
-
-  ReducedLengthMap(const Graph& _graph, const LengthMap& _length, 
-		   const PotentialMap& _pot) 
-    : graph(_graph), length(_length), pot(_pot) {}
-
-  Value operator[](const Key& edge) const {
-    return length[edge] - (pot[graph.source(edge)] - pot[graph.target(edge)]);
-  }
-
-private:
-  const Graph& graph;
-  const LengthMap& length;
-  const PotentialMap& pot;
-};
-
-int main() {
-  typedef SmartGraph Graph;
-
-  typedef Graph::Edge Edge;
-  typedef Graph::Node Node;
-  typedef Graph::EdgeIt EdgeIt;
-  typedef Graph::NodeIt NodeIt;
-  typedef Graph::EdgeMap<double> LengthMap;
-  typedef Graph::NodeMap<dim2::Point<double> > CoordMap;
-
-  SmartGraph graph;
-
-  std::ifstream is("route.lgf");
-  GraphReader<Graph> reader(is, graph);
-  
-  CoordMap coord(graph);
-  dim2::XMap<CoordMap> xcoord = xMap(coord);
-  reader.readNodeMap("coordinates_x", xcoord);
-  dim2::YMap<CoordMap> ycoord = yMap(coord);
-  reader.readNodeMap("coordinates_y", ycoord);
-
-  LengthMap length(graph);
-  reader.readEdgeMap("length", length);
-
-  Node source, target;
-  reader.readNode("source", source);
-  reader.readNode("target", target);
-
-  reader.run();
-
-  {
-    Timer timer;
-    Dijkstra<Graph, LengthMap> dijkstra(graph, length);
-    dijkstra.init();
-    dijkstra.addSource(source);
-    dijkstra.start(target);
-
-    std::cout << dijkstra.dist(target) << std::endl;
-    std::cout << timer << std::endl;
-  }
-  {
-    Timer timer;
-    typedef PotentialMap<CoordMap> Potential;
-    Potential potential(coord, coord[target]);
-
-    typedef ReducedLengthMap<Graph, LengthMap, Potential> ReducedLength;
-    ReducedLength reduced(graph, length, potential);
-
-    Dijkstra<Graph, ReducedLength> dijkstra(graph, reduced);
-
-    dijkstra.init();
-    dijkstra.addSource(source);
-    dijkstra.start(target);
-  
-    std::cout << dijkstra.dist(target) + potential[source] << std::endl;
-    std::cout << timer << std::endl;
-  }
-
-  return 0;
-}
Index: demo/mip_demo.cc
===================================================================
--- demo/mip_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,74 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Mixed integer program solver demo
-///
-/// This example shows how can we solve an integer program with lemon
-/// \c Mip interface and with default solver.
-///
-/// \include mip_demo.cc
-
-#include <lemon/lp.h>
-
-using namespace lemon;
-
-int main(){
-
-   Mip ilp;
-
-
-  typedef Mip::Row Row;
-  typedef Mip::Col Col;
-  
-  ilp.max();
-  
-  Col x1 = ilp.addCol();
-  Col x2 = ilp.addCol();
-  Col x3 = ilp.addCol();
-  
-  ilp.integer(x1,true);
-  ilp.integer(x2,true);
-  ilp.integer(x3,true);
-  
-  ilp.addRow(x1+x2+x3 <=100);  
-  ilp.addRow(10*x1+4*x2+5*x3<=600);  
-  ilp.addRow(2*x1+2*x2+6*x3<=300); 
-  
-  ilp.colLowerBound(x1, 0);
-  ilp.colLowerBound(x2, 0);
-  ilp.colLowerBound(x3, 0);
-  //Objective function
-  ilp.obj(10*x1+6*x2+4*x3);
-  
-  //Call the routine of the underlying LP solver
-  ilp.solve();
-  
-  //Print results
-  if (ilp.primalStatus()==LpSolverBase::OPTIMAL){
-    std::cout<<"Optimal solution found!"<<std::endl;
-    printf("optimum value = %g; x1 = %g; x2 = %g; x3 = %g\n", 
-           ilp.primalValue(), 
-           ilp.primal(x1), ilp.primal(x2), ilp.primal(x3));
-  }
-  else{
-    std::cout<<"Optimal solution not found!"<<std::endl;
-  }
-
-}
Index: demo/partitions.lgf
===================================================================
--- demo/partitions.lgf	(revision 1909)
+++ 	(revision )
@@ -1,58 +1,0 @@
-@nodeset 
-coordinates_x	coordinates_y	label	
-513.857		-446.322	23	
-393.468		566.711		22	
-869.153		52.8539		21	
-596.074		302.442		20	
--82.2171	593.138		19	
--663.61		546.157		18	
--1077.63	161.498		17	
--1177.47	-234.906	16	
--880.898	-528.539	15	
--499.175	-499.175	14	
-79.2808		-528.539	13	
-637.183		-184.989	12	
-205.543		-322.996	11	
-399.34		88.0898		10	
--842.726	243.715		9	
--860.344	-29.3633	8	
--211.415	-452.194	7	
--99.8351	99.8351		6	
-120.389		-129.198	5	
-108.644		334.741		4	
--484.494	328.869		3	
--607.82		-246.651	2	
--274		-131		1	
-@uedgeset 
-		label	
-12	23	15	
-13	23	14	
-4	22	23	
-20	21	20	
-12	21	19	
-22	20	22	
-22	19	25	
-6	19	24	
-9	18	28	
-16	15	1	
-2	14	8	
-7	13	13	
-11	12	16	
-5	10	18	
-17	9	5	
-17	8	3	
-16	8	2	
-14	7	10	
-3	6	30	
-9	6	27	
-11	5	17	
-7	5	12	
-6	4	26	
-10	4	21	
-18	3	29	
-15	2	7	
-8	2	6	
-5	1	11	
-14	1	9	
-9	1	4	
-@end
Index: demo/reader_writer_demo.cc
===================================================================
--- demo/reader_writer_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Demonstrating graph input and output
-///
-/// This simple demo program gives an example of how to read and write
-/// a graph and additional maps (on the nodes or the edges) from/to a
-/// stream. 
-///
-/// \include reader_writer_demo.cc
-
-#include <iostream>
-#include <lemon/smart_graph.h>
-#include <lemon/graph_reader.h>
-#include <lemon/graph_writer.h>
-
-
-using namespace lemon;
-
-int main() {
-  SmartGraph graph;
-
-  try {
-    std::string filename="sample.lgf";
-    std::string name;
-    GraphReader<SmartGraph> reader(filename,graph);
-    SmartGraph::EdgeMap<int> cap(graph);
-    reader.readEdgeMap("capacity",cap);
-    reader.readAttribute("name",name);
-    reader.run();
-
-    std::cout << "Hello! We have read a graph from file " << filename<< 
-      " and some maps on it:\n now we write it to the standard output!" << 
-      std::endl;
-
-
-    GraphWriter<SmartGraph> writer(std::cout, graph);
-    writer.writeEdgeMap("multiplicity", cap);
-    writer.writeAttribute("name",name);
-    writer.run();
-     
-  } catch (DataFormatError& error) {
-    std::cerr << error.what() << std::endl;
-  }
-
-
-  return 0;
-}
Index: demo/route.lgf
===================================================================
--- demo/route.lgf	(revision 1901)
+++ 	(revision )
@@ -1,43 +1,0 @@
-@nodeset
-label	coordinates_x	coordinates_y	
-9	447.907	578.328	
-8	79.2573	909.464	
-7	878.677	960.04	
-6	11.5504	938.413	
-5	327.398	815.035	
-4	427.002	954.002	
-3	148.549	753.748	
-2	903.889	326.476	
-1	408.248	577.327	
-0	189.239	92.5316	
-@edgeset
-		length	label	
-2	3	901.074	0	
-8	5	270.85	1	
-6	9	601.553	2	
-5	9	285.022	3	
-9	4	408.091	4	
-3	0	719.712	5	
-7	5	612.836	6	
-0	4	933.353	7	
-5	0	778.871	8	
-5	5	0	9	
-7	1	664.049	10	
-5	5	0	11	
-0	9	560.464	12	
-4	8	352.36	13	
-4	9	399.625	14	
-4	1	402.171	15	
-1	2	591.688	16	
-3	8	182.376	17	
-4	5	180.254	18	
-3	1	345.283	19	
-5	4	184.511	20	
-6	2	1112.45	21	
-0	1	556.624	22	
-@nodes
-source	1	
-target	8	
-@edges 
-@attributes 
-@end
Index: demo/sample.lgf
===================================================================
--- demo/sample.lgf	(revision 2416)
+++ 	(revision )
@@ -1,26 +1,0 @@
-@nodeset
-label      coordinates_x   coordinates_y
-5       796.398 208.035
-4       573.002 63.002
-3       568.549 401.748
-2       277.889 68.476
-1       288.248 397.327
-0       102.239 257.532
-@edgeset
-                label      capacity
-4       5       6       8
-3       5       5       8
-2       4       4       5
-1       4       3       8
-1       3       2       5
-0       2       1       10
-0       1       0       10
-#This is a comment here
-@nodes
-source 0
-target 5
-@edges 
-@attributes
-name "Simple Sample Graph"
-author "Attila BERNATH"
-@end
Index: demo/sat-2.cc
===================================================================
--- demo/sat-2.cc	(revision 2553)
+++ 	(revision )
@@ -1,157 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup demos
-/// \file
-/// \brief Solver for SAT-2 problems.
-///
-/// This demo progam solves the SAT-2 problem, i.e. the boolean
-/// satisfiability problem where each disjuction consists at most 2
-/// terms.
-///
-/// The program generates a graph from the boolean expression. Two
-/// nodes are assigned to each boolean variable, an <tt>x</tt> and a
-/// <tt>not x</tt> nodes. If there is an <tt>x or y</tt> disjunction
-/// in the formula, then the <tt>not x => y</tt> and the <tt>not y =>
-/// x</tt> edges are added to the graph. If there is a single
-/// <tt>x</tt> term disjunction in the formula then the <tt>not x
-/// =>x</tt> edge is added to the graph.
-///
-/// The boolean formula could be satified if and only if the
-/// <tt>x</tt> and <tt>not x</tt> nodes are in different strongly connected
-/// components. A feasible solution could be get from the current
-/// component numbering.
-///
-/// \include sat-2.cc
-
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <string>
-#include <map>
-
-#include <lemon/smart_graph.h>
-#include <lemon/topology.h>
-
-using namespace std;
-using namespace lemon;
-
-
-int main(int argc, const char *argv[]) {
-  if (argc != 2) {
-    std::cerr << "The SAT-2 solver demo" << std::endl << std::endl;
-    std::cerr << "The  parameter should be a filename" << std::endl;
-    std::cerr << "Each line of the file should contain a bool expression:" 
-              << std::endl;
-    std::cerr << "  [not] <variable> [or [not] <variable>]" << std::endl;
-    std::cerr << "The program prints a feasible solution if it exists" 
-              << std::endl;
-    return -1;
-  }
-  ifstream is(argv[1]);
-
-  SmartGraph graph;
-  map<string, pair<SmartGraph::Node, SmartGraph::Node> > var;
-
-  string line;
-  while (getline(is, line)) {
-    istringstream ls(line);
-    string var1, var2, op;
-    bool neg1 = false, neg2 = false;
-
-    ls >> var1;
-    if (var1 == "not") {
-      neg1 = true;
-      ls >> var1;
-    }
-    if (ls >> op) {
-      if (op != "or") {
-        cerr << "Wrong bool expression" << std::endl;
-        return -1;
-      } else {
-        ls >> var2;
-        if (var2 == "not") {
-          neg2 = true;
-          ls >> var2;
-        }
-      }
-      if (ls >> op) {
-        cerr << "Wrong bool expression" << std::endl;
-        return -1;
-      }
-
-      map<string, pair<SmartGraph::Node, SmartGraph::Node> >::iterator it1;
-      map<string, pair<SmartGraph::Node, SmartGraph::Node> >::iterator it2;    
-      it1 = var.find(var1);
-      if (it1 == var.end()) {
-        SmartGraph::Node node = graph.addNode();
-        SmartGraph::Node negNode = graph.addNode();
-        it1 = var.insert(make_pair(var1, make_pair(node, negNode))).first;
-      }
-
-      it2 = var.find(var2);
-      if (it2 == var.end()) {
-        SmartGraph::Node node = graph.addNode();
-        SmartGraph::Node negNode = graph.addNode();
-        it2 = var.insert(make_pair(var2, make_pair(node, negNode))).first;
-      }
-
-      graph.addEdge(neg1 ? it1->second.first : it1->second.second, 
-                    neg2 ? it2->second.second : it2->second.first);
-
-      graph.addEdge(neg2 ? it2->second.first : it2->second.second, 
-                    neg1 ? it1->second.second : it1->second.first);
-    } else {
-
-      map<string, pair<SmartGraph::Node, SmartGraph::Node> >::iterator it1;
-      it1 = var.find(var1);
-      if (it1 == var.end()) {
-        SmartGraph::Node node = graph.addNode();
-        SmartGraph::Node negNode = graph.addNode();
-        it1 = var.insert(make_pair(var1, make_pair(node, negNode))).first;
-      }
-      graph.addEdge(neg1 ? it1->second.first : it1->second.second, 
-                    neg1 ? it1->second.second : it1->second.first);
-      
-    }
-    
-  }
-  
-  SmartGraph::NodeMap<int> comp(graph);
-
-  stronglyConnectedComponents(graph, comp); 
-
-  for (map<string, pair<SmartGraph::Node, SmartGraph::Node> >::iterator
-         it = var.begin(); it != var.end(); ++it) {
-    if (comp[it->second.first] == comp[it->second.second]) {
-      std::cout << "There is no feasible solution." << std::endl;
-      return 0;
-    }
-  }
-
-  for (map<string, pair<SmartGraph::Node, SmartGraph::Node> >::iterator
-         it = var.begin(); it != var.end(); ++it) {
-    if (comp[it->second.first] < comp[it->second.second]) {
-      std::cout << it->first << " = false " << std::endl;
-    } else {
-      std::cout << it->first << " = true " << std::endl;
-    }
-  }
-  
-  return 0;
-}
Index: demo/sat-2.in
===================================================================
--- demo/sat-2.in	(revision 2459)
+++ 	(revision )
@@ -1,3 +1,0 @@
-x1 or x2
-x2 or not x3
-x3 or not x1
Index: demo/sat.cc
===================================================================
--- demo/sat.cc	(revision 2553)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup demos
-/// \file
-/// \brief Solver for SAT problems.
-///
-/// This demo progam solves the SAT problem, i.e. the boolean
-/// satisfiability problem. The problem in general case is
-/// NP-complete.
-///
-/// The program uses an integer linear program solver. A <tt>{0,
-/// 1}</tt> variable is assigned to each boolean variable. The
-/// disjunctions are converted to linear inequalities as each negation
-/// is replaced with a substraction from one and each disjunction is
-/// converted to addition. The generated linear expression should be
-/// at least one.
-///
-/// \include sat.cc
-
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <string>
-
-#include <lemon/lp.h>
-
-using namespace std;
-using namespace lemon;
-
-
-int main(int argc, const char *argv[]) {
-  if (argc != 2) {
-    std::cerr << "The SAT solver demo" << std::endl << std::endl;
-    std::cerr << "The  parameter should be a filename" << std::endl;
-    std::cerr << "Each line of the file should contain a bool expression:" 
-              << std::endl;
-    std::cerr << "  [not] <variable> [or [not] <variable>]..." << std::endl;
-    std::cerr << "The program prints a feasible solution if it exists" 
-              << std::endl;
-    return -1;
-  }
-  ifstream is(argv[1]);
-
-  Mip mip;
-  mip.max();
-  mip.obj(0);
-
-  string line;
-  while (getline(is, line)) {
-    istringstream ls(line);
-
-    Mip::Expr expr;
-
-
-    string op;
-    do {
-      string var;
-      bool neg = false;
-
-      ls >> var;
-      if (var == "not") {
-        neg = true;
-        ls >> var;
-      }
-
-      Mip::Col col = mip.colByName(var);
-
-      if (col == INVALID) {
-        col = mip.addCol();
-        mip.colName(col, var);
-        mip.colLowerBound(col, 0);
-        mip.colUpperBound(col, 1);
-        mip.integer(col, true);        
-      }
-      
-      expr += (neg ? 1 - col : col);
-
-    } while (ls >> op && op == "or");
-    if (ls) {
-      std::cerr << "Wrong bool expression" << std::endl;
-      return -1;
-    }
-    mip.addRow(expr >= 1);
-  }
-
-  mip.solve();
-
-  if (mip.mipStatus() == Mip::OPTIMAL) {
-    for (Mip::ColIt it(mip); it != INVALID; ++it) {
-      std::cout << mip.colName(it) << " = " 
-                << (mip.primal(it) == 1 ? "true" : "false")
-                << std::endl;
-    }
-  } else {
-    std::cout << "There is no feasible solution." << std::endl;
-  }
-  
-  return 0;
-}
Index: demo/simann_maxcut_demo.cc
===================================================================
--- demo/simann_maxcut_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-/// \ingroup demos
-/// \file
-/// \brief A program demonstrating the simulated annealing algorithm class.
-///
-/// This program tries to find a maximal cut in a graph using simulated
-/// annealing. It starts from a random solution and then in each step it
-/// chooses a node and moves it to the other side of the cut.
-///
-/// \include simann_maxcut_demo.cc
-
-#include <iostream>
-#include <cstdlib>
-
-#include <lemon/simann.h>
-#include <lemon/list_graph.h>
-#include <lemon/graph_reader.h>
-
-using namespace lemon;
-
-typedef ListGraph Graph;
-typedef Graph::Node Node;
-typedef Graph::Edge Edge;
-typedef Graph::NodeIt NodeIt;
-typedef Graph::EdgeIt EdgeIt;
-typedef Graph::OutEdgeIt OutEdgeIt;
-typedef Graph::InEdgeIt InEdgeIt;
-
-class Entity : public EntityBase
-{
-  public:
-    Graph& g;
-    Graph::EdgeMap<int>& w;
-    Graph::NodeMap<bool> a;
-    int sum;
-    Node last_moved;
-    Entity(Graph& _g, Graph::EdgeMap<int>& _w) : g(_g), w(_w), a(_g) {}
-    double mutate() {
-      static const int node_num = countNodes(g);
-      int i = 1 + rnd[node_num];
-      NodeIt n(g);
-      int j = 1;
-      while (j < i) {
-        ++n;
-        ++j;
-      }
-      for (OutEdgeIt e(g, n); e != INVALID; ++e) {
-        if (a[n] != a[g.target(e)]) sum -= w[e];
-        if (a[n] == a[g.target(e)]) sum += w[e];
-      }
-      for (InEdgeIt e(g, n); e != INVALID; ++e) {
-        if (a[g.source(e)] != a[n]) sum -= w[e];
-        if (a[g.source(e)] == a[n]) sum += w[e];
-      }
-      bool b = a[n];
-      a[n] = !b;
-      last_moved = n;
-      return -sum;
-    }
-    void revert() {
-      for (OutEdgeIt e(g, last_moved); e != INVALID; ++e) {
-        if (a[last_moved] != a[g.target(e)]) sum -= w[e];
-        if (a[last_moved] == a[g.target(e)]) sum += w[e];
-      }
-      for (InEdgeIt e(g, last_moved); e != INVALID; ++e) {
-        if (a[g.source(e)] != a[last_moved]) sum -= w[e];
-        if (a[g.source(e)] == a[last_moved]) sum += w[e];
-      }
-      bool b = a[last_moved];
-      a[last_moved] = !b;
-    }
-    Entity* clone() { return new Entity(*this); }
-    void randomize() {
-      for (NodeIt n(g); n != INVALID; ++n)
-        a[n] = false;
-      for (NodeIt n(g); n != INVALID; ++n)
-        if (rnd.boolean(0.5)) a[n] = true;
-      sum = 0;
-      for (EdgeIt e(g); e != INVALID; ++e)
-        if (a[g.source(e)] != a[g.target(e)])
-          sum += w[e];
-    }
-};
-
-int main()
-{
-  Graph g;
-  Graph::EdgeMap<int> w(g);
-
-  GraphReader<Graph> reader("simann_maxcut_demo.lgf", g);
-  reader.readEdgeMap("weight", w);
-  reader.run();
-
-  Entity e(g, w);
-
-  SimAnn simann;
-  SimpleController ctrl;
-  simann.setController(ctrl);
-  simann.setEntity(e);
-  simann.run();
-  
-  Entity* be = static_cast<Entity*>(simann.getBestEntity());
-  std::cout << be->sum << std::endl;
-  for (NodeIt n(g); n != INVALID; ++n)
-    if (be->a[n]) std::cout << g.id(n) << ": 1" << std::endl;
-    else std::cout << g.id(n) << ": 0" << std::endl;
-}
Index: demo/simann_maxcut_demo.lgf
===================================================================
--- demo/simann_maxcut_demo.lgf	(revision 1919)
+++ 	(revision )
@@ -1,22 +1,0 @@
-@nodeset
-label
-0
-1
-2
-3
-4
-5
-6
-@edgeset
-        weight
-0   3   1
-0   4   1
-1   5   1
-5   2   1
-6   2   1
-0   1   1
-2   1   1
-3   4   1
-4   5   1
-5   6   1
-@end
Index: demo/steiner.lgf
===================================================================
--- demo/steiner.lgf	(revision 2400)
+++ 	(revision )
@@ -1,303 +1,0 @@
-@nodeset 
-coordinates_x	coordinates_y	label	terminal	
--251.856	-202.321	0	1	
--331.765	100.719 	1	0	
--273.677	-294.883	2	0	
--377.147	-85.369 	3	0	
-169.068	        132.547 	4	0	
-453.494	        43.7303 	5	0	
-350.694	        -81.2848	6	0	
--295.393	211.455 	7	0	
--231.281	-62.2543	8	0	
-275.941	        118.221 	9	0	
-311.816	        220.248 	10	0	
-234.152	        -433.718	11	0	
-146.458	        422.137 	12	0	
-105.796	        -281.078	13	0	
--284.598	-120.027	14	0	
-321.329	        295.308 	15	0	
-47.3951	        306.406 	16	0	
--189.908	-188.032	17	0	
--15.3932	-179.904	18	0	
--178.559	80.3029 	19	0	
-231.219	        332.276 	20	0	
-314.277	        -37.9572	21	0	
-412.918	        91.483  	22	1	
--288.281	10.409  	23	0	
--265.853	-415.164	24	1	
-357.609	        -190.755	25	0	
-170.989	        275.074 	26	1	
--454.346	132.702 	27	1	
-37.385	        -21.8462	28	0	
-157.624	        325.213 	29	0	
-349.774	        22.435  	30	0	
--53.4642	-78.4002	31	0	
--209.404	-275.264	32	0	
-226.943	        93.2239 	33	0	
--415.266	-226.887	34	0	
--268.299	152.735 	35	0	
-80.0752	        337.882 	36	0	
--107.322	-328.854	37	0	
-118.71	        -56.0308	38	1	
-257.804	        417.75  	39	0	
--5.41726	302.825 	40	0	
--319.74	        -186.925	41	0	
-275.381	        277.069 	42	0	
--273.248	319.744 	43	0	
--43.6017	-208.328	44	0	
-166.639	        -134.903	45	0	
--54.1813	323.637 	46	0	
-286.634	        57.5531 	47	0	
-426.828	        245.989 	48	0	
--357.602	220.391 	49	0	
-135.626	        372.331 	50	0	
--21.8318	430.892 	51	0	
--406.689	46.2421 	52	0	
--246.874	262.591 	53	0	
--370.766	-20.5267	54	0	
--14.7567	-328.157	55	0	
-387.598	        40.9046 	56	0	
--279.35	        -247.789	57	1	
-116.726	        284.452 	58	0	
-440.353	        141.885 	59	0	
--171.65	        355.372 	60	1	
--207.145	-368.556	61	0	
--369.168	178.735 	62	1	
--45.5162	85.4527 	63	0	
-135.203 	71.4192 	64	0	
--351.597	-250.799	65	0	
--453.398	-15.6638	66	0	
-234.039	        -359.178	67	0	
--346.344	349.928 	68	0	
-4.38307	        40.7204 	69	0	
-224.516	        249.259 	70	0	
--105.49	        22.5721 	71	1	
-147.119 	-215.924	72	0	
--408.527       	96.861  	73	0	
--99.522 	268.879 	74	0	
--1.57169	363.155 	75	0	
-347.538 	92.4063 	76	0	
-353.409 	183.093 	77	0	
-416.442 	-69.8499	78	0	
--58.1027        -422.666	79	0	
-227.968 	-76.286 	80	0	
--323.979        42.9237 	81	0	
-84.2308 	-199.473	82	0	
-56.538  	-83.469 	83	0	
-244.34  	-234.403	84	0	
--361.409        -146.916	85	0	
-395.636 	189.561 	86	0	
--89.832 	464.4   	87	0	
-230.042 	199.124 	88	0	
--93.6872	145.66  	89	1	
--202.746	-118.087	90	0	
--57.6298 	207.792 	91	0	
-377.074 	298.05  	92	0	
--111.722	83.101  	93	0	
-279.51  	-133.648	94	0	
-66.5975 	494.601 	95	1	
-105.518 	204.789 	96	0	
--324.108	-84.4418	97	1	
--183.456	440.555 	98	0	
-177.565 	215.632 	99	0	
-@uedgeset 
-		label	
-38	28	0	
-56	5	2	
-75	16	3	
-40	16	4	
-92	48	5	
-74	53	8	
-88	70	9	
-68	43	10	
-58	26	11	
-69	31	12	
-14	0	13	
-61	37	14	
-73	27	16	
-59	5	17	
-17	0	18	
-29	26	19	
-56	22	21	
-21	6	22	
-55	37	24	
-61	32	26	
-57	0	27	
-93	89	28	
-82	45	29	
-94	80	30	
-38	31	31	
-91	89	32	
-37	32	33	
-66	52	34	
-59	22	35	
-65	41	36	
-99	58	37	
-44	18	38	
-62	49	40	
-83	45	41	
-33	4	42	
-93	63	43	
-50	29	44	
-85	3	45	
-98	87	46	
-81	23	47	
-9	4	48	
-86	48	49	
-69	28	50	
-81	54	51	
-46	40	52	
-84	67	53	
-75	36	56	
-47	33	58	
-77	10	59	
-90	14	60	
-75	46	62	
-81	1	63	
-26	20	64	
-70	4	65	
-97	3	66	
-88	10	67	
-58	50	68	
-92	86	70	
-47	9	71	
-90	8	75	
-49	7	76	
-54	23	77	
-91	35	79	
-42	10	80	
-65	34	81	
-51	50	82	
-86	77	83	
-76	30	84	
-99	20	86	
-42	15	87	
-42	20	88	
-64	38	89	
-78	6	90	
-47	30	91	
-67	11	93	
-78	30	94	
-64	28	95	
-82	72	96	
-76	9	97	
-72	13	98	
-86	59	100	
-69	63	102	
-91	74	103	
-62	7	105	
-44	37	106	
-51	12	107	
-76	56	108	
-50	12	109	
-95	51	110	
-35	19	111	
-30	21	112	
-88	9	113	
-98	60	114	
-73	62	115	
-70	42	117	
-71	63	118	
-85	34	121	
-97	54	122	
-20	15	123	
-39	20	124	
-65	2	125	
-76	59	126	
-90	17	127	
-77	76	129	
-57	41	130	
-23	8	131	
-71	19	132	
-78	56	133	
-91	53	134	
-53	46	135	
-80	21	137	
-72	45	138	
-97	8	139	
-94	25	141	
-62	27	142	
-58	36	144	
-93	71	145	
-57	2	146	
-92	10	147	
-88	77	148	
-91	63	149	
-17	2	152	
-73	1	153	
-55	18	155	
-50	20	157	
-66	54	158	
-51	36	159	
-78	5	160	
-99	70	161	
-87	60	162	
-60	53	163	
-97	85	164	
-97	14	166	
-89	19	167	
-82	18	169	
-85	41	170	
-99	96	171	
-73	52	172	
-92	15	173	
-81	52	174	
-83	18	176	
-41	14	178	
-32	17	179	
-96	36	180	
-74	40	182	
-7	1	183	
-39	12	185	
-94	6	187	
-83	38	188	
-24	2	189	
-32	18	190	
-66	3	192	
-71	31	194	
-68	49	203	
-23	19	204	
-43	7	208	
-96	16	209	
-61	2	210	
-96	4	211	
-64	45	212	
-91	16	213	
-84	72	214	
-66	27	215	
-67	13	216	
-71	8	217	
-19	1	218	
-87	46	219	
-94	72	220	
-84	25	221	
-60	43	222	
-18	13	225	
-35	7	226	
-51	46	227	
-80	47	229	
-80	45	230	
-79	55	231	
-90	71	232	
-64	47	233	
-64	4	234	
-53	7	236	
-64	63	237	
-98	68	238	
-79	61	239	
-96	63	242	
-78	25	243	
-31	18	244	
-90	18	245	
-13	11	246	
-95	39	247	
-95	87	250	
-79	24	251	
-66	34	252	
-92	39	253	
-79	13	254	
-34	24	255	
-68	27	256	
-25	11	257	
-24	11	259	
-@end
Index: demo/steiner_demo.cc
===================================================================
--- demo/steiner_demo.cc	(revision 2569)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Calculating an approximate Steiner-tree.
-///
-/// Calculating an approximate Steiner-tree.
-///
-/// \include steiner_demo.cc
-
-#include <lemon/smart_graph.h>
-#include <lemon/kruskal.h>
-#include <lemon/graph_reader.h>
-#include <lemon/time_measure.h>
-#include <lemon/graph_to_eps.h>
-#include <lemon/steiner.h>
-#include <lemon/math.h>
-
-#include <cstdlib>
-
-using namespace lemon;
-using namespace lemon::dim2;
-
-using namespace std;
-
-int main(int argc, const char *argv[]) {
-  std::string lgf = argc > 1 ? argv[1] : "steiner.lgf";
-  std::string eps = argc > 2 ? argv[2] : "steiner.eps";
-
-  SmartUGraph graph;
-  SmartUGraph::NodeMap<bool> terminal(graph);
-  SmartUGraph::NodeMap<int> label(graph);
-  SmartUGraph::NodeMap<Point<double> > coord(graph);
-  
-  UGraphReader<SmartUGraph>(lgf, graph).
-    readNodeMap("coordinates_x", xMap(coord)).
-    readNodeMap("coordinates_y", yMap(coord)).
-    readNodeMap("terminal", terminal).run();
-
-  SmartUGraph::UEdgeMap<double> cost(graph);
-  for (SmartUGraph::UEdgeIt it(graph); it != INVALID; ++it) {
-    cost[it] = sqrt((coord[graph.target(it)] - 
-                     coord[graph.source(it)]).normSquare());
-  }
-  
-  SteinerTree<SmartUGraph> steiner(graph, cost);
-  steiner.init();
-
-  for (SmartUGraph::NodeIt it(graph); it != INVALID; ++it) {
-    if (terminal[it]) {
-      steiner.addTerminal(it);
-    }
-  }
-  steiner.start();
-
-
-  Palette nodepalette(0);
-  nodepalette.add(Color(1.0, 1.0, 1.0));
-  nodepalette.add(Color(0.0, 1.0, 0.0));
-  nodepalette.add(Color(0.5, 0.5, 0.5));
-  SmartUGraph::NodeMap<int> nodecolor(graph);
-  for (SmartUGraph::NodeIt it(graph); it != INVALID; ++it) {
-    if (steiner.terminal(it)) {
-      nodecolor[it] = 1;
-    } else if (steiner.steiner(it)) {
-      nodecolor[it] = 2;
-    } else {
-      nodecolor[it] = 0;
-    }
-  }
-
-
-  Palette edgepalette(0);
-  edgepalette.add(Color(0.0, 0.0, 0.0));
-  edgepalette.add(Color(1.0, 0.0, 0.0));
-  SmartUGraph::UEdgeMap<int> edgecolor(graph);
-  for (SmartUGraph::UEdgeIt it(graph); it != INVALID; ++it) {
-    edgecolor[it] = steiner.tree(it) ? 1 : 0;
-  }
-
-
-  graphToEps(graph, eps).
-    coords(coord).undirected().
-    nodeScale(1.0).scaleToA4().
-    nodeColors(composeMap(nodepalette, nodecolor)).
-    edgeColors(composeMap(edgepalette, edgecolor)).
-    nodeTexts(label).nodeTextSize(8).run();
-
-  std::cout << "The tree constructed: " << eps << std::endl;
-  std::cout << "The cost of the tree: " << steiner.treeValue() << std::endl;
-
-  return 0;
-}
Index: demo/strongly_connected_orientation.cc
===================================================================
--- demo/strongly_connected_orientation.cc	(revision 2553)
+++ 	(revision )
@@ -1,112 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <iostream>
-
-#include <lemon/smart_graph.h>
-#include <lemon/graph_reader.h>
-#include <lemon/ugraph_adaptor.h>
-#include <lemon/graph_to_eps.h>
-#include <lemon/dfs.h>
-#include <lemon/topology.h>
-
-
-/// \ingroup demos
-/// \file
-/// \brief Strongly connected orientation
-///
-/// This example demonstrates the usage of the DirUGraphAdaptor,
-/// the DfsVisitor and some topology functions. The program reads
-/// an input undirected graph and with a DfsVisit it orients each edge
-/// to minimize the strongly connected components in the graph. At least
-/// it checks the result of the orientation with to topology functions.
-///
-/// \include strongly_connected_orientation.cc
-
-using namespace lemon;
-using namespace std;
-
-typedef SmartUGraph UGraph;
-UGRAPH_TYPEDEFS(UGraph);
-
-Color color(bool c) {
-  return c ? BLACK : RED;
-}
-
-template <typename DirMap>
-class OrientVisitor : public DfsVisitor<UGraph> {
-public:
-
-  OrientVisitor(const UGraph& ugraph, DirMap& dirMap)
-    : _ugraph(ugraph), _dirMap(dirMap), _processed(ugraph, false) {}
-
-  void discover(const Edge& edge) {
-    _processed.set(edge, true);
-    _dirMap.set(edge, _ugraph.direction(edge));
-  }
-
-  void examine(const Edge& edge) {
-    if (_processed[edge]) return;
-    _processed.set(edge, true);
-    _dirMap.set(edge, _ugraph.direction(edge));
-  }  
-
-private:
-  const UGraph& _ugraph;  
-  DirMap& _dirMap;
-  UGraph::UEdgeMap<bool> _processed;
-};
-
-
-int main() {
-  cout << "Orientation of the strongly_connected_orientation.lgf "
-       << "to be strongly connected" << endl;
-
-  UGraph ugraph;
-  UGraph::NodeMap<dim2::Point<double> > coords(ugraph);
-  UGraphReader<UGraph>("strongly_connected_orientation.lgf", ugraph).
-    readNodeMap("coords", coords).run();
-
-  UGraph::UEdgeMap<bool> dmap(ugraph);
-
-  typedef OrientVisitor<UGraph::UEdgeMap<bool> > Visitor;
-  Visitor visitor(ugraph, dmap);
-
-  DfsVisit<UGraph, Visitor> dfs(ugraph, visitor);
-
-  dfs.run();
-
-  typedef DirUGraphAdaptor<UGraph> DGraph;
-  DGraph dgraph(ugraph, dmap);
-
-  cout << "The result written into the " 
-       << "strongly_connected_orientation.eps file" << endl;
-
-  graphToEps(dgraph, "strongly_connected_orientation.eps").
-    drawArrows().coords(coords).scaleToA4().enableParallel().
-    autoNodeScale().autoEdgeWidthScale().run();
-
-  int num_scc = countStronglyConnectedComponents(dgraph);
-  int num_becc = countBiEdgeConnectedComponents(ugraph);
-
-  if (num_scc != num_becc) {
-    std::cerr << "Wrong Orientation" << std::endl;
-  }
-  
-  return 0;
-}
Index: demo/strongly_connected_orientation.lgf
===================================================================
--- demo/strongly_connected_orientation.lgf	(revision 2084)
+++ 	(revision )
@@ -1,26 +1,0 @@
-@nodeset 
-coords  	label	
-(12,6)	        9	
-(-12,3)	        8	
-(-34,6)	        7	
-(-23,22)	6	
-(16,26)	        5	
-(43,8)	        4	
-(24,-8)	        3	
-(-4,-14)	2	
-(-29,-11)	1	
-@uedgeset 
-		label	
-5	9	9	
-9	8	5	
-7	6	7	
-8	6	6	
-4	5	11	
-6	5	8	
-3	4	12	
-9	4	10	
-3	2	4	
-8	2	3	
-1	2	2	
-7	1	1	
-@end
Index: demo/sub_gad_input.lgf
===================================================================
--- demo/sub_gad_input.lgf	(revision 1901)
+++ 	(revision )
@@ -1,27 +1,0 @@
-@nodeset 
-label
-6
-5
-4
-3
-2
-1
-0
-@edgeset 
-                label      length
-5       6       9       4
-4       6       8       2
-3       5       7       1
-2       5       6       3
-2       6       5       5
-2       4       4       2
-1       4       3       3
-0       3       2       1
-0       2       1       2
-0       1       0       3
-@nodes 
-source 0
-target 6
-@edges 
-@attributes 
-@end
Index: demo/sub_graph_adaptor_demo.cc
===================================================================
--- demo/sub_graph_adaptor_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,125 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Computing maximum number of edge-disjoint shortest paths
-///
-/// This program computes a maximum number of edge-disjoint shortest paths
-/// between nodes \c s and \c t.
-///
-/// \include sub_graph_adaptor_demo.cc
-
-// Use a DIMACS max flow file as input.
-// sub_graph_adaptor_demo < dimacs_max_flow_file
-// Modified to eat lemon graph format! 
-
-
-#include <iostream>
-#include <fstream>
-
-#include <lemon/smart_graph.h>
-#include <lemon/dijkstra.h>
-#include <lemon/maps.h>
-#include <lemon/graph_adaptor.h>
-#include <lemon/dimacs.h>
-#include <lemon/preflow.h>
-#include "tight_edge_filter_map.h"
-
-#include <lemon/graph_reader.h>
-
-
-using namespace lemon;
-
-using std::cout;
-using std::endl;
-
-int main(int argc, char *argv[]) 
-{
-  if(argc<2)
-  {
-      std::cerr << "USAGE: sub_graph_adaptor_demo input_file.lgf" << std::endl;
-      std::cerr << "The file 'input_file.lgf' has to contain a max flow "
-		<< "instance in \n LEMON format "
-		<< "(e.g. sub_gad_input.lgf is such a file)." 
-		<< std::endl;
-      return 0;
-  }
-
-
-  //input stream to read the graph from
-  std::ifstream is(argv[1]);
-
-  typedef SmartGraph Graph;
-
-  typedef Graph::Edge Edge;
-  typedef Graph::Node Node;
-  typedef Graph::EdgeIt EdgeIt;
-  typedef Graph::NodeIt NodeIt;
-  typedef Graph::EdgeMap<int> LengthMap;
-
-  Graph g;
-  Node s, t;
-  LengthMap length(g);
-
-  //readDimacs(is, g, length, s, t);
-
-
-  GraphReader<SmartGraph> reader(is,g);
-  reader.readNode("source",s).readNode("target",t)
-    .readEdgeMap("length",length).run();
-
-  cout << "edges with lengths (of form id, source--length->target): " << endl;
-  for(EdgeIt e(g); e!=INVALID; ++e) 
-    cout << " " << g.id(e) << ", " << g.id(g.source(e)) << "--" 
-	 << length[e] << "->" << g.id(g.target(e)) << endl;
-
-  cout << "s: " << g.id(s) << " t: " << g.id(t) << endl;
-
-  typedef Dijkstra<Graph, LengthMap> Dijkstra;
-  Dijkstra dijkstra(g, length);
-  dijkstra.run(s);
-
-  // This map returns true exactly for those edges which are 
-  // tight w.r.t the length funcion and the potential 
-  // given by the dijkstra algorithm.
-  typedef TightEdgeFilterMap<Graph, const Dijkstra::DistMap, LengthMap> 
-    TightEdgeFilter;
-  TightEdgeFilter tight_edge_filter(g, dijkstra.distMap(), length);
-
-//  ConstMap<Node, bool> const_true_map(true);
-  // This graph contains exaclty the tight edges.
-// typedef SubGraphAdaptor<Graph, ConstMap<Node, bool>, TightEdgeFilter> SubGW;
-  typedef EdgeSubGraphAdaptor<Graph, TightEdgeFilter> SubGW;
-  SubGW gw(g, tight_edge_filter);
-
-  ConstMap<Edge, int> const_1_map(1);
-  // Max flow between s and t in the graph of tight edges.
-  Preflow<SubGW, ConstMap<Edge, int> > preflow(gw, const_1_map, s, t);
-  preflow.run();
-
-  cout << "maximum number of edge-disjoint shortest paths: " 
-       << preflow.flowValue() << endl;
-  cout << "edges of the maximum number of edge-disjoint shortest s-t paths: " 
-       << endl;
-  for(EdgeIt e(g); e!=INVALID; ++e) 
-    if (preflow.flow(e) != 0)
-      cout << " " << g.id(e) << ", "
-	   << g.id(g.source(e)) << "--" 
-	   << length[e] << "->" << g.id(g.target(e)) << endl;
-}
Index: demo/sub_graph_adaptor_demo.dim
===================================================================
--- demo/sub_graph_adaptor_demo.dim	(revision 1435)
+++ 	(revision )
@@ -1,14 +1,0 @@
-c LEMON max flow problem
-p max 7 9
-n 1 s
-n 7 t
-a 1 2 3
-a 1 3 2
-a 1 4 1
-a 2 5 3
-a 3 5 2
-a 3 7 5
-a 3 6 3
-a 4 6 1
-a 5 7 2
-a 6 7 4
Index: demo/tight_edge_filter_map.h
===================================================================
--- demo/tight_edge_filter_map.h	(revision 2553)
+++ 	(revision )
@@ -1,72 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#ifndef DEMO_TIGHT_EDGE_FILTER_MAP_H
-#define DEMO_TIGHT_EDGE_FILTER_MAP_H
-
-#include <lemon/maps.h>
-
-/// \file
-/// \brief Tight edge filter map.
-///
-/// Tight edge filter map is bool map on the edges of the graph
-/// which filters the edges which are not tight for a node-potential.
-/// It is used in the \ref sub_graph_adaptor_demo.cc file. 
-///
-/// \include tight_edge_filter_map.h
-
-namespace lemon {
-
-  /// \brief A map for filtering the edge-set to those edges 
-  /// which are tight w.r.t. a node-potential and 
-  /// edge-distance.
-  /// 
-  /// Let \f$ G=(V,A) \f$ be a directed graph (graph for short) and 
-  /// let \f$ \mathbb{F} \f$ be a number type. 
-  /// Given a distance function 
-  /// \f$ d:E\to\mathbb{F} \f$, 
-  /// \f$ \pi:V\to\mathbb{F} \f$ is said to be a potetial 
-  /// w.r.t. \f$ d \f$ 
-  /// if and only if 
-  /// \f$ \pi(v)\le d(uv)+\pi(u) \f$ holds for each edge \f$ uv\in E \f$ 
-  /// (or the reverse inequality holds for each edge). 
-  /// An edge is said to be tight if this inequality holds with equality, 
-  /// and the map returns \c true exactly for those edges. 
-  /// To avoid rounding errors, it is recommended to use this class with exact 
-  /// number types, e.g. with \c int.
-  template<typename Graph, 
-	   typename NodePotentialMap, typename EdgeDistanceMap>
-  class TightEdgeFilterMap : public MapBase<typename Graph::Edge, bool> {
-  protected:
-    const Graph* g;
-    NodePotentialMap* node_potential;
-    EdgeDistanceMap* edge_distance;
-  public:
-    TightEdgeFilterMap(Graph& _g, NodePotentialMap& _node_potential, 
-		       EdgeDistanceMap& _edge_distance) : 
-      g(&_g), node_potential(&_node_potential), 
-      edge_distance(&_edge_distance) { }
-    bool operator[](const typename Graph::Edge& e) const {
-      return ((*node_potential)[g->target(e)] == 
-	      (*edge_distance)[e]+(*node_potential)[g->source(e)]);
-    }
-  };
-
-} //namespace lemon
-
-#endif //DEMO_TIGHT_EDGE_FILTER_MAP_H
Index: demo/topological_ordering.cc
===================================================================
--- demo/topological_ordering.cc	(revision 2553)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-///\ingroup demos
-///\file
-///\brief Demonstrating the Dfs class with topological ordering
-///
-///\include topological_ordering.cc
-
-#include <iostream>
-#include <string>
-#include <list>
-#include <lemon/list_graph.h>
-#include <lemon/maps.h>
-#include <lemon/dfs.h>
-
-using namespace lemon;
-
-
-template< typename GR >
-class SerializingWriteMap
-{
-public:
-  typedef typename GR::Node  Key;
-  typedef bool  Value;
-  typedef std::list<Key>  OrderedList;
-
-  OrderedList  order;
-
-  SerializingWriteMap( const GR& ) {}
-
-  void  set( const Key& k, const Value& v ) {
-    if( v ) order.push_front(k);
-  }
-
-  Value  operator[] ( const Key& ) {
-    return false;
-  }
-};
-
-
-int main()
-{
-  std::cout << "Topological Ordering demo" << std::endl;
-
-  // Create and build the graph
-  ListGraph  gr;
-  ListGraph::NodeMap<std::string>  label(gr);
-  typedef ListGraph::Node  Node;
-
-  // This DAG example for topological ordering is from the book New Algorithms
-  // (Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein)
-  {
-    Node  belt = gr.addNode();
-    Node  trousers = gr.addNode();
-    Node  necktie = gr.addNode();
-    Node  coat = gr.addNode();
-    Node  socks = gr.addNode();
-    Node  shirt = gr.addNode();
-    Node  shoe = gr.addNode();
-    Node  watch = gr.addNode();
-    Node  pants = gr.addNode();
-
-    label[belt] = "Belt";
-    label[trousers] = "Trousers";
-    label[necktie] = "Necktie";
-    label[coat] = "Coat";
-    label[socks] = "Socks";
-    label[shirt] = "Shirt";
-    label[shoe] = "Shoe";
-    label[watch] = "Watch";
-    label[pants] = "Pants";
-
-    // Here we use a directed edge to indicate precedenc.
-    // The source must precede the target.
-    gr.addEdge( socks, shoe );
-    gr.addEdge( pants, shoe );
-    gr.addEdge( pants, trousers );
-    gr.addEdge( trousers, shoe );
-    gr.addEdge( trousers, belt );
-    gr.addEdge( belt, coat );
-    gr.addEdge( shirt, belt );
-    gr.addEdge( shirt, necktie );
-    gr.addEdge( necktie, coat );
-  }
-
-  // Calculate topological order
-  Dfs<ListGraph, Dfs<ListGraph>::DefProcessedMapTraits<SerializingWriteMap<ListGraph> > >  dfs(gr);
-  SerializingWriteMap<ListGraph>  list(gr);
-  dfs.processedMap(list);
-  dfs.run();
-
-  // Write out the result
-  std::cout << "One possible order to dress up:";
-  for( SerializingWriteMap<ListGraph>::OrderedList::iterator  it = list.order.begin(); it != list.order.end(); ++it )
-    std::cout << "  " << label[*it];
-  std::cout << std::endl;
-
-  return 0;
-}
Index: demo/topology_demo.cc
===================================================================
--- demo/topology_demo.cc	(revision 2553)
+++ 	(revision )
@@ -1,188 +1,0 @@
-/* -*- C++ -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * Permission to use, modify and distribute this software is granted
- * provided that this copyright notice appears in all copies. For
- * precise terms see the accompanying LICENSE file.
- *
- * This software is provided "AS IS" with no warranty of any kind,
- * express or implied, and with no claim as to its suitability for any
- * purpose.
- *
- */
-
-#include <lemon/list_graph.h>
-#include <lemon/topology.h>
-#include <lemon/graph_to_eps.h>
-#include <lemon/graph_reader.h>
-#include <lemon/dim2.h>
-
-#include <iostream>
-
-#include <cstdlib>
-#include <ctime>
-
-/// \ingroup demos
-/// \file
-/// \brief Demo what shows the result of some topology functions.
-///
-///  Demo what shows the result of some topology functions.
-///
-/// \include topology_demo.cc
-
-using namespace lemon;
-using namespace lemon::dim2;
-using namespace std;
-
-
-Color color(bool val) {
-  return val ? RED : BLUE;
-}
-
-
-void drawConnectedComponents() {
-  typedef ListUGraph Graph;
-  typedef Graph::Node Node;
-
-  Graph graph;
-  Graph::NodeMap<Point<double> > coords(graph);
-
-  UGraphReader<Graph>("u_components.lgf", graph).
-    readNodeMap("coordinates_x", xMap(coords)).
-    readNodeMap("coordinates_y", yMap(coords)).
-    run();
-  
-  Palette palette;
-
-  Graph::NodeMap<int> compMap(graph);
-  connectedComponents(graph, compMap);
-
-  graphToEps(graph, "connected_components.eps").undirected().
-    coords(coords).scaleToA4().enableParallel().
-    nodeColors(composeMap(palette, compMap)).run();
-
-  std::cout << "Result: connected_components.eps" << std::endl;
-}
-
-void drawStronglyConnectedComponents() {
-  typedef ListGraph Graph;
-  typedef Graph::Node Node;
-
-  Graph graph;
-  Graph::NodeMap<Point<double> > coords(graph);
-
-  GraphReader<Graph>("dir_components.lgf", graph).
-    readNodeMap("coordinates_x", xMap(coords)).
-    readNodeMap("coordinates_y", yMap(coords)).
-    run();
-  
-  Palette palette;
-
-  Graph::NodeMap<int> compMap(graph);
-  Graph::EdgeMap<bool> cutMap(graph);
-  stronglyConnectedComponents(graph, compMap);
-  stronglyConnectedCutEdges(graph, cutMap);
-
-  graphToEps(graph, "strongly_connected_components.eps").
-    coords(coords).scaleToA4().enableParallel().drawArrows().
-    nodeColors(composeMap(palette, compMap)).
-    edgeColors(composeMap(functorMap(&color), cutMap)).run();
-
-  std::cout << "Result: strongly_connected_components.eps" << std::endl;
-}
-
-void drawNodeBiconnectedComponents() {
-  typedef ListUGraph Graph;
-  typedef Graph::Node Node;
-  typedef Graph::UEdge UEdge;
-
-  Graph graph;
-  Graph::NodeMap<Point<double> > coords(graph);
-
-  UGraphReader<Graph>("u_components.lgf", graph).
-    readNodeMap("coordinates_x", xMap(coords)).
-    readNodeMap("coordinates_y", yMap(coords)).
-    run();
-
-  Palette palette;
-
-  Graph::UEdgeMap<int> compMap(graph);
-  Graph::NodeMap<bool> cutMap(graph);
-  biNodeConnectedComponents(graph, compMap);
-  biNodeConnectedCutNodes(graph, cutMap);
-
-  graphToEps(graph, "bi_node_connected_components.eps").undirected().
-    coords(coords).scaleToA4().enableParallel().
-    edgeColors(composeMap(palette, compMap)).
-    nodeColors(composeMap(functorMap(&color), cutMap)).
-    run();
-
-  std::cout << "Result: bi_node_connected_components.eps" << std::endl;
-}
-
-void drawEdgeBiconnectedComponents() {
-  typedef ListUGraph Graph;
-  typedef Graph::Node Node;
-  typedef Graph::UEdge UEdge;
-
-  Graph graph;
-  Graph::NodeMap<Point<double> > coords(graph);
-
-  UGraphReader<Graph>("u_components.lgf", graph).
-    readNodeMap("coordinates_x", xMap(coords)).
-    readNodeMap("coordinates_y", yMap(coords)).
-    run();
-  
-  Palette palette;
-
-  Graph::NodeMap<int> compMap(graph);
-  Graph::UEdgeMap<bool> cutMap(graph);
-  biEdgeConnectedComponents(graph, compMap);
-  biEdgeConnectedCutEdges(graph, cutMap);
-
-  graphToEps(graph, "bi_edge_connected_components.eps").undirected().
-    coords(coords).scaleToA4().enableParallel().
-    nodeColors(composeMap(palette, compMap)).
-    edgeColors(composeMap(functorMap(&color), cutMap)).run();
-  
-  std::cout << "Result: bi_edge_connected_components.eps" << std::endl;
-}
-
-void drawBipartitePartitions() {
-  typedef ListUGraph Graph;
-  typedef Graph::Node Node;
-  typedef Graph::UEdge UEdge;
-
-  Graph graph;
-  Graph::NodeMap<Point<double> > coords(graph);
-
-  UGraphReader<Graph>("partitions.lgf", graph).
-    readNodeMap("coordinates_x", xMap(coords)).
-    readNodeMap("coordinates_y", yMap(coords)).
-    run();
-  
-  Palette palette;
-
-  Graph::NodeMap<bool> partMap(graph);
-  bipartitePartitions(graph, partMap);
-
-  graphToEps(graph, "bipartite_partitions.eps").undirected().
-    coords(coords).scaleToA4().enableParallel().
-    nodeColors(composeMap(functorMap(&color), partMap)).run();
-  
-  std::cout << "Result: bipartite_partitions.eps" << std::endl;
-} 
-
-int main() {
-  drawConnectedComponents();
-  drawStronglyConnectedComponents();
-  drawNodeBiconnectedComponents();
-  drawEdgeBiconnectedComponents();
-  drawBipartitePartitions();
-  return 0;
-}
Index: demo/u_components.lgf
===================================================================
--- demo/u_components.lgf	(revision 1969)
+++ 	(revision )
@@ -1,103 +1,0 @@
-@nodeset 
-coordinates_x	coordinates_y	label	
-574.035	177.301	44	
-694.579	115.483	43	
-280.402	10.3938	42	
-212.403	-23.6057	41	
-286.584	-48.3327	40	
-438.037	-88.514	39	
-397.855	-196.694	38	
-366.947	-110.15	37	
-271.13	-175.058	36	
-277.311	-252.33	35	
-206.221	-205.967	34	
--840.856	-246.718	18	
--579.033	445.603	17	
--767.847	113.289	16	
-906.312	201.403	15	
-986.873	-115.807	14	
--470.779	158.605	13	
-422.945	521.129	12	
--5.03507	561.41	11	
-329.797	314.692	10	
--67.9734	319.727	9	
-762.812	-17.6227	8	
-526.164	32.7279	7	
-730.084	-307.139	6	
-415.393	-289.516	5	
--67.9734	-347.42	4	
--309.657	-57.9033	3	
--323.543	-433.964	2	
--539.894	-262.64	1	
--26.6953	-19.9585	19	
-116.407	-173.66	20	
-201.208	38.3422	21	
--262.548	107.243	22	
--13.4452	133.743	23	
--180.397	245.045	24	
--416.25	345.746	26	
--132.697	451.748	27	
--371.2	568.349	28	
-670.264	274.195	29	
-588.113	544.499	30	
-924.667	409.347	31	
--689.204	-237.261	32	
--567.302	43.6423	33	
-@uedgeset 
-		label	
-41	42	44	
-40	42	43	
-37	40	49	
-36	40	47	
-41	40	42	
-38	39	46	
-38	37	53	
-36	37	48	
-39	37	45	
-35	36	51	
-34	36	50	
-34	35	52	
-16	17	1	
-18	16	2	
-14	15	3	
-8	15	4	
-8	14	5	
-17	13	6	
-16	13	7	
-3	13	8	
-11	12	9	
-10	12	10	
-9	11	11	
-9	10	12	
-6	8	13	
-7	8	14	
-5	7	15	
-9	7	16	
-12	7	17	
-5	6	18	
-4	5	19	
-2	4	20	
-1	3	21	
-4	3	22	
-1	2	23	
-22	19	24	
-19	20	25	
-21	20	26	
-19	21	27	
-22	23	28	
-19	23	29	
-22	24	30	
-23	24	31	
-26	27	32	
-24	27	33	
-24	27	34	
-27	28	35	
-26	28	36	
-44	29	55	
-43	29	54	
-29	30	37	
-29	31	38	
-30	31	39	
-32	33	40	
-32	33	41	
-@end
