IRIS::Fuzzy::MembershipFn Class Reference

#include <MembershipFn.h>

Inheritance diagram for IRIS::Fuzzy::MembershipFn:

Inheritance graph
[legend]
Collaboration diagram for IRIS::Fuzzy::MembershipFn:

Collaboration graph
[legend]
List of all members.

Public Types

typedef pair< double, double > interval
typedef std::vector< double > parm_list
 type for list of parameters
typedef vector< double > vector
 type for the vectorized form of this member function

Public Member Functions

 MembershipFn ()
 create an empty membership function
 MembershipFn (const parm_list &parm)
 MembershipFn (const string &name)
 MembershipFn (const string &name, double min, double max)
 ~MembershipFn ()
 destroy a membership function by releasing unneeded memory
void set (const string &name, double min, double max)
void set (double newMin, double newMax)
void setMin (double newMin)
void setMax (double newMax)
void set (unsigned i, double val)
void clear ()
 clears out a membership function
virtual void discretize (unsigned degree)=0
void get (string &name, double &min, double &max) const
void get (double &min, double &max) const
double getMin () const
 get the lower bound of the range of this set
double getMax () const
 get the upper bound of the range of this set
interval get () const
 get the range of this set, described as an interval
interval dom () const
double get (unsigned i)
 gets the value of the ith parameter
virtual void draw () const
virtual double eval (double x) const =0
virtual double operator() (double val) const =0
double & operator[] (unsigned i)
 sets the ith item in the vector of the member function
double operator[] (unsigned i) const
 gets the ith item in the vector of the member function
vector getVector () const
void setName (const string &name)
void set (const string &name)
string getName () const
 get the name of this set
void get (string &name) const

Protected Attributes

interval range
parm_list parameter
vector x
string name

Detailed Description

A class interface for some of the most common, standard membership functions used in the fuzzy logic community; this version of a fuzzy set is numeric and vectorizable.


Member Typedef Documentation

typedef pair<double,double> IRIS::Fuzzy::MembershipFn::interval
 

describe an interval as a pair indicating a lower bound and an upper bound

typedef std::vector<double> IRIS::Fuzzy::MembershipFn::parm_list
 

type for list of parameters

typedef vector<double> IRIS::Fuzzy::Numeric::vector [inherited]
 

type for the vectorized form of this member function


Constructor & Destructor Documentation

IRIS::Fuzzy::MembershipFn::MembershipFn  ) 
 

create an empty membership function

IRIS::Fuzzy::MembershipFn::MembershipFn const parm_list parm  ) 
 

create an membership function with the given parameter list

Parameters:
parm list of parameters

IRIS::Fuzzy::MembershipFn::MembershipFn const string &  name  ) 
 

create an empty set with an associated name

Parameters:
name name to give this set

IRIS::Fuzzy::MembershipFn::MembershipFn const string &  name,
double  min,
double  max
 

create an empty set with an associated name and a range defined by the interval min ... max

Parameters:
name name to give this set
min lower bound for range
max upper bound for range

IRIS::Fuzzy::MembershipFn::~MembershipFn  ) 
 

destroy a membership function by releasing unneeded memory


Member Function Documentation

void IRIS::Fuzzy::MembershipFn::clear  ) 
 

clears out a membership function

Reimplemented from IRIS::Fuzzy::Numeric.

virtual void IRIS::Fuzzy::MembershipFn::discretize unsigned  degree  )  [pure virtual]
 

discretize a membership function based on the given degree of discretization (number of elements in the vectorized form)

Parameters:
degree degree of discretization (or number of elements in the vectorized form of this membership function)

Implements IRIS::Fuzzy::Numeric.

Implemented in IRIS::Fuzzy::BellMF, IRIS::Fuzzy::dSigMF, IRIS::Fuzzy::GaussMF, IRIS::Fuzzy::pSigMF, IRIS::Fuzzy::SigMF, IRIS::Fuzzy::TrapMF, IRIS::Fuzzy::TriMF, and IRIS::Fuzzy::ZMF.

MembershipFn::interval IRIS::Fuzzy::MembershipFn::dom  )  const
 

get the domain of this set; same as get()

See also:
get()

void IRIS::Fuzzy::MembershipFn::draw  )  const [virtual]
 

draw this set to see what it looks like; included primarily for debugging purposes ...

Reimplemented from IRIS::Fuzzy::Numeric.

Reimplemented in IRIS::Fuzzy::BellMF, IRIS::Fuzzy::dSigMF, IRIS::Fuzzy::GaussMF, IRIS::Fuzzy::pSigMF, IRIS::Fuzzy::SigMF, IRIS::Fuzzy::TrapMF, IRIS::Fuzzy::TriMF, and IRIS::Fuzzy::ZMF.

