GEGELATI
parametersParser.h
1
37#ifndef PARAMETERS_PARSER_H
38#define PARAMETERS_PARSER_H
39
40#include <string>
41
42#include "learn/learningParameters.h"
43
47namespace Json {
48 class Value;
49}
50
51namespace File {
56 namespace ParametersParser {
69 void loadParametersFromJson(const char* path,
71
76 void writeParametersToJson(const char* path,
77 const Learn::LearningParameters& params);
78
96 const std::string& param,
97 Json::Value const& value);
98
110 void setAllParamsFrom(const Json::Value& root,
112
129 void readConfigFile(const char* path, Json::Value& root);
130 } // namespace ParametersParser
131} // namespace File
132
133#endif
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:100
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:229
void setAllParamsFrom(const Json::Value &root, Learn::LearningParameters &params)
Puts the parameters described in the derivative tree root in given LearningParameters.
Definition: parametersParser.cpp:64
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:238
void readConfigFile(const char *path, Json::Value &root)
Reads a given json file and puts the derivative tree in root.
Definition: parametersParser.cpp:44
Definition: parametersParser.h:51
Definition: parametersParser.h:47
Structure for simplifying the transmission of LearningParameters to functions.
Definition: learningParameters.h:53