shark::ConstantLT Class Reference

LinguisticTerm with constant membership function. More...

#include <shark/Fuzzy/LinguisticTerms/ConstantLT.h>

+ Inheritance diagram for shark::ConstantLT:
+ Collaboration diagram for shark::ConstantLT:

Public Member Functions

 ConstantLT (const std::string &name="ConstantLT", const boost::shared_ptr< LinguisticVariable > &parent=boost::shared_ptr< LinguisticVariable >(), double x=1.)
 Constructor. More...
 
double defuzzify () const
 Defuzzification of the linguistic variable. More...
 
double min () const
 Returns the lower boundary of the support. More...
 
double max () const
 Returns the upper boundary of the support. More...
 
- Public Member Functions inherited from shark::LinguisticTerm
 LinguisticTerm (const std::string &name)
 Creates a new LinguisticTerm. More...
 
virtual ~LinguisticTerm ()
 Destructor. More...
 
const std::string & name () const
 Returns the name of the linguistic term. More...
 
void setName (const std::string &name)
 Sets the name of the linguistic term. More...
 
const boost::shared_ptr
< LinguisticVariable > & 
linguisticVariable () const
 Returns the LinguisticVariable the term is assigned to. More...
 
void setLinguisticVariable (const boost::shared_ptr< LinguisticVariable > &lv)
 Reassigns this term to a new LinguisticVariable. More...
 
double defuzzify (double errRel=FuzzySet::RELATIVE_ERROR(), int recursionMax=FuzzySet::RECURSION_MAX()) const
 Defuzzification of the linguistic term accounting the bounds of the suppport given by the corresponding linguistic variable. More...
 
- Public Member Functions inherited from shark::FuzzySet
 FuzzySet (double scale=1.0)
 Constructor. More...
 
virtual ~FuzzySet ()
 Virtual d'tor. More...
 
double operator() (double x) const
 The membership function. More...
 
void scale (double factor)
 Rescales the membership function. More...
 
virtual double defuzzify (double lowerBound=-std::numeric_limits< double >::max(), double upperBound=std::numeric_limits< double >::max(), double errRel=FuzzySet::RELATIVE_ERROR(), int recursionMax=FuzzySet::RECURSION_MAX()) const
 Defuzzification by centroid method. More...
 
virtual double defuzzifyMax (unsigned int steps=100, double low=-std::numeric_limits< double >::max(), double high=std::numeric_limits< double >::max()) const
 Defuzzification by Smallest-of-Maximum (SOM) method. More...
 
virtual void makeGNUPlotData (const std::string &fileName, unsigned int steps, boost::optional< double > lowerBound=boost::optional< double >(), boost::optional< double > upperBound=boost::optional< double >()) const
 Writes gnuplot suited data into a file. More...
 
- Public Member Functions inherited from shark::ConstantFS
 ConstantFS (double x=0.)
 Constructor. More...
 
double defuzzify () const
 Defuzzification of the fuzzy set. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from shark::FuzzySet
static double RELATIVE_ERROR ()
 
static std::size_t RECURSION_MIN ()
 
static std::size_t RECURSION_MAX ()
 
- Protected Member Functions inherited from shark::FuzzySet
double xmu (double x) const
 
double integrate (double(FuzzySet::*f)(double) const, double lowerBound, double upperBound, double errRel=FuzzySet::RELATIVE_ERROR(), std::size_t recursionMax=FuzzySet::RECURSION_MAX()) const
 
double adaptive_trapezoid (double(FuzzySet::*f)(double) const, double a, double b, double errRel, double recLevel, int recursionMax, double fa, double fm, double fb) const
 Integrates the given memberfunction numerically with the Adaptive Trapezoidal Method. More...
 
double adaptive_simpsons (double(FuzzySet::*f)(double) const, double a, double b, double errRel, double recLevel, int recursionMax, double fa, double fm, double fb) const
 Integrates the given memberfunction numerically with the Adaptive Simpson's Method. More...
 
- Protected Attributes inherited from shark::LinguisticTerm
boost::shared_ptr
< LinguisticVariable
m_parent
 
std::string m_name
 
- Protected Attributes inherited from shark::FuzzySet
double m_scaleFactor
 

Detailed Description

LinguisticTerm with constant membership function.

This class implements a LinguisticTerm with constant membership function.

Definition at line 29 of file ConstantLT.h.

Constructor & Destructor Documentation

shark::ConstantLT::ConstantLT ( const std::string &  name = "ConstantLT",
const boost::shared_ptr< LinguisticVariable > &  parent = boost::shared_ptr<LinguisticVariable>(),
double  x = 1. 
)
inline

Constructor.

Parameters
namethe name
parentthe associated linguistic variable
xthe constant value of the membership function

Definition at line 38 of file ConstantLT.h.

References shark::LinguisticTerm::setLinguisticVariable().

Member Function Documentation

double shark::ConstantLT::defuzzify ( ) const
inline

Defuzzification of the linguistic variable.

Definition at line 48 of file ConstantLT.h.

References shark::LinguisticTerm::m_parent.

double shark::ConstantLT::max ( ) const
inlinevirtual

Returns the upper boundary of the support.

Returns
the max. value for which the membership function is nonzero (or exceeds a given threshold)

Reimplemented from shark::ConstantFS.

Definition at line 68 of file ConstantLT.h.

References shark::LinguisticTerm::m_parent, shark::ConstantFS::max(), and shark::blas::min().

double shark::ConstantLT::min ( ) const
inlinevirtual

Returns the lower boundary of the support.

Returns
the min. value for which the membership function is nonzero (or exceeds a given threshold)

Reimplemented from shark::ConstantFS.

Definition at line 58 of file ConstantLT.h.

References shark::LinguisticTerm::m_parent, shark::blas::max(), and shark::ConstantFS::min().


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