[Lemon-commits] [lemon_svn] deba: r1887 - in hugo/trunk/src: demo lemon

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


Author: deba
Date: Sat May 14 19:29:28 2005
New Revision: 1887

Modified:
   hugo/trunk/src/demo/graph_to_eps_demo.cc
   hugo/trunk/src/lemon/graph_to_eps.h

Log:
std:: prefix bug corrected



Modified: hugo/trunk/src/demo/graph_to_eps_demo.cc
==============================================================================
--- hugo/trunk/src/demo/graph_to_eps_demo.cc	(original)
+++ hugo/trunk/src/demo/graph_to_eps_demo.cc	Sat May 14 19:29:28 2005
@@ -20,6 +20,8 @@
 #include<lemon/list_graph.h>
 #include<lemon/graph_utils.h>
 
+#include <cmath>
+
 
 using namespace std;
 using namespace lemon;

Modified: hugo/trunk/src/lemon/graph_to_eps.h
==============================================================================
--- hugo/trunk/src/lemon/graph_to_eps.h	(original)
+++ hugo/trunk/src/lemon/graph_to_eps.h	Sat May 14 19:29:28 2005
@@ -18,7 +18,6 @@
 #define LEMON_GRAPH_TO_EPS_H
 
 #include <sys/time.h>
-#include <time.h>
 
 #include<iostream>
 #include<fstream>
@@ -26,11 +25,15 @@
 #include<algorithm>
 #include<vector>
 
+#include <ctime>
+#include <cmath>
+
 #include<lemon/invalid.h>
 #include<lemon/xy.h>
 #include<lemon/maps.h>
 #include<lemon/bezier.h>
 
+
 ///\ingroup io_group
 ///\file
 ///\brief Simple graph drawer
@@ -809,7 +812,7 @@
 	  sw-=_parEdgeDist;
 	  sw/=-2.0;
 	  xy<double> dvec(_coords[g.target(*i)]-_coords[g.source(*i)]);
-	  double l=sqrt(dvec.normSquare()); 
+	  double l=std::sqrt(dvec.normSquare()); 
 	  ///\todo better 'epsilon' would be nice here.
 	  xy<double> d(dvec/std::max(l,1e-9));
  	  xy<double> m;
@@ -862,7 +865,7 @@
 		 << bez.p4.x << ' ' << bez.p4.y << " curveto stroke\n";
 	      xy<double> dd(rot90(linend-apoint));
 	      dd*=(.5*_edgeWidths[*e]*_edgeWidthScale+_arrowWidth)/
-		sqrt(dd.normSquare());
+		std::sqrt(dd.normSquare());
 	      os << "newpath " << psOut(apoint) << " moveto "
 		 << psOut(linend+dd) << " lineto "
 		 << psOut(linend-dd) << " lineto closepath fill\n";



More information about the Lemon-commits mailing list