std:: prefix bug corrected
authordeba
Sat, 14 May 2005 17:29:28 +0000
changeset 141753c2a0ccc9a4
parent 1416 1b481ced25e7
child 1418 afaa773d0ad0
std:: prefix bug corrected
src/demo/graph_to_eps_demo.cc
src/lemon/graph_to_eps.h
     1.1 --- a/src/demo/graph_to_eps_demo.cc	Sat May 14 17:26:56 2005 +0000
     1.2 +++ b/src/demo/graph_to_eps_demo.cc	Sat May 14 17:29:28 2005 +0000
     1.3 @@ -20,6 +20,8 @@
     1.4  #include<lemon/list_graph.h>
     1.5  #include<lemon/graph_utils.h>
     1.6  
     1.7 +#include <cmath>
     1.8 +
     1.9  
    1.10  using namespace std;
    1.11  using namespace lemon;
     2.1 --- a/src/lemon/graph_to_eps.h	Sat May 14 17:26:56 2005 +0000
     2.2 +++ b/src/lemon/graph_to_eps.h	Sat May 14 17:29:28 2005 +0000
     2.3 @@ -18,7 +18,6 @@
     2.4  #define LEMON_GRAPH_TO_EPS_H
     2.5  
     2.6  #include <sys/time.h>
     2.7 -#include <time.h>
     2.8  
     2.9  #include<iostream>
    2.10  #include<fstream>
    2.11 @@ -26,11 +25,15 @@
    2.12  #include<algorithm>
    2.13  #include<vector>
    2.14  
    2.15 +#include <ctime>
    2.16 +#include <cmath>
    2.17 +
    2.18  #include<lemon/invalid.h>
    2.19  #include<lemon/xy.h>
    2.20  #include<lemon/maps.h>
    2.21  #include<lemon/bezier.h>
    2.22  
    2.23 +
    2.24  ///\ingroup io_group
    2.25  ///\file
    2.26  ///\brief Simple graph drawer
    2.27 @@ -809,7 +812,7 @@
    2.28  	  sw-=_parEdgeDist;
    2.29  	  sw/=-2.0;
    2.30  	  xy<double> dvec(_coords[g.target(*i)]-_coords[g.source(*i)]);
    2.31 -	  double l=sqrt(dvec.normSquare()); 
    2.32 +	  double l=std::sqrt(dvec.normSquare()); 
    2.33  	  ///\todo better 'epsilon' would be nice here.
    2.34  	  xy<double> d(dvec/std::max(l,1e-9));
    2.35   	  xy<double> m;
    2.36 @@ -862,7 +865,7 @@
    2.37  		 << bez.p4.x << ' ' << bez.p4.y << " curveto stroke\n";
    2.38  	      xy<double> dd(rot90(linend-apoint));
    2.39  	      dd*=(.5*_edgeWidths[*e]*_edgeWidthScale+_arrowWidth)/
    2.40 -		sqrt(dd.normSquare());
    2.41 +		std::sqrt(dd.normSquare());
    2.42  	      os << "newpath " << psOut(apoint) << " moveto "
    2.43  		 << psOut(linend+dd) << " lineto "
    2.44  		 << psOut(linend-dd) << " lineto closepath fill\n";