The PiShape class is an extended Term that represents the Pi-shaped curve membership function. More...
#include <PiShape.h>
Public Member Functions | |
PiShape (const std::string &name="", scalar bottomLeft=fl::nan, scalar topLeft=fl::nan, scalar topRight=fl::nan, scalar bottomRight=fl::nan, scalar height=1.0) | |
virtual | ~PiShape () 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 ¶meters) 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 | setBottomLeft (scalar bottomLeft) |
Sets the bottom-left value of the curve. More... | |
virtual scalar | getBottomLeft () const |
Gets the bottom-left value of the curve. More... | |
virtual void | setTopLeft (scalar topLeft) |
Sets the top-left value of the curve. More... | |
virtual scalar | getTopLeft () const |
Gets the top-left value of the curve. More... | |
virtual void | setTopRight (scalar topRight) |
Sets the top-right value of the curve. More... | |
virtual scalar | getTopRight () const |
Gets the top-right value of the curve. More... | |
virtual void | setBottomRight (scalar bottomRight) |
Sets the bottom-right value of the curve. More... | |
virtual scalar | getBottomRight () const |
Gets the bottom-right value of the curve. More... | |
virtual PiShape * | clone () 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 Term * | constructor () |
Additional Inherited Members | |
Protected Attributes inherited from fl::Term | |
scalar | _height |
The PiShape class is an extended Term that represents the Pi-shaped curve membership function.
|
explicit |
|
virtual |
|
virtual |
Returns the name of the class of the term.
Implements fl::Term.
|
virtual |
|
virtual |
Computes the estimated complexity of evaluating the membership function.
Implements fl::Term.
|
virtual |
Configures the term with the parameters.
parameters | as "bottomLeft topLeft topRight bottomRight
[height]" |
Implements fl::Term.
|
static |
|
virtual |
Gets the bottom-left value of the curve.
|
virtual |
Gets the bottom-right value of the curve.
|
virtual |
Gets the top-left value of the curve.
|
virtual |
Gets the top-right value of the curve.
Computes the membership function evaluated at \(x\).
x |
where \(h\) is the height of the Term, \(b_l\) is the bottom left of the PiShape, \(t_l\) is the top left of the PiShape, \(t_r\) is the top right of the PiShape \(b_r\) is the bottom right of the PiShape,
Implements fl::Term.
|
virtual |
Returns the parameters of the term.
"bottomLeft topLeft topRight bottomRight [height]"
Implements fl::Term.
|
virtual |
Sets the bottom-left value of the curve.
bottomLeft | is the bottom-left value of the curve |
|
virtual |
Sets the bottom-right value of the curve.
bottomRight | is the bottom-right value of the curve |
|
virtual |
Sets the top-left value of the curve.
topLeft | is the top-left value of the curve |
|
virtual |
Sets the top-right value of the curve.
topRight | is the top-right value of the curve |