fix parsing of negative numbers, less memory, faster
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "../ml.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <regex>
|
||||
@@ -25,11 +26,11 @@ public:
|
||||
MlValue parseCSV(const std::string &csvSource);
|
||||
|
||||
private:
|
||||
void addLine(const std::vector<std::string> &line, std::vector<std::vector<std::string> > &lines);
|
||||
void add_line(const std::vector<MlValue> &line, std::vector<MlValue> &lines);
|
||||
|
||||
MlValue ivalualize(std::vector<std::vector<std::string> > &parsed_data) const;
|
||||
MlValue ivalualize(const std::string &value) const;
|
||||
|
||||
bool is_string_int(const std::string &str) const;
|
||||
bool is_string_int(const std::string &s, long &val) const;
|
||||
|
||||
bool is_string_float(const std::string &str) const;
|
||||
bool is_string_float(const std::string &s, double &val) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user