File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
-
2
1
"""
3
2
Functions that transform a given membership value to a truth value.
4
3
5
- How this can be useful? Beats me. Found it somewhere on the internet,
4
+ How this can be useful? Beats me. Found it somewhere on the internet,
6
5
never needed it.
7
6
"""
7
+
8
8
from math import sqrt
9
9
10
10
11
11
def true (m ):
12
12
"""The membership-value is its own truth-value."""
13
13
return m
14
14
15
+
15
16
def false (m ):
16
17
"""The opposite of TRUE."""
17
18
return 1 - m
18
19
20
+
19
21
def fairly_false (m ):
20
22
"""Part of a circle in quadrant I."""
21
- return sqrt (1 - m ** 2 )
23
+ return sqrt (1 - m ** 2 )
24
+
22
25
23
26
def fairly_true (m ):
24
27
"""Part of a circle in quadrant II."""
25
28
return sqrt (1 - (1 - m ) ** 2 )
26
29
30
+
27
31
def very_false (m ):
28
32
"""Part of a circle in quadrant III."""
29
33
return - sqrt (1 - (1 - m ) ** 2 )
30
34
35
+
31
36
def very_true (m ):
32
37
"""Part of a circle in quadrant IV."""
33
- return - sqrt (1 - m ** 2 )
38
+ return - sqrt (1 - m ** 2 )
You can’t perform that action at this time.
0 commit comments