Fuzzy Logic Tools v1.0
Public Member Functions | Protected Attributes
FLT::Zmf Class Reference

Z Membership function. More...

#include <membership.hpp>

Inheritance diagram for FLT::Zmf:
Inheritance graph
[legend]
Collaboration diagram for FLT::Zmf:
Collaboration graph
[legend]

List of all members.

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, $ d\mu(x) / dx $.
double paramder (size_t parameter, double x) const
 Evaluates the derivative of the Membership function with respect to a parameter, $ d\mu(x) / dparam $.
 Zmf (double a=0.55, double b=0.95)
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.

Detailed Description

Z Membership function.

Zmf is a Z Membership function with 2 parameters.

zmf.png

Member Function Documentation

int Membership::edit ( size_t  index,
double  value 
) [inherited]

Changes a parameter.

Returns:
Returns 0 if no errors occurred.
An error means the index value is greater than the number of function parameters.
Note:
The parameter value is not checked. If you want to check it, you must use Membership::test method.
void Membership::edit ( const double *const  parameters) [inherited]

Changes the vector of parameters.

Note:
The values of the parameters are not checked. If you want to check it, you must use Membership::test method.
double Zmf::eval ( double  x) const [virtual]

Evaluates the Membership function.

Remarks:
You must first ensure that the function is not Anymf.

Implements FLT::Membership.

double Zmf::evalder ( double  x) const [virtual]

Evaluates the derivative of the Membership function with respect to x, $ d\mu(x) / dx $.

Remarks:
You must first ensure that the function is not Anymf.

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.

Examples:
matlab_utilities/fuzderantec.cpp.
double Zmf::paramder ( size_t  parameter,
double  x 
) const [virtual]

Evaluates the derivative of the Membership function with respect to a parameter, $ d\mu(x) / dparam $.

Remarks:
You must first ensure that the function is not Anymf.

Implements FLT::Membership.

double Membership::read ( size_t  index) const [inherited]

Reads a parameter of the Membership function.

Returns:
If 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.

Returns:
Returns 0 if no errors, 1 if an error occurs, and -1 if the parameters were corrected.

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.

Returns:
Returns 0 if no errors occurred.
An error means the type of Membership function is not recognized.
Note:
The parameters of the new Membership function are not assigned, you must do so by Membership::edit method.
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.

Examples:
matlab_utilities/fuzcomb.cpp, and matlab_utilities/fuzderantec.cpp.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines