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

The Bell class is an extended Term that represents the generalized bell curve membership function. More...

#include <Bell.h>

Inheritance diagram for fl::Bell:
Collaboration diagram for fl::Bell:

## Public Member Functions

Bell (const std::string &name="", scalar center=fl::nan, scalar width=fl::nan, scalar slope=fl::nan, scalar height=1.0)

virtual ~Bell () 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 setCenter (scalar center)
Sets the center of the bell curve. More...

virtual scalar getCenter () const
Gets the center of the bell curve. More...

virtual void setWidth (scalar width)
Sets the width of the bell curve. More...

virtual scalar getWidth () const
Gets the width of the bell curve. More...

virtual void setSlope (scalar slope)
Sets the slope of the bell curve. More...

virtual scalar getSlope () const
Gets the slope of the bell curve. More...

virtual Bellclone () 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 ()

Protected Attributes inherited from fl::Term
scalar _height

## Detailed Description

The Bell class is an extended Term that represents the generalized bell curve membership function.

Term
Variable
Since
4.0

Definition at line 35 of file Bell.h.

## ◆ Bell()

 fl::Bell::Bell ( const std::string & name = "", scalar center = fl::nan, scalar width = fl::nan, scalar slope = fl::nan, scalar height = 1.0 )
explicit

## ◆ ~Bell()

 virtual fl::Bell::~Bell ( )
virtual

## ◆ className()

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

Creates a clone of the term.

Returns
a clone of the term

Implements fl::Term.

## ◆ complexity()

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

Configures the term with the parameters.

Parameters
 parameters as "center width slope [height]"

Implements fl::Term.

## ◆ constructor()

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

## ◆ getCenter()

 virtual scalar fl::Bell::getCenter ( ) const
virtual

Gets the center of the bell curve.

Returns
the center of the bell curve

## ◆ getSlope()

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

Gets the slope of the bell curve.

Returns
the slope of the bell curve

## ◆ getWidth()

 virtual scalar fl::Bell::getWidth ( ) const
virtual

Gets the width of the bell curve.

Returns
the width of the bell curve

## ◆ membership()

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

Computes the membership function evaluated at $$x$$.

Parameters
 x
Returns
$$h / (1 + \left(|x-c|/w\right)^{2s}$$

where $$h$$ is the height of the Term, $$c$$ is the center of the Bell, $$w$$ is the width of the Bell, $$s$$ is the slope of the Bell

Implements fl::Term.

## ◆ parameters()

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

Returns the parameters of the term.

Returns
"center width slope [height]"

Implements fl::Term.

## ◆ setCenter()

 virtual void fl::Bell::setCenter ( scalar center )
virtual

Sets the center of the bell curve.

Parameters
 center is the center of the bell curve

## ◆ setSlope()

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

Sets the slope of the bell curve.

Parameters
 slope is the slope of the bell curve

## ◆ setWidth()

 virtual void fl::Bell::setWidth ( scalar width )
virtual

Sets the width of the bell curve.

Parameters
 width is the width of the bell curve

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