#include <plug_in.h>
Public Types | |
enum | InputMethod { IndependentParametersInput } |
Public Member Functions | |
PlugIn (void) | |
PlugIn (TiXmlElement *) | |
virtual | ~PlugIn (void) |
PlugIn & | operator= (const PlugIn &) |
bool | operator== (const PlugIn &) const |
const InputMethod & | get_input_method (void) const |
std::string | write_input_method (void) const |
const std::string & | get_template_filename (void) const |
const std::string & | get_input_filename (void) const |
const std::string & | get_script_filename (void) const |
const std::string & | get_output_filename (void) const |
const Vector< std::string > & | get_input_flags (void) const |
const std::string & | get_input_flag (const unsigned int &) const |
void | set_default (void) |
void | set_input_method (const InputMethod &) |
void | set_input_method (const std::string &) |
void | set_template_filename (const std::string &) |
void | set_input_filename (const std::string &) |
void | set_script_filename (const std::string &) |
void | set_output_filename (const std::string &) |
void | set_input_flags (const Vector< std::string > &) |
void | write_input_file (const NeuralNetwork &) const |
void | write_input_file_independent_parameters (const NeuralNetwork &) const |
void | run_script (void) const |
Matrix< double > | read_output_file (void) const |
Matrix< double > | read_output_file_header (void) const |
Matrix< double > | calculate_solutions (const NeuralNetwork &) const |
std::string | to_string (void) const |
TiXmlElement * | to_XML (void) const |
void | from_XML (TiXmlElement *) |
Definition at line 35 of file plug_in.h.
OpenNN::PlugIn::PlugIn | ( | void | ) | [explicit] |
Default constructor. It constructs a default plug-in object, with zero independent and dependent variables.
Definition at line 42 of file plug_in.cpp.
OpenNN::PlugIn::PlugIn | ( | TiXmlElement * | plug_in_element | ) | [explicit] |
XML constructor. It creates a plug-in and loads its members from a Tiny XML element.
plug_in_element | Pointer to a XML element containing the plug-in members. |
Definition at line 54 of file plug_in.cpp.
OpenNN::PlugIn::~PlugIn | ( | void | ) | [virtual] |
Destructor. It does not delete any object.
Definition at line 65 of file plug_in.cpp.
Assignment operator. It assigns to this object the members of an existing plug-in object.
other_plug_in | Plug-in object to be assigned. |
Definition at line 78 of file plug_in.cpp.
bool OpenNN::PlugIn::operator== | ( | const PlugIn & | other_plug_in | ) | 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_plug_in Plug-in to be compared with.
Definition at line 110 of file plug_in.cpp.
const PlugIn::InputMethod & OpenNN::PlugIn::get_input_method | ( | void | ) | const |
This method returns the method for including the information into the input file.
Definition at line 136 of file plug_in.cpp.
std::string OpenNN::PlugIn::write_input_method | ( | void | ) | const |
This method returns a string with the name of the method for including the information into the input file.
Definition at line 146 of file plug_in.cpp.
const std::string & OpenNN::PlugIn::get_template_filename | ( | void | ) | const |
const std::string & OpenNN::PlugIn::get_input_filename | ( | void | ) | const |
const std::string & OpenNN::PlugIn::get_script_filename | ( | void | ) | const |
const std::string & OpenNN::PlugIn::get_output_filename | ( | void | ) | const |
const Vector< std::string > & OpenNN::PlugIn::get_input_flags | ( | void | ) | const |
const std::string & OpenNN::PlugIn::get_input_flag | ( | const unsigned int & | i | ) | const |
This method returns a single input file flag.
i | Index of flag. |
Definition at line 226 of file plug_in.cpp.
void OpenNN::PlugIn::set_default | ( | void | ) | [virtual] |
This method sets the following default values in this object:
Reimplemented from OpenNN::MathematicalModel.
Definition at line 243 of file plug_in.cpp.
void OpenNN::PlugIn::set_input_method | ( | const InputMethod & | new_input_method | ) |
This method sets the method for writting the input file.
new_input_method | Method for inputing the input file. |
Definition at line 263 of file plug_in.cpp.
void OpenNN::PlugIn::set_input_method | ( | const std::string & | new_input_method | ) |
This method sets the method for writting the input file from a string.
new_input_method | Method for inputing the input file. |
Definition at line 274 of file plug_in.cpp.
void OpenNN::PlugIn::set_template_filename | ( | const std::string & | new_template_filename | ) |
This method sets the name of the template file.
new_template_filename | Name of template file. |
Definition at line 298 of file plug_in.cpp.
void OpenNN::PlugIn::set_input_filename | ( | const std::string & | new_input_filename | ) |
This method sets the name of the input file.
new_input_filename | Name of input file. |
Definition at line 309 of file plug_in.cpp.
void OpenNN::PlugIn::set_script_filename | ( | const std::string & | new_script_filename | ) |
This method sets the name of the script file.
new_script_filename | Name of script file. |
Definition at line 320 of file plug_in.cpp.
void OpenNN::PlugIn::set_output_filename | ( | const std::string & | new_output_filename | ) |
This method sets the name of the output file.
new_output_filename | Name of output file. |
Definition at line 331 of file plug_in.cpp.
void OpenNN::PlugIn::set_input_flags | ( | const Vector< std::string > & | new_input_flags | ) |
This method sets the flags in the input file.
new_input_flags | Flags strings. |
Definition at line 342 of file plug_in.cpp.
void OpenNN::PlugIn::write_input_file | ( | const NeuralNetwork & | neural_network | ) | const |
Thise method writes the input file with values obtained from the neural network.
neural_network | Neural network. |
Definition at line 353 of file plug_in.cpp.
void OpenNN::PlugIn::write_input_file_independent_parameters | ( | const NeuralNetwork & | neural_network | ) | const |
void OpenNN::PlugIn::run_script | ( | void | ) | const |
This method runs the script needed for executing the mathematical model.
Definition at line 484 of file plug_in.cpp.
Matrix< double > OpenNN::PlugIn::read_output_file | ( | void | ) | const |
This method reads the output file from the mathematical model. Here the output file only contains a data matrix.
Definition at line 508 of file plug_in.cpp.
Matrix< double > OpenNN::PlugIn::read_output_file_header | ( | void | ) | const |
This method reads the output file from the mathematical model. Here the output file contains a header file and a data matrix.
Definition at line 521 of file plug_in.cpp.
Matrix< double > OpenNN::PlugIn::calculate_solutions | ( | const NeuralNetwork & | neural_network | ) | const [virtual] |
This method returns the solutions to the mathematical model. which are given by the independent and the dependent variables. The process is as follows:
Reimplemented from OpenNN::MathematicalModel.
Definition at line 562 of file plug_in.cpp.
std::string OpenNN::PlugIn::to_string | ( | void | ) | const [virtual] |
This method returns a string representation of the current plug-in object.
Reimplemented from OpenNN::MathematicalModel.
Definition at line 576 of file plug_in.cpp.
TiXmlElement * OpenNN::PlugIn::to_XML | ( | void | ) | const [virtual] |
This method serializes the plug-in object into a XML element of the TinyXML library. See the OpenNN manual for more information about the format of this element.
Reimplemented from OpenNN::MathematicalModel.
Definition at line 602 of file plug_in.cpp.
void OpenNN::PlugIn::from_XML | ( | TiXmlElement * | plug_in_element | ) | [virtual] |
This method deserializes a TinyXML element into this plug-in object.
plug_in_element | Pointer to a XML element containing the member data. |
Reimplemented from OpenNN::MathematicalModel.
Definition at line 749 of file plug_in.cpp.