Metadata-Version: 2.4
Name: znum
Version: 0.1.0
Summary: Z-number data type for fuzzy arithmetic and multi-criteria decision making (TOPSIS, VIKOR, PROMETHEE)
Project-URL: Homepage, https://github.com/maganuriyev/znum
Project-URL: Repository, https://github.com/maganuriyev/znum
Project-URL: Issues, https://github.com/maganuriyev/znum/issues
Author-email: Maga Nuriyev <maganuriyev@gmail.com>
License-Expression: MIT
Keywords: fuzzy-arithmetic,fuzzy-number,mcdm,multi-criteria-decision-making,optimization,promethee,topsis,vikor,z-number
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Requires-Dist: numpy>=1.24.0
Requires-Dist: scipy>=1.10.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# Znum

A Python library for Z-number arithmetic and multi-criteria decision making (MCDM).

A Z-number is a fuzzy number with two components:
- **A**: The main fuzzy set values (restriction on values)
- **B**: The confidence/belief values (reliability of A)

Znum supports full mathematical operations (addition, subtraction, multiplication, division, power), comparison operators, and includes implementations of TOPSIS, VIKOR, and PROMETHEE optimization methods.

## Installation

```bash
pip install znum
```

## Quick Start

```python
from znum import Znum

# Create Z-numbers
z1 = Znum([1, 2, 3, 4], [0.1, 0.2, 0.3, 0.4])
z2 = Znum([2, 4, 8, 10], [0.5, 0.6, 0.7, 0.8])

# Arithmetic operations
z3 = z1 + z2
z4 = z1 * z2
z5 = z1 - z2
z6 = z1 / z2

# Comparison
print(z1 > z2)  # False
print(z1 < z2)  # True

# Power
z7 = z1 ** 2
```

## MCDM Methods

### TOPSIS

```python
from znum import Znum, Topsis, Beast

# Create weights, alternatives, and criteria types
weights = [Znum([0.2, 0.3, 0.4, 0.5], [0.1, 0.2, 0.3, 0.4])]
alternatives = [[Znum([7, 8, 9, 10], [0.6, 0.7, 0.8, 0.9])]]
criteria_types = [Beast.CriteriaType.BENEFIT]

table = [weights, *alternatives, criteria_types]
result = Topsis.solver_main(table)
```

### PROMETHEE

```python
from znum import Znum, Promethee, Beast

table = [weights, *alternatives, criteria_types]
promethee = Promethee(table)
sorted_alternatives = promethee.solve()
```

## Development

```bash
# Install dependencies
pip install -e ".[dev]"

# Run tests
pytest
```

## License

MIT
