Membership function in the shape of a trapezoid. Can be a half trapzoid if the left or the right side is missing.

Namespace:  AForge.Fuzzy
Assembly:  AForge.Fuzzy (in AForge.Fuzzy.dll) Version: (


public class TrapezoidalFunction : PiecewiseLinearFunction


Since the PiecewiseLinearFunction can represent any piece wise linear function, it can represent trapezoids too. But as trapezoids are largely used in the creation of Linguistic Variables, this class simplifies the creation of them.

Sample usage:

// creating a typical triangular fuzzy set /\
TrapezoidalFunction function1 = new TrapezoidalFunction( 10, 20, 30 );
// creating a right fuzzy set, the rigth side of the set is fuzzy but the left is opened
TrapezoidalFunction function2 = new TrapezoidalFunction( 10, 20, 30, TrapezoidalFunction.EdgeType.Right );

Inheritance Hierarchy


See Also