fuzzylite  6.0
A Fuzzy Logic Control Library in C++
fl::SigmoidDifference Class Reference

The SigmoidDifference class is an extended Term that represents the difference between two sigmoidal membership functions. More...

#include <SigmoidDifference.h>

Inheritance diagram for fl::SigmoidDifference:
Collaboration diagram for fl::SigmoidDifference:

Public Member Functions

 SigmoidDifference (const std::string &name="", scalar left=fl::nan, scalar rising=fl::nan, scalar falling=fl::nan, scalar right=fl::nan, scalar height=1.0)
 
virtual ~SigmoidDifference () FL_IOVERRIDE
 
virtual std::string className () const FL_IOVERRIDE
 Returns the name of the class of the term. More...
 
virtual std::string parameters () const FL_IOVERRIDE
 Returns the parameters of the term. More...
 
virtual void configure (const std::string &parameters) FL_IOVERRIDE
 Configures the term with the parameters. More...
 
virtual Complexity complexity () const FL_IOVERRIDE
 Computes the estimated complexity of evaluating the membership function. More...
 
virtual scalar membership (scalar x) const FL_IOVERRIDE
 Computes the membership function evaluated at \(x\). More...
 
virtual void setLeft (scalar leftInflection)
 Sets the inflection of the left sigmoidal curve. More...
 
virtual scalar getLeft () const
 Gets the inflection of the left sigmoidal curve. More...
 
virtual void setRising (scalar risingSlope)
 Sets the slope of the left sigmoidal curve. More...
 
virtual scalar getRising () const
 Gets the slope of the left sigmoidal curve. More...
 
virtual void setFalling (scalar fallingSlope)
 Sets the slope of the right sigmoidal curve. More...
 
virtual scalar getFalling () const
 Gets the slope of the right sigmoidal curve. More...
 
virtual void setRight (scalar rightInflection)
 Sets the inflection of the right sigmoidal curve. More...
 
virtual scalar getRight () const
 Gets the inflection of the right sigmoidal curve. More...
 
virtual SigmoidDifferenceclone () const FL_IOVERRIDE
 Creates a clone of the term. More...
 
- Public Member Functions inherited from fl::Term
 Term (const std::string &name="", scalar height=1.0)
 
virtual ~Term ()
 
virtual void setName (const std::string &name)
 Sets the name of the term. More...
 
virtual std::string getName () const
 Gets the name of the term. More...
 
virtual void setHeight (scalar height)
 Sets the height of the term. More...
 
virtual scalar getHeight () const
 Gets the height of the term. More...
 
virtual std::string toString () const
 Returns the representation of the term in the FuzzyLite Language. More...
 
virtual void updateReference (const Engine *engine)
 Updates the references (if any) to point to the current engine (useful when cloning engines or creating terms within Importer objects. More...
 

Static Public Member Functions

static Termconstructor ()
 

Additional Inherited Members

- Protected Attributes inherited from fl::Term
scalar _height
 

Detailed Description

The SigmoidDifference class is an extended Term that represents the difference between two sigmoidal membership functions.

sigmoidDifference.svg
Author
Juan Rada-Vilela, Ph.D.
See also
Term
Variable
Since
4.0

Definition at line 35 of file SigmoidDifference.h.

Constructor & Destructor Documentation

◆ SigmoidDifference()

fl::SigmoidDifference::SigmoidDifference ( const std::string &  name = "",
scalar  left = fl::nan,
scalar  rising = fl::nan,
scalar  falling = fl::nan,
scalar  right = fl::nan,
scalar  height = 1.0 
)
explicit

◆ ~SigmoidDifference()

virtual fl::SigmoidDifference::~SigmoidDifference ( )
virtual

Member Function Documentation

◆ className()

virtual std::string fl::SigmoidDifference::className ( ) const
virtual

Returns the name of the class of the term.

Returns
the name of the class of the term

Implements fl::Term.

◆ clone()

virtual SigmoidDifference* fl::SigmoidDifference::clone ( ) const
virtual

Creates a clone of the term.

Returns
a clone of the term

Implements fl::Term.

◆ complexity()

virtual Complexity fl::SigmoidDifference::complexity ( ) const
virtual

Computes the estimated complexity of evaluating the membership function.

Returns
the estimated complexity of evaluating the membership function

Implements fl::Term.

◆ configure()

virtual void fl::SigmoidDifference::configure ( const std::string &  parameters)
virtual

Configures the term with the parameters.

Parameters
parametersas "left rising falling right [height]"

Implements fl::Term.

◆ constructor()

static Term* fl::SigmoidDifference::constructor ( )
static

◆ getFalling()

virtual scalar fl::SigmoidDifference::getFalling ( ) const
virtual

Gets the slope of the right sigmoidal curve.

Returns
the slope of the right sigmoidal curve

◆ getLeft()

virtual scalar fl::SigmoidDifference::getLeft ( ) const
virtual

Gets the inflection of the left sigmoidal curve.

Returns
the inflection of the left sigmoidal curve

◆ getRight()

virtual scalar fl::SigmoidDifference::getRight ( ) const
virtual

Gets the inflection of the right sigmoidal curve.

Returns
the inflection of the right sigmoidal curve

◆ getRising()

virtual scalar fl::SigmoidDifference::getRising ( ) const
virtual

Gets the slope of the left sigmoidal curve.

Returns
the slope of the left sigmoidal curve

◆ membership()

virtual scalar fl::SigmoidDifference::membership ( scalar  x) const
virtual

Computes the membership function evaluated at \(x\).

Parameters
x
Returns
\( h (a-b)\)

where \(h\) is the height of the Term, \(a= 1 / (1 + \exp(-s_l \times (x - i_l))) \), \(b = 1 / (1 + \exp(-s_r \times (x - i_r)))\), \(i_l\) is the left inflection of the SigmoidDifference, \(s_l\) is the left slope of the SigmoidDifference, \(i_r\) is the right inflection of the SigmoidDifference, \(s_r\) is the right slope of the SigmoidDifference

Implements fl::Term.

◆ parameters()

virtual std::string fl::SigmoidDifference::parameters ( ) const
virtual

Returns the parameters of the term.

Returns
"left rising falling right [height]"

Implements fl::Term.

◆ setFalling()

virtual void fl::SigmoidDifference::setFalling ( scalar  fallingSlope)
virtual

Sets the slope of the right sigmoidal curve.

Parameters
fallingSlopeis the slope of the right sigmoidal curve

◆ setLeft()

virtual void fl::SigmoidDifference::setLeft ( scalar  leftInflection)
virtual

Sets the inflection of the left sigmoidal curve.

Parameters
leftInflectionis the inflection of the left sigmoidal curve

◆ setRight()

virtual void fl::SigmoidDifference::setRight ( scalar  rightInflection)
virtual

Sets the inflection of the right sigmoidal curve.

Parameters
rightInflectionis the inflection of the right sigmoidal curve

◆ setRising()

virtual void fl::SigmoidDifference::setRising ( scalar  risingSlope)
virtual

Sets the slope of the left sigmoidal curve.

Parameters
risingSlopeis the slope of the left sigmoidal curve

The documentation for this class was generated from the following file: