comparison include/utils.hpp @ 70:a52653dca25d

got track features to compile, updated paths to headers and libraries for OpenCV 2
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sat, 13 Nov 2010 11:20:10 -0500
parents ef0d7caf8e91
children b32947b002da
comparison
equal deleted inserted replaced
69:cc192d0450b3 70:a52653dca25d
1 #ifndef UTILS_HPP 1 #ifndef UTILS_HPP
2 #define UTILS_HPP 2 #define UTILS_HPP
3 3
4 #include <iofwd> 4 #include <iosfwd>
5 5
6 static const double pi = 3.14159265358979323846; 6 static const double pi = 3.14159265358979323846;
7 7
8 /** Opens file for writing with fixed scientific precision. */ 8 /** Opens file for writing with fixed scientific precision. */
9 void openWriteScientific(ofstream& out, const string& filename, const int& precision); 9 void openWriteScientificPrecision(std::ofstream& out, const std::string& filename, const int& precision);
10 10
11 void openWritePrecision(ofstream& out, const string& filename, const int& precision); 11 void openWritePrecision(std::ofstream& out, const std::string& filename, const int& precision);
12 12
13 /** Opens files and checks how it went. */ 13 /** Opens files and checks how it went. */
14 bool openCheck(ifstream& f, const string& filename, const string& callingFunctionName); 14 bool openCheck(std::ifstream& f, const std::string& filename, const std::string& callingFunctionName);
15 bool openCheck(ofstream& f, const string& filename, const string& callingFunctionName); 15 bool openCheck(std::ofstream& f, const std::string& filename, const std::string& callingFunctionName);
16 16
17 17
18 // inline 18 // inline
19 19
20 inline double square(const int& a) { return a*a;} 20 inline double square(const int& a) { return a*a;}