C# Class AForge.Fuzzy.TrapezoidalFunction

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

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: PiecewiseLinearFunction
ファイルを表示 Open project: holisticware-admin/MonoVersal.AForgeNET Class Usage Examples

Public Methods

Method Description
TrapezoidalFunction ( float m1, float m2, EdgeType edge ) : System

Initializes a new instance of the TrapezoidalFunction class. With three points and an edge this shape can be a left fuzzy number (/--) or a right fuzzy number (--\).

Maximum membership value is set to 1.0 and the minimum is set to 0.0.

TrapezoidalFunction ( float m1, float m2, float m3 ) : System

Initializes a new instance of the TrapezoidalFunction class. With three points the shape is known as triangular fuzzy number or just fuzzy number (/\).

Maximum membership value is set to 1.0 and the minimum is set to 0.0.

TrapezoidalFunction ( float m1, float m2, float m3, float m4 ) : System

Initializes a new instance of the TrapezoidalFunction class. With four points the shape is known as flat fuzzy number or fuzzy interval (/--\).

Maximum membership value is set to 1.0 and the minimum is set to 0.0.

TrapezoidalFunction ( float m1, float m2, float max, float min, EdgeType edge ) : System

Initializes a new instance of the TrapezoidalFunction class. With two points and an edge this shape can be a left fuzzy number (/) or a right fuzzy number (\).

TrapezoidalFunction ( float m1, float m2, float m3, float max, float min ) : System

Initializes a new instance of the TrapezoidalFunction class. With three points the shape is known as triangular fuzzy number or just fuzzy number (/\).

TrapezoidalFunction ( float m1, float m2, float m3, float m4, float max, float min ) : System

Initializes a new instance of the TrapezoidalFunction class. With four points the shape is known as flat fuzzy number or fuzzy interval (/--\).

Private Methods

Method Description
TrapezoidalFunction ( int size ) : System

A private constructor used only to reuse code inside of this default constructor.

Method Details

TrapezoidalFunction() public method

Initializes a new instance of the TrapezoidalFunction class. With three points and an edge this shape can be a left fuzzy number (/--) or a right fuzzy number (--\).

Maximum membership value is set to 1.0 and the minimum is set to 0.0.

public TrapezoidalFunction ( float m1, float m2, EdgeType edge ) : System
m1 float Edge = Left: X value where the degree of membership starts to raise. /// Edge = Right: X value where the function starts, with maximum degree of membership.
m2 float Edge = Left: X value where the degree of membership reaches the maximum. /// Edge = Right: X value where the degree of membership reaches minimum value.
edge EdgeType Trapezoid's .
return System

TrapezoidalFunction() public method

Initializes a new instance of the TrapezoidalFunction class. With three points the shape is known as triangular fuzzy number or just fuzzy number (/\).

Maximum membership value is set to 1.0 and the minimum is set to 0.0.

public TrapezoidalFunction ( float m1, float m2, float m3 ) : System
m1 float X value where the degree of membership starts to raise.
m2 float X value where the degree of membership reaches the maximum value and starts to fall.
m3 float X value where the degree of membership reaches the minimum value.
return System

TrapezoidalFunction() public method

Initializes a new instance of the TrapezoidalFunction class. With four points the shape is known as flat fuzzy number or fuzzy interval (/--\).

Maximum membership value is set to 1.0 and the minimum is set to 0.0.

public TrapezoidalFunction ( float m1, float m2, float m3, float m4 ) : System
m1 float X value where the degree of membership starts to raise.
m2 float X value where the degree of membership reaches the maximum value.
m3 float X value where the degree of membership starts to fall.
m4 float X value where the degree of membership reaches the minimum value.
return System

TrapezoidalFunction() public method

Initializes a new instance of the TrapezoidalFunction class. With two points and an edge this shape can be a left fuzzy number (/) or a right fuzzy number (\).
public TrapezoidalFunction ( float m1, float m2, float max, float min, EdgeType edge ) : System
m1 float Edge = Left: X value where the degree of membership starts to raise. /// Edge = Right: X value where the function starts, with maximum degree of membership.
m2 float Edge = Left: X value where the degree of membership reaches the maximum. /// Edge = Right: X value where the degree of membership reaches minimum value.
max float The maximum value that the membership will reach, [0, 1].
min float The minimum value that the membership will reach, [0, 1].
edge EdgeType Trapezoid's .
return System

TrapezoidalFunction() public method

Initializes a new instance of the TrapezoidalFunction class. With three points the shape is known as triangular fuzzy number or just fuzzy number (/\).
public TrapezoidalFunction ( float m1, float m2, float m3, float max, float min ) : System
m1 float X value where the degree of membership starts to raise.
m2 float X value where the degree of membership reaches the maximum value and starts to fall.
m3 float X value where the degree of membership reaches the minimum value.
max float The maximum value that the membership will reach, [0, 1].
min float The minimum value that the membership will reach, [0, 1].
return System

TrapezoidalFunction() public method

Initializes a new instance of the TrapezoidalFunction class. With four points the shape is known as flat fuzzy number or fuzzy interval (/--\).
public TrapezoidalFunction ( float m1, float m2, float m3, float m4, float max, float min ) : System
m1 float X value where the degree of membership starts to raise.
m2 float X value where the degree of membership reaches the maximum value.
m3 float X value where the degree of membership starts to fall.
m4 float X value where the degree of membership reaches the minimum value.
max float The maximum value that the membership will reach, [0, 1].
min float The minimum value that the membership will reach, [0, 1].
return System