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

The Sigmoid class is an edge Term that represents the sigmoid membership function. More...

#include <Sigmoid.h>

Inheritance diagram for fl::Sigmoid:
Collaboration diagram for fl::Sigmoid:

Public Types

enum  Direction { Positive, Zero, Negative }
 Direction is an enumerator that indicates the direction of the sigmoid. More...
 

Public Member Functions

 Sigmoid (const std::string &name="", scalar inflection=fl::nan, scalar slope=fl::nan, scalar height=1.0)
 
virtual ~Sigmoid () 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 scalar tsukamoto (scalar activationDegree, scalar minimum, scalar maximum) const FL_IOVERRIDE
 
virtual bool isMonotonic () const FL_IOVERRIDE
 
virtual void setInflection (scalar inflection)
 Sets the inflection of the sigmoid. More...
 
virtual scalar getInflection () const
 Gets the inflection of the sigmoid. More...
 
virtual void setSlope (scalar slope)
 Sets the slope of the sigmoid. More...
 
virtual scalar getSlope () const
 Gets the slope of the sigmoid. More...
 
virtual Direction direction () const
 Returns the direction of the sigmoid. More...
 
virtual Sigmoidclone () 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 Sigmoid class is an edge Term that represents the sigmoid membership function.

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

Definition at line 35 of file Sigmoid.h.

Member Enumeration Documentation

◆ Direction

Direction is an enumerator that indicates the direction of the sigmoid.

Enumerator
Positive 

(_/) increases to the right

Zero 

(--) slope is zero

Negative 

(\\_) increases to the left

Definition at line 45 of file Sigmoid.h.

Constructor & Destructor Documentation

◆ Sigmoid()

fl::Sigmoid::Sigmoid ( const std::string &  name = "",
scalar  inflection = fl::nan,
scalar  slope = fl::nan,
scalar  height = 1.0 
)
explicit

◆ ~Sigmoid()

virtual fl::Sigmoid::~Sigmoid ( )
virtual

Member Function Documentation

◆ className()

virtual std::string fl::Sigmoid::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 Sigmoid* fl::Sigmoid::clone ( ) const
virtual

Creates a clone of the term.

Returns
a clone of the term

Implements fl::Term.

◆ complexity()

virtual Complexity fl::Sigmoid::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::Sigmoid::configure ( const std::string &  parameters)
virtual

Configures the term with the parameters.

Parameters
parametersas "inflection slope [height]"

Implements fl::Term.

◆ constructor()

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

◆ direction()

virtual Direction fl::Sigmoid::direction ( ) const
virtual

Returns the direction of the sigmoid.

Returns
the direction of the sigmoid

◆ getInflection()

virtual scalar fl::Sigmoid::getInflection ( ) const
virtual

Gets the inflection of the sigmoid.

Returns
the inflection of the sigmoid

◆ getSlope()

virtual scalar fl::Sigmoid::getSlope ( ) const
virtual

Gets the slope of the sigmoid.

Returns
the slope of the sigmoid

◆ isMonotonic()

virtual bool fl::Sigmoid::isMonotonic ( ) const
virtual

◆ membership()

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

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

Parameters
x
Returns
\( h / (1 + \exp(-s(x-i)))\)

where \(h\) is the height of the Term, \(s\) is the slope of the Sigmoid, \(i\) is the inflection of the Sigmoid

Implements fl::Term.

◆ parameters()

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

Returns the parameters of the term.

Returns
"inflection slope [height]"

Implements fl::Term.

◆ setInflection()

virtual void fl::Sigmoid::setInflection ( scalar  inflection)
virtual

Sets the inflection of the sigmoid.

Parameters
inflectionis the inflection of the sigmoid

◆ setSlope()

virtual void fl::Sigmoid::setSlope ( scalar  slope)
virtual

Sets the slope of the sigmoid.

Parameters
slopeis the slope of the sigmoid

◆ tsukamoto()

virtual scalar fl::Sigmoid::tsukamoto ( scalar  activationDegree,
scalar  minimum,
scalar  maximum 
) const
virtual

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