#include <vector>
#include <cstring>
#include <string>
#include <sstream>
#include <iterator>
#include <ctime>
Go to the source code of this file.
|
| | mltk |
| | UFJF-MLTK main namespace for core functionalities.
|
| |
|
|
#define | PRECISION 1E-9 |
| |
|
#define | MAX_NUMBER_STRING_SIZE 32 |
| |
|
#define | INF 1E8 |
| |
|
|
typedef std::vector< std::vector< double > > | mltk::dMatrix |
| |
|
| enum | NormType { NORM_LINF = 0
, NORM_L1 = 1
, NORM_L2 = 2
} |
| |
|
|
void | mltk::utils::printConfusionMatrix (const std::vector< int > &classes, const std::vector< std::string > &classes_names, const std::vector< std::vector< size_t > > &confusion_m, bool show_names=false) |
| |
| bool | mltk::utils::is_number (std::string str) |
| | Verify if the string is a number. More...
|
| |
| int | mltk::utils::stoin (std::string str) |
| | Converts the string to an integer. More...
|
| |
| double | mltk::utils::atod (const char *str) |
| | Converts the string to a double. More...
|
| |
| std::string | mltk::utils::itos (int n) |
| | itos Integer to string conversion. More...
|
| |
| std::string | mltk::utils::dtoa (double n) |
| | dtoa Double to string conversion. More...
|
| |
|
std::vector< std::string > | mltk::utils::tokenize (const std::string &str, const char delim) |
| |
|
std::string | mltk::utils::timestamp () |
| |
Utils functions
- Author
- Mateus Coutinho Marim
◆ atod()
| double mltk::utils::atod |
( |
const char * |
str | ) |
|
Converts the string to a double.
- Parameters
-
| str | The string to be converted. |
- Returns
- The double resulted from the conversion.
◆ dtoa()
| std::string mltk::utils::dtoa |
( |
double |
n | ) |
|
dtoa Double to string conversion.
- Parameters
-
- Returns
- string
◆ is_number()
| bool mltk::utils::is_number |
( |
std::string |
str | ) |
|
Verify if the string is a number.
- Parameters
-
- Returns
- bool
◆ itos()
| std::string mltk::utils::itos |
( |
int |
n | ) |
|
itos Integer to string conversion.
- Parameters
-
| n | Integer to be converted. |
- Returns
- string
◆ stoin()
| int mltk::utils::stoin |
( |
std::string |
str | ) |
|
Converts the string to an integer.
- Parameters
-
| str | String to be converted. |
- Returns
- The integer resulted from the conversion.