Skip to content
Snippets Groups Projects
Commit 5ee4fe61 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Add option for InputParser to not need all lists defined in the input file

If a key is not in the file just return and empty vector
parent 85fd624d
Branches
No related tags found
No related merge requests found
......@@ -118,6 +118,9 @@ template <typename T>
std::vector<T> as_vector(pt::ptree const &pt, pt::ptree::key_type const &key)
{
std::vector<T> r;
if(pt.count(key) == 0)
return r;
for (auto& item : pt.get_child(key))
r.push_back(item.second.get_value<T>());
return r;
......
......@@ -10,6 +10,5 @@
"n_models_store": 1,
"leave_out_inds": [0, 1, 2, 60, 61],
"opset": ["add", "sub", "abs_diff", "mult", "div", "inv", "abs", "exp", "log", "sin", "cos", "sq", "cb", "six_pow", "sqrt", "cbrt", "neg_exp"],
"param_opset": [],
"fix_intercept": false
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment