14 #ifndef __CONDITIONSLAYER_H__
15 #define __CONDITIONSLAYER_H__
33 #include "../tinyxml2/tinyxml2.h"
79 enum ConditionsMethod{NoConditions, OneCondition, TwoConditions, UserConditionsMethod};
100 void set(
const size_t&,
const size_t&);
123 void check(
void)
const;
190 tinyxml2::XMLDocument*
to_XML(
void)
const;
191 void from_XML(
const tinyxml2::XMLDocument&);
void set_external_input_values(const Vector< double > &)
const size_t & get_external_inputs_number(void) const
Returns the number of external inputs.
Matrix< double > calculate_Jacobian(const Vector< double > &, const Vector< double > &, const Matrix< double > &) const
std::string write_two_conditions_particular_solution_expression(const Vector< std::string > &, const Vector< std::string > &) const
void set_default(void)
Sets the members of this conditions layer object to their default values.
const double & get_output_value(const size_t &, const size_t &) const
Vector< Matrix< double > > calculate_Hessian_form(const Vector< double > &, const Vector< double > &) const
std::string write_expression(const Vector< std::string > &, const Vector< std::string > &, const Vector< std::string > &) const
Vector< double > calculate_outputs(const Vector< double > &, const Vector< double > &) const
void set_conditions_neurons_number(const size_t &)
Vector< double > calculate_two_conditions_particular_solution(const Vector< double > &) const
const size_t & get_conditions_neurons_number(void) const
Returns the number of conditions neurons.
void set_external_inputs_number(const size_t &)
Vector< Matrix< double > > calculate_one_condition_homogeneous_solution_Hessian_form(const Vector< double > &) const
Vector< double > calculate_two_conditions_homogeneous_solution(const Vector< double > &) const
void set_output_values(const Matrix< double > &)
void set_display(const bool &)
bool operator==(const ConditionsLayer &) const
Vector< Matrix< double > > calculate_two_conditions_homogeneous_solution_Hessian_form(const Vector< double > &) const
Computes the homogeneous solution Hessian form for the two boundary conditions case.
const Vector< double > & get_external_input_values(void) const
Returns the input values for the conditions.
Vector< double > external_input_values
Independent values of the conditions.
virtual std::string write_particular_solution_expression(const Vector< std::string > &, const Vector< std::string > &) const
Vector< double > calculate_one_condition_homogeneous_solution(const Vector< double > &) const
void set_conditions_method(const ConditionsMethod &)
const ConditionsMethod & get_conditions_method(void) const
const bool & get_display(void) const
virtual ~ConditionsLayer(void)
Destructor.
virtual Matrix< double > calculate_homogeneous_solution_Jacobian(const Vector< double > &) const
Returns the homogeneous solution Jacobian for applying boundary conditions.
ConditionsLayer & operator=(const ConditionsLayer &)
size_t external_inputs_number
std::string write_two_conditions_homogeneous_solution_expression(const Vector< std::string > &, const Vector< std::string > &) const
tinyxml2::XMLDocument * to_XML(void) const
Serializes the conditions layer object into a document of the TinyXML library.
std::string write_one_condition_particular_solution_expression(const Vector< std::string > &, const Vector< std::string > &) const
std::string write_output_expression(const Vector< std::string > &, const Vector< std::string > &, const Vector< std::string > &, const Vector< std::string > &) const
Matrix< double > calculate_one_condition_homogeneous_solution_Jacobian(const Vector< double > &) const
Computes the homogeneous solution Jacobian for the one boundary condition case.
std::string to_string(void) const
Returns a string representation of the current conditions layer object.
void initialize_random(void)
virtual Vector< double > calculate_homogeneous_solution(const Vector< double > &) const
Returns the homogeneous solution for applying boundary conditions.
Matrix< double > calculate_one_condition_particular_solution_Jacobian(const Vector< double > &) const
Computes the Jacobian of the particular solution function for the one boundary condition case...
void from_XML(const tinyxml2::XMLDocument &)
Matrix< double > output_values
Dependent values of the conditions.
Vector< Matrix< double > > calculate_one_condition_particular_solution_Hessian_form(const Vector< double > &) const
void set_external_input_value(const size_t &, const double &)
virtual Vector< double > calculate_particular_solution(const Vector< double > &) const
Returns the particular solution for applying boundary conditions.
virtual std::string write_homogeneous_solution_expression(const Vector< std::string > &, const Vector< std::string > &) const
Vector< Matrix< double > > calculate_two_conditions_particular_solution_Hessian_form(const Vector< double > &) const
size_t conditions_neurons_number
ConditionsMethod conditions_method
Conditions method (one or two conditions).
Matrix< double > calculate_two_conditions_homogeneous_solution_Jacobian(const Vector< double > &) const
ConditionsMethod
Enumeration of available methods for applying conditions.
void set_output_value(const size_t &, const size_t &, const double &)
std::string write_one_condition_homogeneous_solution_expression(const Vector< std::string > &, const Vector< std::string > &) const
std::string write_conditions_method(void) const
const double & get_external_input_value(const size_t &) const
void check(void) const
Checks that all the members of the conditions layer are correct before calculating the outputs from t...
Vector< double > calculate_one_condition_particular_solution(const Vector< double > &) const
virtual Vector< Matrix< double > > calculate_particular_solution_Hessian_form(const Vector< double > &) const
virtual Matrix< double > calculate_particular_solution_Jacobian(const Vector< double > &) const
Returns the particular solution Jacobian for applying boundary conditions.
virtual Vector< Matrix< double > > calculate_homogeneous_solution_Hessian_form(const Vector< double > &) const
Matrix< double > calculate_two_conditions_particular_solution_Jacobian(const Vector< double > &) const
bool display
Display messages to screen.
const Matrix< double > & get_output_values(void) const
Returns the output values for the conditions.