opennn_strings.h
1// OpenNN: Open Neural Networks Library
2// www.opennn.net
3//
4// O P E N N N S T R I N G S
5//
6// Artificial Intelligence Techniques, SL
7// artelnics artelnics.com
8
9#ifndef OPENNNSTRINGS_H
10#define OPENNNSTRINGS_H
11
12// System includes
13
14#include <math.h>
15#include <regex>
16#include <iostream>
17
18// Eigen includes
19
20#include "config.h"
21
22using namespace std;
23using namespace Eigen;
24
25namespace OpenNN
26{
27 Index count_tokens(const string&, const char&);
28
29 Tensor<string, 1> get_tokens(const string&, const char&);
30 void fill_tokens(const string&, const char&, Tensor<string, 1>&);
31
32 Tensor<type, 1> to_type_vector(const string&, const char&);
33
34 bool is_numeric_string(const string&);
35 bool is_date_time_string(const string&);
36 bool is_constant_numeric(const Tensor<type, 1>&);
37 bool is_constant_string(const Tensor<string, 1>&);
38
39 time_t date_to_timestamp(const string& date, const Index& gmt = 0);
40
41 bool contains_substring(const string&, const string&);
42
43 void trim(string&);
44 void erase(string&, const char&);
45
46 string get_trimmed(const string&);
47
48 string prepend(const string&, const string&);
49
50 bool has_numbers(const Tensor<string, 1>&);
51 bool has_strings(const Tensor<string, 1>&);
52
53 bool is_numeric_string_vector(const Tensor<string, 1>&);
54
55 bool is_not_numeric(const Tensor<string, 1>&);
56 bool is_mixed(const Tensor<string, 1>&);
57
58 void replace(string&, const string&, const string&);
59 void replace_substring(Tensor<string, 1>&, const string& , const string&);
60}
61
62#endif // OPENNNSTRINGS_H
Extensions to the C++ standard library.
Definition: half.hpp:2325