Triangle¶
- class floulib.Triangle(a, m, b, **kwargs)¶
Bases:
LR
Class to define triangular membership functions.
Note
Triangle is a subclass of
LR
, therefore all methods inLR
may be used.LR is a subclass of
Multilinear
, therefore all methods inMultilinear
may be used.Multilinear is a subclass of
Plot
, therefore all methods inPlot
may also be used.- __init__(a, m, b, **kwargs)¶
Constructor
- Parameters:
a (float) – Left coordinate of the support.
m (float) – Mode.
b (float) – Right coordinate of the support.
**kwargs (TYPE) – Keyword arguments transmitted to the parent class.
- Return type:
None.
Examples
>>> from floulib import Triangle >>> A = Triangle(1,2,4, label = 'A') >>> A.plot()