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

The First class is a RuleBlock Activation method that activates the first \(n\) rules whose activation degrees are greater than or equal to the given threshold. More...

#include <First.h>

Inheritance diagram for fl::First:
Collaboration diagram for fl::First:

Public Member Functions

 First (int numberOfRules=1, scalar threshold=0.0)
 
virtual ~First ()
 
virtual std::string className () const FL_IOVERRIDE
 Returns the name of the activation method, which is also utilized to register the activation method in the ActivationFactory. More...
 
virtual std::string parameters () const FL_IOVERRIDE
 Returns the number of rules and the threshold of the activation method. More...
 
virtual void configure (const std::string &parameters) FL_IOVERRIDE
 Configures the activation method with the given number of rules and threshold. More...
 
virtual void setNumberOfRules (int numberOfRules)
 Sets the number of rules for the activation degree. More...
 
virtual int getNumberOfRules () const
 Gets the number of rules for the activation degree. More...
 
virtual void setThreshold (scalar threshold)
 Sets the threshold for the activation degree. More...
 
virtual scalar getThreshold () const
 Gets the threshold for the activation degree. More...
 
virtual Complexity complexity (const RuleBlock *ruleBlock) const FL_IOVERRIDE
 Computes the estimated complexity of activating the given rule block. More...
 
virtual void activate (RuleBlock *ruleBlock) FL_IOVERRIDE
 Activates the first \(n\) rules whose activation degrees are greater than or equal to the given threshold. More...
 
virtual Firstclone () const FL_IOVERRIDE
 Clones the activation method. More...
 
- Public Member Functions inherited from fl::Activation
 Activation ()
 
virtual ~Activation ()
 

Static Public Member Functions

static Activationconstructor ()
 

Detailed Description

The First class is a RuleBlock Activation method that activates the first \(n\) rules whose activation degrees are greater than or equal to the given threshold.

The rules are iterated in the order they were added to the rule block.

Author
Juan Rada-Vilela, Ph.D.
See also
Last
Rule
RuleBlock
ActivationFactory
Since
6.0

Definition at line 37 of file First.h.

Constructor & Destructor Documentation

◆ First()

fl::First::First ( int  numberOfRules = 1,
scalar  threshold = 0.0 
)
explicit

◆ ~First()

virtual fl::First::~First ( )
virtual

Member Function Documentation

◆ activate()

virtual void fl::First::activate ( RuleBlock ruleBlock)
virtual

Activates the first \(n\) rules whose activation degrees are greater than or equal to the given threshold.

The rules are iterated in the order the rules were added to the rule block.

Parameters
ruleBlockis the rule block to activate

Implements fl::Activation.

◆ className()

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

Returns the name of the activation method, which is also utilized to register the activation method in the ActivationFactory.

Returns
the name of the activation method
See also
ActivationFactory

Implements fl::Activation.

◆ clone()

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

Clones the activation method.

Returns
a clone of the activation method

Implements fl::Activation.

◆ complexity()

virtual Complexity fl::First::complexity ( const RuleBlock ruleBlock) const
virtual

Computes the estimated complexity of activating the given rule block.

Returns
the estimated complexity of activating the given rule block

Implements fl::Activation.

◆ configure()

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

Configures the activation method with the given number of rules and threshold.

Parameters
parametersas "numberOfRules threshold"

Implements fl::Activation.

◆ constructor()

static Activation* fl::First::constructor ( )
static

◆ getNumberOfRules()

virtual int fl::First::getNumberOfRules ( ) const
virtual

Gets the number of rules for the activation degree.

Returns
the number of rules for the activation degree

◆ getThreshold()

virtual scalar fl::First::getThreshold ( ) const
virtual

Gets the threshold for the activation degree.

Returns
the threshold for the activation degree

◆ parameters()

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

Returns the number of rules and the threshold of the activation method.

Returns
"numberOfRules threshold"

Implements fl::Activation.

◆ setNumberOfRules()

virtual void fl::First::setNumberOfRules ( int  numberOfRules)
virtual

Sets the number of rules for the activation degree.

Parameters
numberOfRulesis the number of rules for the activation degree

◆ setThreshold()

virtual void fl::First::setThreshold ( scalar  threshold)
virtual

Sets the threshold for the activation degree.

Parameters
thresholdis the threshold for the activation degree

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