[Lemon-commits] deba: r3224 - in lemon/trunk: demo lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Mar 5 18:10:58 CET 2007


Author: deba
Date: Mon Mar  5 18:10:58 2007
New Revision: 3224

Modified:
   lemon/trunk/demo/disjoint_paths_demo.cc
   lemon/trunk/lemon/graph_adaptor.h

Log:
Bug whit Parent typedef in SplitGraphAdaptor::CombinedEdgeMap
Fixing graph to eps parameters for demo



Modified: lemon/trunk/demo/disjoint_paths_demo.cc
==============================================================================
--- lemon/trunk/demo/disjoint_paths_demo.cc	(original)
+++ lemon/trunk/demo/disjoint_paths_demo.cc	Mon Mar  5 18:10:58 2007
@@ -45,8 +45,8 @@
 }
 
 int main() {
-  cout << "This program calculates the number " <<
-    "of disjoint paths in a graph" << endl;
+  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;
 
@@ -70,9 +70,10 @@
   cout << "Number of edge disjoint paths: " << preflow.flowValue() << endl;
 
   graphToEps(graph, "edge_disjoint_paths.eps").
-    title("edge disjoint path").copyright("(C) 2003-2007 LEMON Project").drawArrows().
+    title("edge disjoint paths").scaleToA4().
+    copyright("(C) 2003-2007 LEMON Project").drawArrows().
     edgeColors(composeMap(functorMap(color), flow)).
-    coords(coords).autoNodeScale().run();
+    coords(coords).run();
 
 
   cout << "The paths are written into edge_disjoint_paths.eps" << endl;
@@ -96,12 +97,13 @@
 
 
   graphToEps(sgraph, "node_disjoint_paths.eps").
-    title("node disjoint path").copyright("(C) 2003-2007 LEMON Project").drawArrows().
+    title("node disjoint paths").scaleToA4().
+    copyright("(C) 2003-2007 LEMON Project").drawArrows().
     edgeColors(composeMap(functorMap(color), sflow)).
     coords(SGraph::combinedNodeMap(coords,
 				   shiftMap(coords,
 					    dim2::Point<double>(5, 0)))).
-    autoNodeScale().run();
+    run();
 
   cout << "The paths are written into node_disjoint_paths.eps" << endl;
   

Modified: lemon/trunk/lemon/graph_adaptor.h
==============================================================================
--- lemon/trunk/lemon/graph_adaptor.h	(original)
+++ lemon/trunk/lemon/graph_adaptor.h	Mon Mar  5 18:10:58 2007
@@ -2605,14 +2605,12 @@
     /// This class adapt an original graph EdgeMap and NodeMap to
     /// get an edge map on the adapted graph.
     template <typename GraphEdgeMap, typename GraphNodeMap>
-    class CombinedEdgeMap 
-      : public MapBase<Edge, typename GraphEdgeMap::Value> {
+    class CombinedEdgeMap {
     public:
-      typedef MapBase<Edge, typename GraphEdgeMap::Value> Parent;
-
-      typedef typename Parent::Key Key;
-      typedef typename Parent::Value Value;
-
+      
+      typedef Edge Key;
+      typedef typename GraphEdgeMap::Value Value;
+      
       /// \brief Constructor
       ///
       /// Constructor.



More information about the Lemon-commits mailing list