Tools.cpp File Reference
see Tools.h
More...
Functions |
| double | roundDecimal (double toRound, unsigned short places) |
| std::pair< double, double > | stDev (const std::vector< double > &vec) |
std::pair< long double, long
double > | stDevLD (const std::vector< long double > &vec) |
| size_t | splitFrom (std::string str, std::string delimiters, std::vector< std::string > &v) |
| std::string | dateToString () |
| std::string | padSpaces (const std::string &toPad, const size_t &pads) |
Detailed Description
see Tools.h
- Author:
- Marek Ostaszewski <Marek.Ostaszewski@uni.lu> Sebastien Varrette <Sebastien.Varrette@imag.fr>
- Date:
- Thu Jan 11 2008
Copyright (c) 2008 Marek Ostaszewski, Sebastien Varrette (see COPYING)
Function Documentation
| std::string dateToString |
( |
|
) |
|
| std::string padSpaces |
( |
const std::string & |
toPad, |
|
|
const size_t & |
pads | |
|
) |
| | |
| double roundDecimal |
( |
double |
toRound, |
|
|
unsigned short |
places | |
|
) |
| | |
| size_t splitFrom |
( |
std::string |
s, |
|
|
std::string |
sep, |
|
|
std::vector< std::string > & |
v | |
|
) |
| | |
Split the string s, using a list of separators specified in sep. The result is stored in the vector v.
- Parameters:
-
| s | the string to split |
| sep | list of separators to consider, " ." for instance to consider ' ' and '.' as separators |
| v | the vectors containing the result of the split |
- Returns:
- number of elements in v
| std::pair<double,double> stDev |
( |
const std::vector< double > & |
vec |
) |
|
| std::pair<long double,long double> stDevLD |
( |
const std::vector< long double > & |
vec |
) |
|