[Lemon-commits] [lemon_svn] deba: r2050 - hugo/trunk/demo

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:49:46 CET 2006


Author: deba
Date: Wed Jul 13 16:17:13 2005
New Revision: 2050

Modified:
   hugo/trunk/demo/Makefile.am
   hugo/trunk/demo/descriptor_map_demo.cc

Log:
Demo displays information on the screen
Added to Makefile.am



Modified: hugo/trunk/demo/Makefile.am
==============================================================================
--- hugo/trunk/demo/Makefile.am	(original)
+++ hugo/trunk/demo/Makefile.am	Wed Jul 13 16:17:13 2005
@@ -12,6 +12,7 @@
 	min_route \
 	hello_lemon \
 	sub_graph_adaptor_demo \
+	descriptor_map_demo \
 	coloring
 
 if HAVE_GLPK
@@ -48,3 +49,5 @@
 
 lp_maxflow_demo_SOURCES = lp_maxflow_demo.cc
 lp_maxflow_demo_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS)
+
+descriptor_map_demo_SOURCES = descriptor_map_demo.cc
\ No newline at end of file

Modified: hugo/trunk/demo/descriptor_map_demo.cc
==============================================================================
--- hugo/trunk/demo/descriptor_map_demo.cc	(original)
+++ hugo/trunk/demo/descriptor_map_demo.cc	Wed Jul 13 16:17:13 2005
@@ -1,9 +1,27 @@
+/* -*- C++ -*-
+ * demo/descriptor_map_demo.cc - Part of LEMON, a generic C++ optimization library
+ *
+ * Copyright (C) 2005 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_utils.h>
+#include <lemon/graph_writer.h>
 #include <lemon/xy.h>
-
 #include <lemon/graph_to_eps.h>
 
+#include <iostream>
+
 #include <cstdlib>
 #include <cmath>
 #include <ctime>
@@ -50,7 +68,9 @@
   typedef Graph::Edge Edge;
   
   // Generating a graph
-  
+
+  std::cout << "Generating graph: " << std::endl;
+
   Graph graph;
   
   const int NODE = 16;
@@ -78,6 +98,11 @@
     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, xy<double>(0.0, 0.0), 10.0);



More information about the Lemon-commits mailing list