C# Class AForge.Fuzzy.SingletonFunction

Membership function used in fuzzy singletons: fuzzy sets that have just one point with membership value 1.

Sometimes it is needed to represent crisp (classical) number in the fuzzy domain. Several approaches can be used, like adding some uncertain (fuzziness) in the original number (the number one, for instance, can be seen as a TrapezoidalFunction with -0.5, 1.0 and 0.5 parameters). Another approach is to declare fuzzy singletons: fuzzy sets with only one point returning a none zero membership.

While trapezoidal and half trapezoidal are classic functions used in fuzzy functions, this class supports any function or approximation that can be represented as a sequence of lines.

Sample usage:

// creating the instance SingletonFunction membershipFunction = new SingletonFunction( 10 ); // getting membership for several points for ( int i = 0; i < 20; i++ ) Console.WriteLine( membershipFunction.GetMembership( i ) );
Inheritance: IMembershipFunction
Show file Open project: holisticware-admin/MonoVersal.AForgeNET Class Usage Examples

Protected Properties

Property Type Description
support float

Public Methods

Method Description
GetMembership ( float x ) : float

Calculate membership of a given value to the singleton function.

SingletonFunction ( float support ) : System

Initializes a new instance of the SingletonFunction class.

Method Details

GetMembership() public method

Calculate membership of a given value to the singleton function.
public GetMembership ( float x ) : float
x float Value which membership will to be calculated.
return float

SingletonFunction() public method

Initializes a new instance of the SingletonFunction class.
public SingletonFunction ( float support ) : System
support float Support is the only value of x where the membership function is 1.
return System

Property Details

support protected property

The unique point where the membership value is 1.
protected float support
return float