GEGELATI

Loading...
Searching...
No Matches
parametersParser.h
1
37#ifndef PARAMETERS_PARSER_H
38#define PARAMETERS_PARSER_H
39
40#include <string>
41
42#include "learn/learningParameters.h"
43
47 namespace Json {
48 class Value;
49}
50
51 namespace File {
56 namespace ParametersParser {
69 void loadParametersFromJson(const char* path,
70 Learn::LearningParameters& params);
71
76 void writeParametersToJson(const char* path,
77 const Learn::LearningParameters& params);
78
95 void setParameterFromString(Learn::LearningParameters& params,
96 const std::string& param,
97 Json::Value const& value);
98
110 void setAllParamsFrom(const Json::Value& root,
111 Learn::LearningParameters& params);
112
129 void readConfigFile(const char* path, Json::Value& root);
130 } // namespace ParametersParser
131} // namespace File
132
133#endif
File::ParametersParser::setParameterFromString
void setParameterFromString(Learn::LearningParameters &params, const std::string &param, Json::Value const &value)
Given a parameter name, sets its value in given LearningParameters.
Definition parametersParser.cpp:101
File::ParametersParser::loadParametersFromJson
void loadParametersFromJson(const char *path, Learn::LearningParameters &params)
Loads a given json file and fills the parameters it contains in given LearningParameters.
Definition parametersParser.cpp:312
File::ParametersParser::setAllParamsFrom
void setAllParamsFrom(const Json::Value &root, Learn::LearningParameters &params)
Puts the parameters described in the derivative tree root in given LearningParameters.
Definition parametersParser.cpp:65
File::ParametersParser::writeParametersToJson
void writeParametersToJson(const char *path, const Learn::LearningParameters &params)
Write the LearningParameters given as arguments into the file at the given path, using the JSON forma...
Definition parametersParser.cpp:321
File::ParametersParser::readConfigFile
void readConfigFile(const char *path, Json::Value &root)
Reads a given json file and puts the derivative tree in root.
Definition parametersParser.cpp:45
File
Definition parametersParser.h:51
Json
Definition parametersParser.h:47
Learn::LearningParameters
Structure for simplifying the transmission of LearningParameters to functions.
Definition learningParameters.h:54