The Term class is the abstract class for linguistic terms. More...
#include <Term.h>
Public Member Functions | |
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 std::string | className () const =0 |
Returns the name of the class of the term. More... | |
virtual std::string | parameters () const =0 |
Returns the parameters to configure the term. More... | |
virtual void | configure (const std::string ¶meters)=0 |
Configures the term with the given parameters. More... | |
virtual Complexity | complexity () const =0 |
Computes the estimated complexity of evaluating the membership function. More... | |
virtual scalar | membership (scalar x) const =0 |
Computes the membership function value at \(x\). More... | |
virtual Term * | clone () const =0 |
Creates a clone of the term. 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... | |
Protected Attributes | |
scalar | _height |
The Term class is the abstract class for linguistic terms.
The linguistic terms in this library can be divided in four groups as: basic
, extended
, edge
, and function
. The basic
terms are Triangle, Trapezoid, Rectangle, and Discrete. The extended
terms are Bell, Binary, Cosine, Gaussian, GaussianProduct, PiShape, SigmoidDifference, SigmoidProduct, and Spike. The edge
terms are Concave, Ramp, Sigmoid, SShape, and ZShape. The function
terms are Constant, Linear, and Function.
In the figure below, the basic
terms are represented in the first column, and the extended
terms in the second and third columns. The edge
terms are represented in the fifth and sixth rows, and the function
terms in the last row.
|
explicit |
|
virtual |
|
pure virtual |
Returns the name of the class of the term.
Implemented in fl::Function, fl::Aggregated, fl::Binary, fl::Sigmoid, fl::Ramp, fl::Discrete, fl::GaussianProduct, fl::PiShape, fl::SigmoidDifference, fl::SigmoidProduct, fl::Linear, fl::Activated, fl::Bell, fl::Triangle, fl::Gaussian, fl::Trapezoid, fl::ZShape, fl::Cosine, fl::Rectangle, fl::SShape, fl::Concave, fl::Spike, and fl::Constant.
|
pure virtual |
Creates a clone of the term.
Implemented in fl::Function, fl::Discrete, fl::GaussianProduct, fl::PiShape, fl::Ramp, fl::Binary, fl::SigmoidProduct, fl::SigmoidDifference, fl::Trapezoid, fl::Linear, fl::Sigmoid, fl::Triangle, fl::Bell, fl::Activated, fl::Concave, fl::ZShape, fl::SShape, fl::Rectangle, fl::Cosine, fl::Gaussian, fl::Spike, fl::Aggregated, and fl::Constant.
|
pure virtual |
Computes the estimated complexity of evaluating the membership function.
Implemented in fl::Function, fl::Discrete, fl::Aggregated, fl::Binary, fl::Sigmoid, fl::Ramp, fl::GaussianProduct, fl::PiShape, fl::Linear, fl::SigmoidDifference, fl::SigmoidProduct, fl::Activated, fl::Bell, fl::Triangle, fl::Gaussian, fl::Trapezoid, fl::ZShape, fl::Cosine, fl::Rectangle, fl::SShape, fl::Concave, fl::Spike, and fl::Constant.
|
pure virtual |
Configures the term with the given parameters.
The parameters are separated by spaces. If there is one additional parameter, the parameter will be considered as the height of the term; otherwise, the height will be set to \(1.0\)
parameters | is the parameters to configure the term |
Implemented in fl::Function, fl::Aggregated, fl::Binary, fl::Sigmoid, fl::Ramp, fl::Discrete, fl::GaussianProduct, fl::PiShape, fl::Linear, fl::SigmoidDifference, fl::SigmoidProduct, fl::Activated, fl::Bell, fl::Triangle, fl::Gaussian, fl::Trapezoid, fl::ZShape, fl::Cosine, fl::Rectangle, fl::SShape, fl::Concave, fl::Spike, and fl::Constant.
|
virtual |
Gets the height of the term.
|
virtual |
Gets the name of the term.
Computes the membership function value at \(x\).
x |
Implemented in fl::Function, fl::Ramp, fl::Discrete, fl::Aggregated, fl::Binary, fl::GaussianProduct, fl::PiShape, fl::Sigmoid, fl::SigmoidDifference, fl::SigmoidProduct, fl::Trapezoid, fl::Triangle, fl::Concave, fl::ZShape, fl::SShape, fl::Bell, fl::Linear, fl::Rectangle, fl::Cosine, fl::Gaussian, fl::Activated, fl::Spike, and fl::Constant.
|
pure virtual |
Returns the parameters to configure the term.
The parameters are separated by spaces. If there is one additional parameter, the parameter will be considered as the height of the term; otherwise, the height will be set to \(1.0\)
Implemented in fl::Function, fl::Aggregated, fl::Binary, fl::Sigmoid, fl::Ramp, fl::Discrete, fl::GaussianProduct, fl::Linear, fl::PiShape, fl::SigmoidDifference, fl::SigmoidProduct, fl::Activated, fl::Bell, fl::Triangle, fl::Gaussian, fl::Trapezoid, fl::ZShape, fl::Cosine, fl::Rectangle, fl::SShape, fl::Concave, fl::Spike, and fl::Constant.
|
virtual |
Sets the height of the term.
height | is the height of the term |
|
virtual |
Sets the name of the term.
name | is the name of term |
|
virtual |
Returns the representation of the term in the FuzzyLite Language.
Reimplemented in fl::Aggregated, and fl::Activated.
|
virtual |
Updates the references (if any) to point to the current engine (useful when cloning engines or creating terms within Importer objects.
engine | is the engine to which this term belongs to |
Reimplemented in fl::Function, and fl::Linear.