fuzzy-ops-lib-daniel 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fuzzy_ops_lib_daniel-0.0.1/PKG-INFO +7 -0
- fuzzy_ops_lib_daniel-0.0.1/fuzzy_lib/__init__.py +1 -0
- fuzzy_ops_lib_daniel-0.0.1/fuzzy_lib/composition.py +23 -0
- fuzzy_ops_lib_daniel-0.0.1/fuzzy_ops_lib_daniel.egg-info/PKG-INFO +7 -0
- fuzzy_ops_lib_daniel-0.0.1/fuzzy_ops_lib_daniel.egg-info/SOURCES.txt +7 -0
- fuzzy_ops_lib_daniel-0.0.1/fuzzy_ops_lib_daniel.egg-info/dependency_links.txt +1 -0
- fuzzy_ops_lib_daniel-0.0.1/fuzzy_ops_lib_daniel.egg-info/top_level.txt +1 -0
- fuzzy_ops_lib_daniel-0.0.1/pyproject.toml +15 -0
- fuzzy_ops_lib_daniel-0.0.1/setup.cfg +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .composition import max_min_composition
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
def max_min_composition(R, S):
|
|
2
|
+
"""
|
|
3
|
+
Perform max-min composition on two fuzzy relations R and S
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
T = {}
|
|
7
|
+
|
|
8
|
+
for x in R:
|
|
9
|
+
T[x] = {}
|
|
10
|
+
|
|
11
|
+
# Get all z values from S
|
|
12
|
+
z_keys = list(next(iter(S.values())).keys())
|
|
13
|
+
|
|
14
|
+
for z in z_keys:
|
|
15
|
+
values = []
|
|
16
|
+
|
|
17
|
+
for y in R[x]:
|
|
18
|
+
if y in S:
|
|
19
|
+
values.append(min(R[x][y], S[y][z]))
|
|
20
|
+
|
|
21
|
+
T[x][z] = max(values) if values else 0
|
|
22
|
+
|
|
23
|
+
return T
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fuzzy_lib
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "fuzzy-ops-lib-daniel"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "Fuzzy logic operations library"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Daniel Tayade" }
|
|
7
|
+
]
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.7"
|
|
10
|
+
|
|
11
|
+
dependencies = []
|
|
12
|
+
|
|
13
|
+
[build-system]
|
|
14
|
+
requires = ["setuptools>=61.0"]
|
|
15
|
+
build-backend = "setuptools.build_meta"
|