LydiaSyft
Syft::InputOutputPartition Class Reference

A partition of variables into input and output variables. More...

#include <InputOutputPartition.h>

Public Member Functions

 InputOutputPartition ()
 Creates a partition with no variables.
 
bool is_input (const std::string &var_name)
 check if a variable is an input variable
 
bool is_output (const std::string &var_name)
 check if a variable is an output variable
 

Static Public Member Functions

static InputOutputPartition read_from_file (const std::string &filename)
 Constructs a partition from a file. More...
 
static InputOutputPartition construct_from_input (const std::vector< std::string > inputs_substr, std::vector< std::string > outputs_substr)
 Constructs a partition from inputs. More...
 

Public Attributes

std::vector< std::string > input_variables
 
std::vector< std::string > output_variables
 

Detailed Description

A partition of variables into input and output variables.

Member Function Documentation

◆ construct_from_input()

InputOutputPartition Syft::InputOutputPartition::construct_from_input ( const std::vector< std::string >  inputs_substr,
std::vector< std::string >  outputs_substr 
)
static

Constructs a partition from inputs.

Parameters
inputs_substrA string vector of input variables.
outputs_substrA string vector of output variables.
Returns
A partition with the input and output variables listed in the file

◆ read_from_file()

InputOutputPartition Syft::InputOutputPartition::read_from_file ( const std::string &  filename)
static

Constructs a partition from a file.

The file should look like .inputs: X1 X2 X3 X4 .outputs: Y1 Y2 Y3

Parameters
filenameThe name of the partition file.
Returns
A partition with the input and output variables listed in the file

The documentation for this class was generated from the following files: