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