|
Fuzzy Logic Tools v1.0
|
S Membership function. More...
#include <membership.hpp>


Public Member Functions | |
| double | eval (double x) const |
| Evaluates the Membership function. | |
| double | evalder (double x) const |
Evaluates the derivative of the Membership function with respect to x, . | |
| double | paramder (size_t parameter, double x) const |
Evaluates the derivative of the Membership function with respect to a parameter, . | |
| Smf (double a=0.05, double b=0.45) | |
| virtual int | test (void) const |
| This function checks parameters in the Membership function, and corrects them if possible. | |
| size_t | num_params (void) const |
| Reads the number of parameters that define the Membership function. | |
| TYPE_MF | type (void) const |
| Returns the type of Membership function. | |
| int | type (TYPE_MF type_mf) |
| Changes the Membership function type. | |
| int | edit (size_t index, double value) |
| Changes a parameter. | |
| void | edit (const double *const parameters) |
| Changes the vector of parameters. | |
| double | read (size_t index) const |
| Reads a parameter of the Membership function. | |
| TNT::Array1D< double > | read (void) const |
| Returns the vector of parameters. | |
Protected Attributes | |
| double * | param |
| Vector of parameters that define the Membership function. | |
| size_t | n |
| Number of parameters of the Membership function. | |
| TYPE_MF | type_mf |
| Type of Membership function. | |
| int Membership::edit | ( | size_t | index, |
| double | value | ||
| ) | [inherited] |
Changes a parameter.
| void Membership::edit | ( | const double *const | parameters | ) | [inherited] |
Changes the vector of parameters.
| double Smf::eval | ( | double | x | ) | const [virtual] |
Evaluates the Membership function.
Implements FLT::Membership.
| double Smf::evalder | ( | double | x | ) | const [virtual] |
Evaluates the derivative of the Membership function with respect to x,
.
Implements FLT::Membership.
| size_t Membership::num_params | ( | void | ) | const [inherited] |
Reads the number of parameters that define the Membership function.
We recommend using this function instead of the constant FLT::MF_PARAM_NUMBER, since it is possible to create Membership functions with a variable number of parameters.
| double Smf::paramder | ( | size_t | parameter, |
| double | x | ||
| ) | const [virtual] |
Evaluates the derivative of the Membership function with respect to a parameter,
.
Implements FLT::Membership.
| double Membership::read | ( | size_t | index | ) | const [inherited] |
Reads a parameter of the Membership function.
index is greater than the number of function parameters, an error is sent to the standard error stream and return 0. | int Membership::test | ( | void | ) | const [virtual, inherited] |
This function checks parameters in the Membership function, and corrects them if possible.
Reimplemented in FLT::Gaussmf, FLT::Gauss2mf, FLT::GBellmf, FLT::Trapmf, and FLT::Trimf.
| int Membership::type | ( | TYPE_MF | type_mf | ) | [inherited] |
Changes the Membership function type.
| TYPE_MF Membership::type | ( | void | ) | const [inherited] |
Returns the type of Membership function.
The type of Membership function is represented with the enumeration FLT::TYPE_MF.
1.7.4