A fuzzy logic C++ library
Public Member Functions | Private Attributes
slifis::FUZZY_IN Class Reference

Set of input membership functions. More...

#include <fuzzy_in.hpp>

+ Inheritance diagram for slifis::FUZZY_IN:
+ Collaboration diagram for slifis::FUZZY_IN:

List of all members.

Public Member Functions

 FUZZY_IN (std::string n="-unnamed-")
 FUZZY_IN (std::string n, const std::vector< REALVAL > &v_mf)
 Constructor used for building automatically a set of triangular functions partitioning input space, using the given values in v.
 FUZZY_IN (std::string n, REALVAL vmin, REALVAL vmax, size_t NbFunc=2, EN_FUNCSPACING s=FS_LIN)
 Constructor used for building automatically a set of triangular functions partitioning input space into Nb functions, going from vmin to vmax, regularly spaced.
 ~FUZZY_IN ()
void SetInputValue (REALVAL v)
REALVAL GetInputValue () const
FUZZYVAL GetFuzzyValue (size_t idx_mf) const
 Returns fuzzyfied input value, using the membership function of index idx_mf.
std::vector< FUZZYVALGetInputFiringStrength () const
 Returns a vector giving for each membership function in the set, how much ([0-1]) the input value (FUZZY_IN::_InputValue) triggers it.
bool operator== (const FUZZY_IN &m) const
 Equality operator. Returns true if all the contained membership functions are equal.
bool operator!= (const FUZZY_IN &m) const
bool SetIsValid () const
 Return true if the set of functions is valid (call root class method)

Private Attributes

REALVAL _InputValue
 Value of the parameter that is been fuzzyfied.

Detailed Description

Set of input membership functions.

Inherited from FUZZY_ROOT, only adds an input value. See Sets of membership functions for a description of differences between FUZZY_IN and FUZZY_OUT


Constructor & Destructor Documentation

slifis::FUZZY_IN::FUZZY_IN ( std::string  n = "-unnamed-")
slifis::FUZZY_IN::FUZZY_IN ( std::string  n,
const std::vector< REALVAL > &  v0 
)

Constructor used for building automatically a set of triangular functions partitioning input space, using the given values in v.

See FUZZY_ROOT constructor

References slifis::FUZZY_ROOT::SetNormalisedSet().

slifis::FUZZY_IN::FUZZY_IN ( std::string  n,
REALVAL  vmin,
REALVAL  vmax,
size_t  NbFunc = 2,
EN_FUNCSPACING  spacing = FS_LIN 
)

Constructor used for building automatically a set of triangular functions partitioning input space into Nb functions, going from vmin to vmax, regularly spaced.

See FUZZY_ROOT constructor

Parameters:
nset name
vminminimum value
vmaxMax value
NbFuncNb of functions, between 2 to ???
spacingfunctions spacing

References slifis::FUZZY_ROOT::SetNormalisedSet().


Member Function Documentation

References _InputValue.

FUZZYVAL slifis::FUZZY_IN::GetFuzzyValue ( size_t  idx_mf) const

Returns fuzzyfied input value, using the membership function of index idx_mf.

References __IN__, __OUT__, _InputValue, slifis::ERR_MF_BAD_INDEX, slifis::MEMBFUNC::Fuzzify(), slifis::FUZZY_ROOT::GetMf(), slifis::FUZZY_ROOT::GetNbMf(), and SLIFIS_ERROR_2.

Returns a vector giving for each membership function in the set, how much ([0-1]) the input value (FUZZY_IN::_InputValue) triggers it.

References __IN__, __OUT__, _InputValue, slifis::MEMBFUNC::Fuzzify(), slifis::FUZZY_ROOT::GetMf(), and slifis::FUZZY_ROOT::GetNbMf().

Referenced by slifis_plot::GetFiringStrengthVector().

bool slifis::FUZZY_IN::operator== ( const FUZZY_IN f2) const

Equality operator. Returns true if all the contained membership functions are equal.

At present, calls the equality operator of inherited class FUZZY_ROOT

bool slifis::FUZZY_IN::operator!= ( const FUZZY_IN m) const [inline]
bool slifis::FUZZY_IN::SetIsValid ( ) const [inline, virtual]

Return true if the set of functions is valid (call root class method)

Implements slifis::FUZZY_ROOT.

References slifis::FUZZY_ROOT::P_SetIsValid().


Member Data Documentation

Value of the parameter that is been fuzzyfied.

Referenced by GetFuzzyValue(), GetInputFiringStrength(), GetInputValue(), and SetInputValue().