dufuz-0.1.1
توضیحات
Discrete numeric fuzzy sets in Python algorithms.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | dufuz-0.1.1 |
| نام | dufuz |
| نسخه کتابخانه | 0.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Emmanouil (Manios) Krasanakis |
| ایمیل نویسنده | maniospas@hotmail.com |
| آدرس صفحه اصلی | https://github.com/maniospas/dufuz |
| آدرس اینترنتی | https://pypi.org/project/dufuz/ |
| مجوز | - |
# DUFuz
Incorporating discrete numeric fuzzy sets in Python algorithms.
These sets are more general than fuzzy numbers.
**Dependencies**: `numpy`, `torch`, `matplotlib`, `ply`<br>
**Contact**: Manios Krasanakis (maniospas@hotmail.com)<br>
**License**: Apache 2
## :rocket: Quickstart
* [Python API](docs/api.md)
* [DUFuz Interpreter](docs/language.md)
The code below demonstrates a bubblesort algorithm that runs on
fuzzy inputs on the DUFuz interpreter.
A similar implementation can be written with the Python API.
```python
import random
from timeit import default_timer as time
import matplotlib.pyplot as plt
values = [1, 2, 4? or 3.5?1.5, 5?] # 1 and 2 are not fuzzy
random.shuffle(values)
def bubblesort(values):
for i in range(len(values)):
for j in range(i+1, len(values)):
vali = values[i]
valj = values[j]
comparison = vali < valj
values[i] = vali if comparison else valj
values[j] = valj if comparison else vali
start_time = time()
bubblesort(values)
print("Completed in", time()-start_time, "sec")
axs = plt.subplots(len(values), 1)[1]
for ax, val in zip(axs, values):
val.plot(ax, True)
plt.show()
```
نیازمندی
| مقدار | نام |
|---|---|
| - | numpy |
| - | torch |
| - | matplotlib |
| - | ply |
نحوه نصب
نصب پکیج whl dufuz-0.1.1:
pip install dufuz-0.1.1.whl
نصب پکیج tar.gz dufuz-0.1.1:
pip install dufuz-0.1.1.tar.gz