LinguisticTerm Class Reference

A single linguistic term. More...

#include <LinguisticTerm.h>

Inheritance diagram for LinguisticTerm:

FuzzySet RCObject BellLT ComposedLT ConstantLT CustomizedLT GeneralizedBellLT InfinityLT SigmoidalLT SingletonLT TrapezoidLT TriangularLT

List of all members.

Public Member Functions

 LinguisticTerm (const std::string name)
 Creates a new LinguisticTerm.
 LinguisticTerm (const std::string name="", const RCPtr< LinguisticVariable > &parent=NULL)
 Creates a new LinguisticTerm and assignes it to a given LinguisticVariable.
virtual ~LinguisticTerm ()
 Destructor.
std::string getName () const
 Returns the name of the linguistic term.
void setName (const std::string name)
 Sets the name of the linguistic term.
const RCPtr< LinguisticVariable > & getLinguisticVariable () const
 Returns the LinguisticVariable the term is assigned to.
void setLinguisticVariable (const RCPtr< LinguisticVariable > &lv)
 Reassigns this term to a new LinguisticVariable.
double defuzzify (double errRel=ERR_RELATIVE, int recursionMax=RECURSION_MAX) const
 Defuzzification of the linguistic term accounting the bounds of the suppport given by the corresponding linguistic variable.

Protected Attributes

RCPtr< LinguisticVariableparent


Detailed Description

A single linguistic term.

A linguistic term (like 'fast' or 'slow') is a named FuzzySet, which is assigned to a LinguisticVariable (like 'speed').
This is a virtual base class. The children are different kinds of linguistic terms corresponding to the different kinds of fuzzy sets.

Definition at line 33 of file LinguisticTerm.h.


Constructor & Destructor Documentation

LinguisticTerm::LinguisticTerm ( const std::string  name  ) 

Creates a new LinguisticTerm.

Parameters:
name name of the linguistic term, e.g. "very fast"

Definition at line 20 of file LinguisticTerm.cpp.

LinguisticTerm::LinguisticTerm ( const std::string  name = "",
const RCPtr< LinguisticVariable > &  parent = NULL 
)

Creates a new LinguisticTerm and assignes it to a given LinguisticVariable.

Parameters:
name the name of the linguistic term, e.g. "very fast"
parent the assigned linguistic variable, e.g. "speed"

Definition at line 22 of file LinguisticTerm.cpp.

References parent, and setName().

LinguisticTerm::~LinguisticTerm (  )  [virtual]

Destructor.

Definition at line 29 of file LinguisticTerm.cpp.

References parent.


Member Function Documentation

double LinguisticTerm::defuzzify ( double  errRel = ERR_RELATIVE,
int  recursionMax = RECURSION_MAX 
) const [inline]

Defuzzification of the linguistic term accounting the bounds of the suppport given by the corresponding linguistic variable.

Parameters:
errRel relative approximation error that is tollerated during numerical integration
recursionMax max. depth of recursion during numerical integration (i.e. max. $2^n$ steps)

Reimplemented in BellLT.

Definition at line 90 of file LinguisticTerm.h.

References FuzzySet::defuzzify(), parent, and RECURSION_MAX.

const RCPtr<LinguisticVariable>& LinguisticTerm::getLinguisticVariable (  )  const [inline]

Returns the LinguisticVariable the term is assigned to.

Definition at line 72 of file LinguisticTerm.h.

References parent.

Referenced by Rule::printRule().

std::string LinguisticTerm::getName (  )  const [inline]

Returns the name of the linguistic term.

Returns:
the name

Definition at line 59 of file LinguisticTerm.h.

Referenced by Rule::printRule().

void LinguisticTerm::setLinguisticVariable ( const RCPtr< LinguisticVariable > &  lv  ) 

Reassigns this term to a new LinguisticVariable.

Parameters:
lv the new linguistic variable

Definition at line 45 of file LinguisticTerm.cpp.

References parent.

void LinguisticTerm::setName ( const std::string  name  ) 

Sets the name of the linguistic term.

Parameters:
name the new name

Definition at line 39 of file LinguisticTerm.cpp.

Referenced by LinguisticTerm().


Member Data Documentation


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