LydiaSyft
InputOutputPartition.h
1 #ifndef INPUT_OUTPUT_PARTITION_H
2 #define INPUT_OUTPUT_PARTITION_H
3 
4 #include <stdexcept>
5 #include <vector>
6 
7 namespace Syft {
8 
13 private:
14 
15  static std::runtime_error bad_file_format_exception(std::size_t line_number);
16 
17 public:
18 
19  std::vector<std::string> input_variables;
20  std::vector<std::string> output_variables;
21 
26 
30  bool is_input(const std::string& var_name);
31 
35  bool is_output(const std::string& var_name);
36 
47  static InputOutputPartition read_from_file(const std::string& filename);
48 
57  static InputOutputPartition construct_from_input(const std::vector<std::string> inputs_substr, std::vector<std::string> outputs_substr);
58 };
59 
60 }
61 
62 #endif // INPUT_OUTPUT_PARTITION_H
A partition of variables into input and output variables.
Definition: InputOutputPartition.h:12
bool is_input(const std::string &var_name)
check if a variable is an input variable
Definition: InputOutputPartition.cpp:64
InputOutputPartition()
Creates a partition with no variables.
Definition: InputOutputPartition.cpp:17
static InputOutputPartition construct_from_input(const std::vector< std::string > inputs_substr, std::vector< std::string > outputs_substr)
Constructs a partition from inputs.
Definition: InputOutputPartition.cpp:56
bool is_output(const std::string &var_name)
check if a variable is an output variable
Definition: InputOutputPartition.cpp:68
static InputOutputPartition read_from_file(const std::string &filename)
Constructs a partition from a file.
Definition: InputOutputPartition.cpp:20