Click or drag to resize
Accord.NET (logo)

SingletonFunction Class

Membership function used in fuzzy singletons: fuzzy sets that have just one point with membership value 1.
Inheritance Hierarchy
SystemObject
  Accord.FuzzySingletonFunction

Namespace:  Accord.Fuzzy
Assembly:  Accord.Fuzzy (in Accord.Fuzzy.dll) Version: 3.8.0
Syntax
public class SingletonFunction : IMembershipFunction
Request Example View Source

The SingletonFunction type exposes the following members.

Constructors
  NameDescription
Public methodSingletonFunction
Initializes a new instance of the SingletonFunction class.
Top
Properties
  NameDescription
Public propertyLeftLimit
The leftmost x value of the membership function, the same value of the support.
Public propertyRightLimit
The rightmost x value of the membership function, the same value of the support.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetMembership
Calculate membership of a given value to the singleton function.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Protected fieldsupport
The unique point where the membership value is 1.
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
Remarks

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 ) );
See Also