From: <den...@us...> - 2010-12-12 21:08:11
|
Revision: 350 http://rmol.svn.sourceforge.net/rmol/?rev=350&view=rev Author: denis_arnaud Date: 2010-12-12 21:08:05 +0000 (Sun, 12 Dec 2010) Log Message: ----------- [Dev] Fixed compilation errors with g++ 4.5.1 (e.g., missing math-related headers). Modified Paths: -------------- trunk/rmol/rmol/command/Utilities.cpp Modified: trunk/rmol/rmol/command/Utilities.cpp =================================================================== --- trunk/rmol/rmol/command/Utilities.cpp 2010-12-03 19:49:52 UTC (rev 349) +++ trunk/rmol/rmol/command/Utilities.cpp 2010-12-12 21:08:05 UTC (rev 350) @@ -6,6 +6,8 @@ #include <cassert> #include <string> #include <numeric> +#include <algorithm> +#include <cmath> // StdAir #include <stdair/service/Logger.hpp> // RMOL @@ -18,8 +20,8 @@ std::vector<double>& iVector) { assert(!iVector.empty()); - std::vector<double>::iterator pos = min_element (iVector.begin(), - iVector.end()); + std::vector<double>::iterator pos = std::min_element (iVector.begin(), + iVector.end()); oMinValue = *pos; } @@ -81,7 +83,7 @@ lSD += (lElement - iMean) * (lElement - iMean); } lSD /= (lSize - 1); - oSD = sqrt(lSD); + oSD = std::sqrt (lSD); } // ///////////////////////////////////////////////////////////////////// @@ -145,8 +147,8 @@ } // ///////////////////////////////////////////////////////////////////// - static void appendAVectorToAnother (std::vector<double>& ioVector, - std::vector<double>& iVector) { + void appendAVectorToAnother (std::vector<double>& ioVector, + std::vector<double>& iVector) { ioVector.insert(ioVector.end(), iVector.begin(), iVector.end()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |