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

A class for a fuzzy value [0-1]. More...

#include <fuzzytype.hpp>

List of all members.

Public Member Functions

 FUZZYVAL ()
 FUZZYVAL (double v)
FUZZYVALoperator= (const double &v)
 Assignment operator from double (does truncating)
bool operator== (const double &v) const
 Equality operator for double.
FUZZYVAL Complement (const FUZZYVAL &f_in)
 Complement operator.
 operator double () const
 Used to convert automatically to a double.
bool IsZero () const
bool IsOne () const

Private Attributes

double _y
 The fuzzy value.

Friends

std::ostream & operator<< (std::ostream &Stream, const FUZZYVAL &obj)
 The << operator must be defined as a friend function, see .cpp file.

Detailed Description

A class for a fuzzy value [0-1].


Constructor & Destructor Documentation

References _y.

Referenced by Complement().

slifis::FUZZYVAL::FUZZYVAL ( double  v) [inline]

References _y.


Member Function Documentation

FUZZYVAL& slifis::FUZZYVAL::operator= ( const double &  v) [inline]

Assignment operator from double (does truncating)

References _y.

bool slifis::FUZZYVAL::operator== ( const double &  v) const [inline]

Equality operator for double.

References _y, and SLIFIS_EPSILON_FUZZY.

FUZZYVAL slifis::FUZZYVAL::Complement ( const FUZZYVAL f_in) [inline]

Complement operator.

References _y, and FUZZYVAL().

slifis::FUZZYVAL::operator double ( ) const [inline]

Used to convert automatically to a double.

References _y.

bool slifis::FUZZYVAL::IsZero ( ) const [inline]
bool slifis::FUZZYVAL::IsOne ( ) const [inline]

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  Stream,
const FUZZYVAL obj 
) [friend]

The << operator must be defined as a friend function, see .cpp file.


Member Data Documentation

double slifis::FUZZYVAL::_y [private]