#include <variables_information.h>
Public Member Functions | |
VariablesInformation (void) | |
VariablesInformation (const unsigned int &) | |
VariablesInformation (const unsigned int &, const unsigned int &) | |
VariablesInformation (TiXmlElement *) | |
VariablesInformation (const VariablesInformation &) | |
virtual | ~VariablesInformation (void) |
VariablesInformation & | operator= (const VariablesInformation &) |
bool | operator== (const VariablesInformation &) const |
const unsigned int & | get_variables_number (void) const |
unsigned int | count_inputs_number (void) const |
unsigned int | count_targets_number (void) const |
const Vector< unsigned int > & | get_inputs_indices (void) const |
const Vector< unsigned int > & | get_targets_indices (void) const |
const Vector< std::string > & | get_names (void) const |
const std::string & | get_name (const unsigned int &) const |
const Vector< std::string > & | get_units (void) const |
const std::string & | get_unit (const unsigned int &) const |
const Vector< std::string > & | get_descriptions (void) const |
const std::string & | get_description (const unsigned int &) const |
const bool & | get_display (void) const |
void | set (void) |
void | set (const unsigned int &) |
void | set (const unsigned int &, const unsigned int &) |
void | set (TiXmlElement *) |
void | set_variables_number (const unsigned int &) |
void | set_inputs_indices (const Vector< unsigned int > &) |
void | set_targets_indices (const Vector< unsigned int > &) |
void | set_input (void) |
void | set_target (void) |
void | set_default_indices (void) |
void | set_names (const Vector< std::string > &) |
void | set_name (const unsigned int &, const std::string &) |
void | set_units (const Vector< std::string > &) |
void | set_units (const unsigned int &, const std::string &) |
void | set_descriptions (const Vector< std::string > &) |
void | set_description (const unsigned int &, const std::string &) |
void | set_display (const bool &) |
Vector< std::string > | arrange_inputs_units (void) const |
Vector< std::string > | arrange_targets_units (void) const |
Vector< std::string > | arrange_inputs_name (void) const |
Vector< std::string > | arrange_targets_name (void) const |
Vector< std::string > | arrange_inputs_description (void) const |
Vector< std::string > | arrange_targets_description (void) const |
Vector< Vector< std::string > > | arrange_inputs_targets_information (void) const |
std::string | to_string (void) const |
TiXmlElement * | to_XML (void) const |
void | from_XML (TiXmlElement *) |
Definition at line 40 of file variables_information.h.
OpenNN::VariablesInformation::VariablesInformation | ( | void | ) | [explicit] |
Default constructor. It creates a variables information object with zero variables. It also initializes the rest of class members to their default values.
Definition at line 46 of file variables_information.cpp.
OpenNN::VariablesInformation::VariablesInformation | ( | const unsigned int & | new_variables_number | ) | [explicit] |
Variables number constructor. It creates a variables information object with a given number of variables. All the variables are set as inputs but the last, which is set as targets. It also initializes the rest of class members to their default values.
new_variables_number | Number of variables. |
Definition at line 60 of file variables_information.cpp.
OpenNN::VariablesInformation::VariablesInformation | ( | const unsigned int & | new_inputs_number, | |
const unsigned int & | new_targets_number | |||
) | [explicit] |
Variables number constructor. It creates a variables information object with a given number of input and target variables. It also initializes the rest of class members to their default values.
new_inputs_number | Number of input variables. | |
new_targets_number | Number of target variables. |
Definition at line 74 of file variables_information.cpp.
OpenNN::VariablesInformation::VariablesInformation | ( | TiXmlElement * | variables_information_element | ) | [explicit] |
XML constructor. It creates a variables information object and loads its members from a XML element.
variables_information_element | TinyXML element with the member data. |
Definition at line 85 of file variables_information.cpp.
OpenNN::VariablesInformation::VariablesInformation | ( | const VariablesInformation & | other_variables_information | ) |
Copy constructor. It creates a copy of an existing variables information object.
other_variables_information | Variables information object to be copied. |
Definition at line 97 of file variables_information.cpp.
OpenNN::VariablesInformation::~VariablesInformation | ( | void | ) | [virtual] |
VariablesInformation & OpenNN::VariablesInformation::operator= | ( | const VariablesInformation & | other_variables_information | ) |
Assignment operator. It assigns to the current object the members of an existing variables information object.
other_variables_information | Variables information object to be assigned. |
Definition at line 133 of file variables_information.cpp.
bool OpenNN::VariablesInformation::operator== | ( | const VariablesInformation & | other_variables_information | ) | const |
Equal to operator. It compares this object with another object of the same class. It returns true if the members of the two objects have the same values, and false otherwise. @ param other_variables_information Variables information object to be compared with.
Definition at line 168 of file variables_information.cpp.
const unsigned int& OpenNN::VariablesInformation::get_variables_number | ( | void | ) | const [inline] |
This method returns the total number of variables in the data set.
Definition at line 81 of file variables_information.h.
unsigned int OpenNN::VariablesInformation::count_inputs_number | ( | void | ) | const [inline] |
This method returns the number of input variables of the data set.
Definition at line 88 of file variables_information.h.
unsigned int OpenNN::VariablesInformation::count_targets_number | ( | void | ) | const [inline] |
This method returns the number of target variables of the data set.
Definition at line 95 of file variables_information.h.
const Vector< unsigned int > & OpenNN::VariablesInformation::get_inputs_indices | ( | void | ) | const |
This method returns the indices of the input variables.
Definition at line 194 of file variables_information.cpp.
const Vector< unsigned int > & OpenNN::VariablesInformation::get_targets_indices | ( | void | ) | const |
This method returns the indices of the target variables.
Definition at line 204 of file variables_information.cpp.
const Vector< std::string > & OpenNN::VariablesInformation::get_names | ( | void | ) | const |
This method returns the names of all the variables in the data set.
Definition at line 214 of file variables_information.cpp.
const std::string & OpenNN::VariablesInformation::get_name | ( | const unsigned int & | i | ) | const |
This method returns the name of a single variable in the data set.
i | Index of variable. |
Definition at line 225 of file variables_information.cpp.
const Vector< std::string > & OpenNN::VariablesInformation::get_units | ( | void | ) | const |
This method returns the units of all the variables in the data set.
Definition at line 300 of file variables_information.cpp.
const std::string & OpenNN::VariablesInformation::get_unit | ( | const unsigned int & | i | ) | const |
This method returns the units of a single variable in the data set.
i | Index of variable. |
Definition at line 311 of file variables_information.cpp.
const Vector< std::string > & OpenNN::VariablesInformation::get_descriptions | ( | void | ) | const |
This method returns the description of all the variables in the data set.
Definition at line 398 of file variables_information.cpp.
const std::string & OpenNN::VariablesInformation::get_description | ( | const unsigned int & | i | ) | const |
This method returns the description of a single variable in the data set.
i | Index of variable. |
Definition at line 409 of file variables_information.cpp.
const bool & OpenNN::VariablesInformation::get_display | ( | void | ) | const |
This method returns true if messages from this class can be displayed on the screen, or false if messages from this class can't be displayed on the screen.
Definition at line 588 of file variables_information.cpp.
void OpenNN::VariablesInformation::set | ( | void | ) |
This method sets a variables information object with zero variables.
Definition at line 598 of file variables_information.cpp.
void OpenNN::VariablesInformation::set | ( | const unsigned int & | new_variables_number | ) |
This method sets a new number of variables in the current object. All the variables are set as inputs, but the last one, wich is set as targets.
new_variables_number | Number of variables. |
Definition at line 612 of file variables_information.cpp.
void OpenNN::VariablesInformation::set | ( | const unsigned int & | inputs_number, | |
const unsigned int & | targets_number | |||
) |
This method sets new numbers of of inputs and target variables in the current object. The total number of variables is the number of inputs plus the number of targets. The first variables are set as inputs, and last ones are set as targets.
inputs_number | Number of input variables. | |
targets_number | Number of target variables. |
Definition at line 628 of file variables_information.cpp.
void OpenNN::VariablesInformation::set | ( | TiXmlElement * | variables_information_element | ) |
This method sets the variables information members from a XML element.
variables_information_element | Pointer to a Tiny XML element containing the member data. |
Definition at line 646 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_variables_number | ( | const unsigned int & | new_variables_number | ) |
This method sets a new number of variables in the variables information object. All variables are set as inputs but the last one, which is set as targets.
new_variables_number | Number of variables. |
Definition at line 957 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_inputs_indices | ( | const Vector< unsigned int > & | new_inputs_indices | ) |
This method sets new indices for the input variables from a vector of integers. The size of that vector is the number of input variables. This method does not check for repeated indices.
new_inputs_indices | Indices of input variables. |
Definition at line 659 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_targets_indices | ( | const Vector< unsigned int > & | new_targets_indices | ) |
This method sets new indices for the target variables from a vector of integers. The size of that vector is the number of target variables. This method does not check for repeated indices.
new_targets_indices | Indices of target variables. |
Definition at line 672 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_input | ( | void | ) |
This method sets all the variables in the data set as input variables.
Definition at line 682 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_target | ( | void | ) |
This method sets all the variables in the data set as target variables.
Definition at line 694 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_default_indices | ( | void | ) |
This method sets the default indices for the input and target variables:
Definition at line 710 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_names | ( | const Vector< std::string > & | new_names | ) |
This method sets new names for the variables in the data set from a vector of strings. The size of that vector must be equal to the total number of variables.
new_names | Name of variables. |
Definition at line 727 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_name | ( | const unsigned int & | i, | |
const std::string & | new_name | |||
) |
This method set the name of a single variable. If the vector of names is zero the rest of elements are initialized as empty strings.
i | Index of variable. | |
new_name | Name of variable. |
Definition at line 761 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_units | ( | const Vector< std::string > & | new_units | ) |
This method sets new units for the variables in the data set from a vector of strings. The size of that vector must be equal to the total number of variables.
new_units | Units of variables. |
Definition at line 800 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_units | ( | const unsigned int & | i, | |
const std::string & | new_units | |||
) |
This method set the units of a single variable. If the vector of units is zero the rest of elements are initialized as empty strings.
i | Index of variable. | |
new_units | Units of variable. |
Definition at line 834 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_descriptions | ( | const Vector< std::string > & | new_descriptions | ) |
This method sets new descriptions for the variables in the data set from a vector of strings. The size of that vector must be equal to the total number of variables.
new_descriptions | Description of variables. |
Definition at line 872 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_description | ( | const unsigned int & | i, | |
const std::string & | new_description | |||
) |
This method set the description of a single variable. If the vector of descriptions is zero the rest of elements are initialized as empty strings.
i | Index of variable. | |
new_description | Description of variable. |
Definition at line 906 of file variables_information.cpp.
void OpenNN::VariablesInformation::set_display | ( | const bool & | new_display | ) |
This method sets a new display value. If it is set to true messages from this class are to be displayed on the screen; if it is set to false messages from this class are not to be displayed on the screen.
new_display | Display value. |
Definition at line 945 of file variables_information.cpp.
Vector< std::string > OpenNN::VariablesInformation::arrange_inputs_units | ( | void | ) | const |
This method returns the units of the input variables in the data set.
Definition at line 340 of file variables_information.cpp.
Vector< std::string > OpenNN::VariablesInformation::arrange_targets_units | ( | void | ) | const |
This method returns the units of the target variables in the data set.
Definition at line 369 of file variables_information.cpp.
Vector< std::string > OpenNN::VariablesInformation::arrange_inputs_name | ( | void | ) | const |
This method returns the names of the input variables in the data set.
Definition at line 254 of file variables_information.cpp.
Vector< std::string > OpenNN::VariablesInformation::arrange_targets_name | ( | void | ) | const |
This method returns the names of the target variables in the data set.
Definition at line 277 of file variables_information.cpp.
Vector< std::string > OpenNN::VariablesInformation::arrange_inputs_description | ( | void | ) | const |
This method returns the description of the input variables in the data set.
Definition at line 438 of file variables_information.cpp.
Vector< std::string > OpenNN::VariablesInformation::arrange_targets_description | ( | void | ) | const |
This method returns the description of the target variables in the data set.
Definition at line 466 of file variables_information.cpp.
Vector< Vector< std::string > > OpenNN::VariablesInformation::arrange_inputs_targets_information | ( | void | ) | const |
This method returns a vector of vectors with the inputs and target variables information. The size of this vector is six. The contents of each element are:
Definition at line 505 of file variables_information.cpp.
std::string OpenNN::VariablesInformation::to_string | ( | void | ) | const |
This method returns a string representation of the current variables information object.
Definition at line 989 of file variables_information.cpp.
TiXmlElement * OpenNN::VariablesInformation::to_XML | ( | void | ) | const |
This method serializes the variables information object into a XML element of the TinyXML library. See the OpenNN manual for more information about the format of this element.
Definition at line 1030 of file variables_information.cpp.
void OpenNN::VariablesInformation::from_XML | ( | TiXmlElement * | variables_information_element | ) |
This method deserializes a TinyXML element into this variables information object.
variables_information_element | Pointer to a XML element containing the member data. |
Definition at line 1145 of file variables_information.cpp.