Assembly: AForge.Fuzzy (in AForge.Fuzzy.dll) Version: 18.104.22.168 (22.214.171.124)
public class SingletonFunction : IMembershipFunction
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.
// 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 ) );