AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
autopas::FuzzyLogic::FuzzyRule Class Reference

Used to represent a Fuzzy Rule. More...

#include <FuzzyRule.h>

Public Member Functions

 FuzzyRule (const std::shared_ptr< FuzzySet > &antecedent, const std::shared_ptr< FuzzySet > &consequent)
 Constructs a FuzzyRule of the form: IF antecedent THEN consequent.
 
std::shared_ptr< FuzzySetapply (const FuzzySet::Data &data) const
 Applies the FuzzyRule using the given data.
 
const std::shared_ptr< FuzzySet > & getAntecedent () const
 Returns the antecedent of the FuzzyRule.
 
const std::shared_ptr< FuzzySet > & getConsequent () const
 Returns the consequent of the FuzzyRule.
 
 operator std::string () const
 Returns a string representation of the FuzzyRule.
 

Detailed Description

Used to represent a Fuzzy Rule.

A Fuzzy Rule is a conditional statement of the form: IF antecedent THEN consequent. Where both the antecedent and the consequent are FuzzySets.

Constructor & Destructor Documentation

◆ FuzzyRule()

autopas::FuzzyLogic::FuzzyRule::FuzzyRule ( const std::shared_ptr< FuzzySet > &  antecedent,
const std::shared_ptr< FuzzySet > &  consequent 
)

Constructs a FuzzyRule of the form: IF antecedent THEN consequent.

Parameters
antecedentA FuzzySet representing the antecedent of the FuzzyRule.
consequentA FuzzySet representing the consequent of the FuzzyRule.

Member Function Documentation

◆ apply()

std::shared_ptr< FuzzySet > autopas::FuzzyLogic::FuzzyRule::apply ( const FuzzySet::Data data) const

Applies the FuzzyRule using the given data.

Parameters
dataA map of the form {dimension_name: value}.
Returns
The cut consequent FuzzySet resulting from the application of the FuzzyRule.

◆ getAntecedent()

const std::shared_ptr< FuzzySet > & autopas::FuzzyLogic::FuzzyRule::getAntecedent ( ) const

Returns the antecedent of the FuzzyRule.

Returns
The antecedent of the FuzzyRule.

◆ getConsequent()

const std::shared_ptr< FuzzySet > & autopas::FuzzyLogic::FuzzyRule::getConsequent ( ) const

Returns the consequent of the FuzzyRule.

Returns
The consequent of the FuzzyRule.

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