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

The Consequent class is a proposition set that represents and evaluates the consequent of a Rule. More...

#include <Consequent.h>

Collaboration diagram for fl::Consequent:

Public Member Functions

 Consequent ()
 
virtual ~Consequent ()
 
virtual void setText (const std::string &text)
 Sets the text of the consequent. More...
 
virtual std::string getText () const
 Gets the text of the consequent. More...
 
virtual Complexity complexity (const TNorm *implication) const
 Computes the estimated complexity of modifying the consequents. More...
 
virtual const std::vector< Proposition * > & conclusions () const
 Returns an immutable vector of the propositions that represent the Consequent of a Rule. More...
 
virtual std::vector< Proposition * > & conclusions ()
 Returns the vector of propositions that represent the Consequent of a Rule. More...
 
virtual bool isLoaded ()
 Indicates whether the consequent is loaded. More...
 
virtual void unload ()
 Unloads the consequent. More...
 
virtual void load (const Engine *engine)
 Loads the consequent with text given from Consequent::getText() and uses the engine to identify and retrieve references to the input variables and output variables as required. More...
 
virtual void load (const std::string &consequent, const Engine *engine)
 Loads the consequent with the given text and uses the engine to identify and retrieve references to the input variables and output variables as required. More...
 
virtual void modify (scalar activationDegree, const TNorm *implication)
 Modifies the proposition set according to the activation degree (computed in the Antecedent of the Rule) and the implication operator (given in the RuleBlock) More...
 
virtual std::string toString () const
 Returns a string representation of the Consequent. More...
 

Detailed Description

The Consequent class is a proposition set that represents and evaluates the consequent of a Rule.

. The structure of a rule is: if (antecedent) then (consequent). The structure of the consequent of a rule is:

then variable is [hedge]* term [and variable is [hedge]* term]* [with w]?

where *-marked elements may appear zero or more times, elements in brackets are optional, elements in parentheses are compulsory, and ?-marked elements may appear once or not at all.

Author
Juan Rada-Vilela, Ph.D.
See also
Antecedent
Rule
Since
4.0

Definition at line 51 of file Consequent.h.

Constructor & Destructor Documentation

◆ Consequent()

fl::Consequent::Consequent ( )

◆ ~Consequent()

virtual fl::Consequent::~Consequent ( )
virtual

Member Function Documentation

◆ complexity()

virtual Complexity fl::Consequent::complexity ( const TNorm implication) const
virtual

Computes the estimated complexity of modifying the consequents.

Returns
the estimated complexity of modifying the consequents

◆ conclusions() [1/2]

virtual const std::vector<Proposition*>& fl::Consequent::conclusions ( ) const
virtual

Returns an immutable vector of the propositions that represent the Consequent of a Rule.

Returns
an immutable vector of the set of propositions that represent the Consequent of a Rule

◆ conclusions() [2/2]

virtual std::vector<Proposition*>& fl::Consequent::conclusions ( )
virtual

Returns the vector of propositions that represent the Consequent of a Rule.

Returns
the vector of propositions that represent the Consequent of a Rule

◆ getText()

virtual std::string fl::Consequent::getText ( ) const
virtual

Gets the text of the consequent.

Returns
the text of the consequent

◆ isLoaded()

virtual bool fl::Consequent::isLoaded ( )
virtual

Indicates whether the consequent is loaded.

Returns
whether the consequent is loaded

◆ load() [1/2]

virtual void fl::Consequent::load ( const Engine engine)
virtual

Loads the consequent with text given from Consequent::getText() and uses the engine to identify and retrieve references to the input variables and output variables as required.

Parameters
engineis the engine from which the rules are part of

◆ load() [2/2]

virtual void fl::Consequent::load ( const std::string &  consequent,
const Engine engine 
)
virtual

Loads the consequent with the given text and uses the engine to identify and retrieve references to the input variables and output variables as required.

Parameters
consequentis the consequent of the rule in text
engineis the engine from which the rules are part of

◆ modify()

virtual void fl::Consequent::modify ( scalar  activationDegree,
const TNorm implication 
)
virtual

Modifies the proposition set according to the activation degree (computed in the Antecedent of the Rule) and the implication operator (given in the RuleBlock)

Parameters
activationDegreeis the activation degree computed in the Antecedent of the Rule
implicationis the implication operator configured in the RuleBlock

◆ setText()

virtual void fl::Consequent::setText ( const std::string &  text)
virtual

Sets the text of the consequent.

Parameters
textis the text of the consequent

◆ toString()

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

Returns a string representation of the Consequent.

Returns
a string representation of the Consequent

◆ unload()

virtual void fl::Consequent::unload ( )
virtual

Unloads the consequent.


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