Metadata-Version: 2.4
Name: variable-adding
Version: 2.0
Summary: Adaptive fractional, weighted, and iterative variable addition.
Author: Sourceduty
Keywords: variable adding,adaptive increments,weighting,optimization
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# Variable Adding 2.0

**Adaptive fractional, weighted, and iterative variable addition.**

Variable Adding is a dependency-free Python toolkit for fractional increments, percentage weighting, numerical model search, and weighted gradient descent.

## Installation

```bash
pip install variable-adding==2.0
```

## Examples

```python
from variable_adding import (
    variable_add, apply_weight, weighted_blend,
    Model, Variable, Objective, minimize,
)

print(variable_add(20, 10, scale=0.5))  # 25.0
print(apply_weight(10, 20, 90))        # 29.0
print(weighted_blend(10, 20, 90))      # 11.0

model = Model()
model.add_variable(Variable("x", 5, lower=-10, upper=10))
model.set_objective(Objective(lambda values: (values["x"] - 2)**2))
print(minimize(model))
```

## Features

- **Core addition:** `variable_add`, `half_add`, `quarter_add`, `double_add`, `percentage_add`, `weighted_add`, `exponential_add`.
- **Adaptive methods:** `adaptive_step`, `iterate_add`, `optimize_scalar`.
- **Weighting:** `apply_weight`, `weighted_blend`, `tradeoff_update`, `half_weighted_balance`, `exponential_blend`, `quadratic_blend`, `sweep_weights`.
- **Model search:** `Variable`, `Objective`, `Model`, `Result`, `minimize`.
- **Gradient methods:** `weight_law_rate`, `weighted_gradient_descent`, `GradientStep`.
- **Parameter tools:** `tune_angle`, `rotation_matrix` (quantum-inspired mathematics, not quantum hardware support).

Optimization routines are numerical heuristics; global convergence is not guaranteed. Gradient descent behavior depends on objective smoothness and appropriate parameter settings.

## Publishing

```powershell
python -m pip install --upgrade build twine
python publish_pypi.py --dry-run
python publish_pypi.py --repository pypi
```

Official PyPI and TestPyPI require separate credentials. Supply a newly generated API token when prompted, or set `PYPI_API_TOKEN` for official PyPI. Never publish your API token with the package.