virtual double IRIS::Fuzzy::MembershipFn::eval double  x  )  const [pure virtual]
 

evaluate a membership function based on the given x

Parameters:
x element of domain of membership function

Implements IRIS::Fuzzy::Numeric.

Implemented in IRIS::Fuzzy::BellMF, IRIS::Fuzzy::dSigMF, IRIS::Fuzzy::GaussMF, IRIS::Fuzzy::pSigMF, IRIS::Fuzzy::SigMF, IRIS::Fuzzy::TrapMF, IRIS::Fuzzy::TriMF, and IRIS::Fuzzy::ZMF.

void IRIS::Fuzzy::Set::get string &  name  )  const [inherited]
 

get the name of this set; same as getName()

Parameters:
name name given this set
See also:
getName()

double IRIS::Fuzzy::MembershipFn::get unsigned  i  ) 
 

gets the value of the ith parameter

MembershipFn::interval IRIS::Fuzzy::MembershipFn::get  )  const
 

get the range of this set, described as an interval

void IRIS::Fuzzy::MembershipFn::get double &  min,
double &  max
const
 

get the range for this set

Parameters:
min lower bound for range
max upper bound for range

void IRIS::Fuzzy::MembershipFn::get string &  name,
double &  min,
double &  max
const
 

get the name and range for this set

Parameters:
name name given to this set
min lower bound for range
max upper bound for range

double IRIS::Fuzzy::MembershipFn::getMax  )  const
 

get the upper bound of the range of this set

double IRIS::Fuzzy::MembershipFn::getMin  )  const
 

get the lower bound of the range of this set

string IRIS::Fuzzy::Set::getName  )  const [inherited]
 

get the name of this set

Numeric::vector IRIS::Fuzzy::Numeric::getVector  )  const [inherited]
 

gets the vectorized form of a membership function based on the set level of discretization

virtual double IRIS::Fuzzy::MembershipFn::operator() double  val  )  const [pure virtual]
 

evaluate membership of the given value in this set

Parameters:
val value to use when evaluating this set

Implements IRIS::Fuzzy::Numeric.

Implemented in IRIS::Fuzzy::BellMF, IRIS::Fuzzy::dSigMF, IRIS::Fuzzy::GaussMF, IRIS::Fuzzy::pSigMF, IRIS::Fuzzy::SigMF, IRIS::Fuzzy::TrapMF, IRIS::Fuzzy::TriMF, and IRIS::Fuzzy::ZMF.

double IRIS::Fuzzy::Numeric::operator[] unsigned  i  )  const [inherited]
 

gets the ith item in the vector of the member function

double & IRIS::Fuzzy::Numeric::operator[] unsigned  i  )  [inherited]
 

sets the ith item in the vector of the member function

void IRIS::Fuzzy::Set::set const string &  name  )  [inherited]
 

set the name for this set; same as setName()

Parameters:
name name to give this set
See also:
setName()

void IRIS::Fuzzy::MembershipFn::set unsigned  i,
double  val
 

sets the ith parameter for this member function to val

Parameters:
i parameter number: based on type of membership function
val new value of ith parameter

void IRIS::Fuzzy::MembershipFn::set double  newMin,
double  newMax
 

set the range for this set

Parameters:
newMin new lower bound for range
newMax new upper bound for range

Reimplemented in IRIS::Fuzzy::GaussMF, IRIS::Fuzzy::SigMF, and IRIS::Fuzzy::ZMF.

void IRIS::Fuzzy::MembershipFn::set const string &  name,
double  min,
double  max
 

set the name and range for this set

Parameters:
name name to give this set
min lower bound for range
max upper bound for range

void IRIS::Fuzzy::MembershipFn::setMax double  newMax  ) 
 

set the upper bound for the range for this set

Parameters:
newMax new upper bound for range

void IRIS::Fuzzy::MembershipFn::setMin double  newMin  ) 
 

set the lower bound for the range for this set

Parameters:
newMin new lower bound for range

void IRIS::Fuzzy::Set::setName const string &  name  )  [inherited]
 

set the name for this set

Parameters:
name name to give this set


Member Data Documentation

string IRIS::Fuzzy::Set::name [protected, inherited]
 

parm_list IRIS::Fuzzy::MembershipFn::parameter [protected]
 

interval IRIS::Fuzzy::MembershipFn::range [protected]
 

vector IRIS::Fuzzy::Numeric::x [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Tue Dec 12 13:42:34 2006 for IRIS Intelligent Systems Tools by  doxygen 1.4.6