The Aggregated class is a special Term that stores a fuzzy set with the Activated terms from the Antecedents of a Rule, thereby serving mainly as the fuzzy output value of the OutputVariables. More...
#include <Aggregated.h>
Public Member Functions | |
Aggregated (const std::string &name="", scalar minimum=fl::nan, scalar maximum=fl::nan, SNorm *aggregation=fl::null) | |
Aggregated (const Aggregated &other) | |
Aggregated & | operator= (const Aggregated &other) |
virtual | ~Aggregated () 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 |
Does nothing. More... | |
virtual Aggregated * | clone () const FL_IOVERRIDE |
Creates a clone of the term. More... | |
virtual Complexity | complexity () const FL_IOVERRIDE |
Computes the estimated complexity of evaluating the membership function. More... | |
virtual Complexity | complexityOfMembership () const |
virtual Complexity | complexityOfActivationDegree () const |
virtual scalar | membership (scalar x) const FL_IOVERRIDE |
Aggregates the membership function values of \(x\) utilizing the aggregation operator. More... | |
virtual scalar | activationDegree (const Term *forTerm) const |
Computes the aggregated activation degree for the given term. More... | |
virtual const Activated * | highestActivatedTerm () const |
Iterates over the Activated terms to find the term with the maximum activation degree. More... | |
virtual std::string | toString () const FL_IOVERRIDE |
Returns the representation of the term in the FuzzyLite Language. More... | |
virtual void | setMinimum (scalar minimum) |
Sets the minimum of the range of the fuzzy set. More... | |
virtual scalar | getMinimum () const |
Gets the minimum of the range of the fuzzy set. More... | |
virtual void | setMaximum (scalar maximum) |
Sets the maximum of the range of the fuzzy set. More... | |
virtual scalar | getMaximum () const |
Gets the maximum of the range of the fuzzy set. More... | |
virtual void | setRange (scalar minimum, scalar maximum) |
Sets the range of the fuzzy set to [minimum, maximum] More... | |
virtual scalar | range () const |
Returns the magnitude of the range of the fuzzy set,. More... | |
virtual void | setAggregation (SNorm *aggregation) |
Sets the aggregation operator. More... | |
virtual SNorm * | getAggregation () const |
Gets the aggregation operator. More... | |
virtual void | addTerm (const Term *term, scalar degree, const TNorm *implication) |
Adds a new Activated term (from the parameters) to the fuzzy set. More... | |
virtual void | addTerm (const Activated &term) |
Adds the activated term to the fuzzy set. More... | |
virtual const Activated & | getTerm (std::size_t index) const |
Gets the term at the given index. More... | |
virtual const Activated & | removeTerm (std::size_t index) |
Removes the term at the given index without deleting the term. More... | |
virtual std::size_t | numberOfTerms () const |
Returns the number of activated terms. More... | |
virtual void | setTerms (const std::vector< Activated > &terms) |
Sets the activated terms. More... | |
virtual const std::vector< Activated > & | terms () const |
Returns an immutable vector of activated terms. More... | |
virtual std::vector< Activated > & | terms () |
Returns a mutable vector of activated terms. More... | |
virtual bool | isEmpty () const |
Indicates whether the vector of activated terms is empty. More... | |
virtual void | clear () |
Clears and deletes the activated terms. 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 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... | |
Additional Inherited Members | |
Protected Attributes inherited from fl::Term | |
scalar | _height |
The Aggregated class is a special Term that stores a fuzzy set with the Activated terms from the Antecedents of a Rule, thereby serving mainly as the fuzzy output value of the OutputVariables.
The ownership of the activated terms will be transfered to objects of this class, and therefore their destructors will be called upon destruction of this term (or calling Aggregated::clear()).
Definition at line 47 of file Aggregated.h.
|
explicit |
fl::Aggregated::Aggregated | ( | const Aggregated & | other | ) |
|
virtual |
Computes the aggregated activation degree for the given term.
If the same term is present multiple times, the aggregation operator is utilized to sum the activation degrees of the term. If the aggregation operator is fl::null, a regular sum is performed.
forTerm | is the term for which to compute the aggregated activation degree |
|
virtual |
Adds a new Activated term (from the parameters) to the fuzzy set.
term | is the activated term |
degree | is the activation degree |
implication | is the implication operator |
|
virtual |
Adds the activated term to the fuzzy set.
The activated term will be deleted when Aggregated::clear()
term | is the activated term |
|
virtual |
Returns the name of the class of the term.
Implements fl::Term.
|
virtual |
Clears and deletes the activated terms.
|
virtual |
|
virtual |
Computes the estimated complexity of evaluating the membership function.
Implements fl::Term.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Gets the aggregation operator.
|
virtual |
Gets the maximum of the range of the fuzzy set.
|
virtual |
Gets the minimum of the range of the fuzzy set.
|
virtual |
Gets the term at the given index.
index | is the index of the term |
|
virtual |
Iterates over the Activated terms to find the term with the maximum activation degree.
|
virtual |
Indicates whether the vector of activated terms is empty.
Aggregates the membership function values of \(x\) utilizing the aggregation operator.
x | is a value |
Implements fl::Term.
|
virtual |
Returns the number of activated terms.
Aggregated& fl::Aggregated::operator= | ( | const Aggregated & | other | ) |
|
virtual |
|
virtual |
Returns the magnitude of the range of the fuzzy set,.
maximum - minimum
|
virtual |
Removes the term at the given index without deleting the term.
index | is the index of the term |
|
virtual |
Sets the aggregation operator.
aggregation | is the aggregation operator |
|
virtual |
Sets the maximum of the range of the fuzzy set.
maximum | is the maximum of the range of the fuzzy set |
|
virtual |
Sets the minimum of the range of the fuzzy set.
minimum | is the minimum of the range of the fuzzy set |
Sets the range of the fuzzy set to [minimum, maximum]
minimum | is the minimum of the range of the fuzzy set |
maximum | is the maximum of the range of the fuzzy set |
|
virtual |
Sets the activated terms.
terms | is the activated terms |
|
virtual |
Returns an immutable vector of activated terms.
|
virtual |
Returns a mutable vector of activated terms.
|
virtual |
Returns the representation of the term in the FuzzyLite Language.
Reimplemented from fl::Term.