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

The WeightedDefuzzifier class is the base class for defuzzifiers which compute a weighted function on the fuzzy set without requiring to integrate over the fuzzy set. More...

#include <WeightedDefuzzifier.h>

Inheritance diagram for fl::WeightedDefuzzifier:
Collaboration diagram for fl::WeightedDefuzzifier:

Public Types

enum  Type { Automatic, TakagiSugeno, Tsukamoto }
 The Type enum indicates the type of the WeightedDefuzzifier based the terms included in the fuzzy set. More...
 

Public Member Functions

 WeightedDefuzzifier (Type type=Automatic)
 
 WeightedDefuzzifier (const std::string &type)
 
virtual ~WeightedDefuzzifier () FL_IOVERRIDE
 
void setType (Type type)
 Sets the type of the weighted defuzzifier. More...
 
Type getType () const
 Gets the type of the weighted defuzzifier. More...
 
virtual std::string getTypeName () const
 Returns a string representation of the type of the defuzzifier. More...
 
virtual Type inferType (const Term *term) const
 Infers the type of the defuzzifier based on the given term. More...
 
- Public Member Functions inherited from fl::Defuzzifier
 Defuzzifier ()
 
virtual ~Defuzzifier ()
 
virtual std::string className () const =0
 Returns the name of the class of the defuzzifier. More...
 
virtual Defuzzifierclone () const =0
 Creates a clone of the defuzzifier. More...
 
virtual Complexity complexity (const Term *term) const =0
 Computes the complexity of defuzzifying the given term. More...
 
virtual scalar defuzzify (const Term *term, scalar minimum, scalar maximum) const =0
 Defuzzifies the given fuzzy term utilizing the range [minimum,maximum] More...
 

Static Public Member Functions

static std::string typeName (Type type)
 Returns a string representation of the given type. More...
 

Detailed Description

The WeightedDefuzzifier class is the base class for defuzzifiers which compute a weighted function on the fuzzy set without requiring to integrate over the fuzzy set.

Author
Juan Rada-Vilela, Ph.D.
Since
5.0

Definition at line 33 of file WeightedDefuzzifier.h.

Member Enumeration Documentation

◆ Type

The Type enum indicates the type of the WeightedDefuzzifier based the terms included in the fuzzy set.

Enumerator
Automatic 

Automatic: Automatically inferred from the terms.

TakagiSugeno 

TakagiSugeno: Manually set to TakagiSugeno (or Inverse Tsukamoto)

Tsukamoto 

Tsukamoto: Manually set to Tsukamoto.

Definition at line 38 of file WeightedDefuzzifier.h.

Constructor & Destructor Documentation

◆ WeightedDefuzzifier() [1/2]

fl::WeightedDefuzzifier::WeightedDefuzzifier ( Type  type = Automatic)
explicit

◆ WeightedDefuzzifier() [2/2]

fl::WeightedDefuzzifier::WeightedDefuzzifier ( const std::string &  type)
explicit

◆ ~WeightedDefuzzifier()

virtual fl::WeightedDefuzzifier::~WeightedDefuzzifier ( )
virtual

Member Function Documentation

◆ getType()

Type fl::WeightedDefuzzifier::getType ( ) const

Gets the type of the weighted defuzzifier.

Returns
the type of the weighted defuzzifier

◆ getTypeName()

virtual std::string fl::WeightedDefuzzifier::getTypeName ( ) const
virtual

Returns a string representation of the type of the defuzzifier.

Returns
a string representation of the type of the defuzzifier

◆ inferType()

virtual Type fl::WeightedDefuzzifier::inferType ( const Term term) const
virtual

Infers the type of the defuzzifier based on the given term.

If the given term is Constant, Linear or Function, then the type is TakagiSugeno; otherwise, the type is Tsukamoto

Parameters
termis the given term
Returns
the inferred type of the defuzzifier based on the given term

◆ setType()

void fl::WeightedDefuzzifier::setType ( Type  type)

Sets the type of the weighted defuzzifier.

Parameters
typeis the type of the weighted defuzzifier

◆ typeName()

static std::string fl::WeightedDefuzzifier::typeName ( Type  type)
static

Returns a string representation of the given type.

Parameters
typeis the type of a defuzzifier
Returns
a string representation of the given type

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