-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathConfig.h
More file actions
30 lines (30 loc) · 859 Bytes
/
Config.h
File metadata and controls
30 lines (30 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include "MACE.h"
#include <map>
#include <string>
#include <vector>
#include <Eigen/Dense>
#include <boost/optional.hpp>
// read configuration
class Config
{
std::string _file_path;
std::string _work_dir;
Eigen::VectorXd _des_var_lb;
Eigen::VectorXd _des_var_ub;
std::vector<std::string> _des_var_names;
std::map<std::string, double> _options;
std::string _algo;
public:
explicit Config(std::string);
void parse();
void print();
std::string work_dir() const;
const decltype(_options)& options() const;
MACE::Obj gen_obj();
MACE::Obj gen_obj(size_t num_threads);
Eigen::VectorXd lb() const;
Eigen::VectorXd ub() const;
boost::optional<double> lookup(std::string) const;
std::string algo() const { return _algo; }
};