Terms¶
- class floulib.Terms(*args)¶
Bases:
Plot
This class contains methods to perform operations on terms.
- __init__(*args)¶
Constructor
- Parameters:
*args (Term) – Arguments are instances of Term.
- Raises:
TypeError – Raised if arguments are not instances of
Term
.- Return type:
None.
Example
>>> from floulib import LR, Term, Terms >>> A = Term('A', LR(1, 0.5, 1)) >>> B = Term('B', LR(2, 1, 1)) >>> C = Term('C', LR(3, 1, 0.5)) >>> T = Terms(A, B, C) >>> T.plot(xlim = [0, 4])
- refresh(x)¶
Refreshes the universe of discourse of the terms.
This method may be used when universes of discourse associated with terms in set of rules are changed and need to be refresh.
- Parameters:
x (numpy.ndarray) – The new universe of discourse.
- Return type:
None.