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

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>

Inheritance diagram for fl::Aggregated:
Collaboration diagram for fl::Aggregated:

## Public Member Functions

Aggregated (const std::string &name="", scalar minimum=fl::nan, scalar maximum=fl::nan, SNorm *aggregation=fl::null)

Aggregated (const Aggregated &other)

Aggregatedoperator= (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 &parameters) FL_IOVERRIDE
Does nothing. More...

virtual Aggregatedclone () 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 ActivatedhighestActivatedTerm () 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 SNormgetAggregation () 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 ActivatedgetTerm (std::size_t index) const
Gets the term at the given index. More...

virtual const ActivatedremoveTerm (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...

Protected Attributes inherited from fl::Term
scalar _height

## Detailed Description

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()).

Antecedent
Rule
OutputVariable
Activated
Term
Since
6.0

Definition at line 47 of file Aggregated.h.

## ◆ Aggregated() [1/2]

 fl::Aggregated::Aggregated ( const std::string & name = "", scalar minimum = fl::nan, scalar maximum = fl::nan, SNorm * aggregation = fl::null )
explicit

## ◆ Aggregated() [2/2]

 fl::Aggregated::Aggregated ( const Aggregated & other )

## ◆ ~Aggregated()

 virtual fl::Aggregated::~Aggregated ( )
virtual

## ◆ activationDegree()

 virtual scalar fl::Aggregated::activationDegree ( const Term * forTerm ) const
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.

Parameters
 forTerm is the term for which to compute the aggregated activation degree
Returns
the aggregated activation degree for the given term

 virtual void fl::Aggregated::addTerm ( const Term * term, scalar degree, const TNorm * implication )
virtual

Adds a new Activated term (from the parameters) to the fuzzy set.

Parameters
 term is the activated term degree is the activation degree implication is the implication operator

 virtual void fl::Aggregated::addTerm ( const Activated & term )
virtual

Adds the activated term to the fuzzy set.

The activated term will be deleted when Aggregated::clear()

Parameters
 term is the activated term

## ◆ className()

 virtual std::string fl::Aggregated::className ( ) const
virtual

Returns the name of the class of the term.

Returns
the name of the class of the term

Implements fl::Term.

## ◆ clear()

 virtual void fl::Aggregated::clear ( )
virtual

Clears and deletes the activated terms.

## ◆ clone()

 virtual Aggregated* fl::Aggregated::clone ( ) const
virtual

Creates a clone of the term.

Returns
a clone of the term

Implements fl::Term.

## ◆ complexity()

 virtual Complexity fl::Aggregated::complexity ( ) const
virtual

Computes the estimated complexity of evaluating the membership function.

Returns
the estimated complexity of evaluating the membership function

Implements fl::Term.

## ◆ complexityOfActivationDegree()

 virtual Complexity fl::Aggregated::complexityOfActivationDegree ( ) const
virtual

## ◆ complexityOfMembership()

 virtual Complexity fl::Aggregated::complexityOfMembership ( ) const
virtual

## ◆ configure()

 virtual void fl::Aggregated::configure ( const std::string & parameters )
virtual

Does nothing.

Parameters
 parameters are irrelevant

Implements fl::Term.

## ◆ getAggregation()

 virtual SNorm* fl::Aggregated::getAggregation ( ) const
virtual

Gets the aggregation operator.

Returns
the aggregation operator

## ◆ getMaximum()

 virtual scalar fl::Aggregated::getMaximum ( ) const
virtual

Gets the maximum of the range of the fuzzy set.

Returns
the maximum of the range of the fuzzy set

## ◆ getMinimum()

 virtual scalar fl::Aggregated::getMinimum ( ) const
virtual

Gets the minimum of the range of the fuzzy set.

Returns
the minimum of the range of the fuzzy set

## ◆ getTerm()

 virtual const Activated& fl::Aggregated::getTerm ( std::size_t index ) const
virtual

Gets the term at the given index.

Parameters
 index is the index of the term
Returns
the activated term at the given index

## ◆ highestActivatedTerm()

 virtual const Activated* fl::Aggregated::highestActivatedTerm ( ) const
virtual

Iterates over the Activated terms to find the term with the maximum activation degree.

Returns
the term with the maximum activation degree

## ◆ isEmpty()

 virtual bool fl::Aggregated::isEmpty ( ) const
virtual

Indicates whether the vector of activated terms is empty.

Returns
whether the vector of activated terms is empty

## ◆ membership()

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

Aggregates the membership function values of $$x$$ utilizing the aggregation operator.

Parameters
 x is a value
Returns
$$\sum_i{\mu_i(x)}, i \in \mbox{terms}$$

Implements fl::Term.

## ◆ numberOfTerms()

 virtual std::size_t fl::Aggregated::numberOfTerms ( ) const
virtual

Returns the number of activated terms.

Returns
the number of activated terms

## ◆ operator=()

 Aggregated& fl::Aggregated::operator= ( const Aggregated & other )

## ◆ parameters()

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

Returns the parameters of the term.

Returns
"aggregation minimum maximum terms"

Implements fl::Term.

## ◆ range()

 virtual scalar fl::Aggregated::range ( ) const
virtual

Returns the magnitude of the range of the fuzzy set,.

Returns
the magnitude of the range of the fuzzy set, i.e., maximum - minimum

## ◆ removeTerm()

 virtual const Activated& fl::Aggregated::removeTerm ( std::size_t index )
virtual

Removes the term at the given index without deleting the term.

Parameters
 index is the index of the term
Returns
the removed term

## ◆ setAggregation()

 virtual void fl::Aggregated::setAggregation ( SNorm * aggregation )
virtual

Sets the aggregation operator.

Parameters
 aggregation is the aggregation operator

## ◆ setMaximum()

 virtual void fl::Aggregated::setMaximum ( scalar maximum )
virtual

Sets the maximum of the range of the fuzzy set.

Parameters
 maximum is the maximum of the range of the fuzzy set

## ◆ setMinimum()

 virtual void fl::Aggregated::setMinimum ( scalar minimum )
virtual

Sets the minimum of the range of the fuzzy set.

Parameters
 minimum is the minimum of the range of the fuzzy set

## ◆ setRange()

 virtual void fl::Aggregated::setRange ( scalar minimum, scalar maximum )
virtual

Sets the range of the fuzzy set to [minimum, maximum]

Parameters
 minimum is the minimum of the range of the fuzzy set maximum is the maximum of the range of the fuzzy set

## ◆ setTerms()

 virtual void fl::Aggregated::setTerms ( const std::vector< Activated > & terms )
virtual

Sets the activated terms.

Parameters
 terms is the activated terms

## ◆ terms() [1/2]

 virtual const std::vector& fl::Aggregated::terms ( ) const
virtual

Returns an immutable vector of activated terms.

Returns
an immutable vector of activated terms

## ◆ terms() [2/2]

 virtual std::vector& fl::Aggregated::terms ( )
virtual

Returns a mutable vector of activated terms.

Returns
a mutable vector of activated terms

## ◆ toString()

 virtual std::string fl::Aggregated::toString ( ) const
virtual

Returns the representation of the term in the FuzzyLite Language.

Returns
the representation of the term in FuzzyLite Language
FllExporter

Reimplemented from fl::Term.

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