Metadata-Version: 2.4
Name: dds-lib
Version: 0.3.0
Summary: Discrete dynamical systems tools for recurrence, stability, chaos, and basins.
Project-URL: Homepage, https://github.com/1c3t0y/dds
Project-URL: Documentation, https://github.com/1c3t0y/dds/tree/master/docs
Project-URL: Repository, https://github.com/1c3t0y/dds
Project-URL: Issues, https://github.com/1c3t0y/dds/issues
Author: Open source contributors
License: MIT License
        
        Copyright (c) 2026 Open source contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
License-File: LICENSE
Keywords: chaos,collatz,dynamics,fractals,mathematics
Classifier: Development Status :: 3 - Alpha
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 :: Mathematics
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: numpy>=1.24
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: hypothesis>=6.100; extra == 'dev'
Requires-Dist: ipykernel>=6.29; extra == 'dev'
Requires-Dist: mkdocs-material>=9.5; extra == 'dev'
Requires-Dist: mkdocstrings[python]>=0.25; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: nbconvert>=7.16; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.2; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'dev'
Requires-Dist: twine>=5.1; extra == 'dev'
Provides-Extra: parallel
Requires-Dist: joblib>=1.3; extra == 'parallel'
Provides-Extra: plot
Requires-Dist: matplotlib>=3.8; extra == 'plot'
Requires-Dist: networkx>=3.0; extra == 'plot'
Requires-Dist: pydot>=2.0; extra == 'plot'
Provides-Extra: scipy
Requires-Dist: scipy>=1.10; extra == 'scipy'
Description-Content-Type: text/markdown

# dds

[![CI](https://github.com/1c3t0y/dds/actions/workflows/ci.yml/badge.svg)](https://github.com/1c3t0y/dds/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/dds-lib.svg)](https://pypi.org/project/dds-lib/)
[![Python versions](https://img.shields.io/pypi/pyversions/dds-lib.svg)](https://pypi.org/project/dds-lib/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

`dds` is a production-oriented Python library for discrete dynamical systems.
It provides a small, typed API for orbit iteration, recurrence and attractor
detection, fixed-point search, linear stability, Lyapunov analysis, bifurcation
sweeps, basin classification, escape-time grids, and box-counting fractal
dimension. Plotting is optional.

## Project naming

The import package is `dds`:

```python
from dds import DDS, orbit, periodic_orbit
```

The initial PyPI distribution target is `dds-lib`, because the `dds`
distribution name is already occupied on PyPI.

## Installation

Core package:

```bash
pip install dds-lib
```

With SciPy-based fixed-point solvers:

```bash
pip install "dds-lib[scipy]"
```

With plotting helpers:

```bash
pip install "dds-lib[plot]"
```

With parallel batch/grid sweeps:

```bash
pip install "dds-lib[parallel]"
```

Development environment:

```bash
pip install -e ".[dev,plot,scipy,parallel]"
```

## Quickstart

```python
from dds import DDS


def logistic_map(x: float, r: float = 3.2) -> float:
    return r * x * (1.0 - x)


def logistic_derivative(x: float, r: float = 3.2) -> float:
    return r * (1.0 - 2.0 * x)


system = DDS(logistic_map, derivative=logistic_derivative, name="logistic")

trajectory = system.orbit(0.2, iterations=10, r=3.2)
periodic = system.periodic_orbit(0.2, max_iterations=200, r=3.2, transient=50)
fixed_points = system.search_fixed_points([0.2, 0.8], 2.0, method="iteration")
lyapunov = system.lyapunov_exponent(0.123, 4.0, iterations=2000, transient=100)
bifurcation = system.bifurcation_data(
    [2.5, 3.2, 3.8, 4.0],
    0.2,
    transient=500,
    samples=100,
)
```

## Command-line interface

Installing `dds-lib` also installs a `dds` console script for quick,
scriptable use of the built-in example maps (`logistic`, `henon`,
`quadratic`, `collatz_extension`) without writing Python:

```bash
dds orbit --map logistic --x0 0.2 --iterations 50 --param r=3.9 --output orbit.csv
dds bifurcation --map logistic --x0 0.2 --param-range 2.5 4.0 500 --output bifurcation.npy
dds escape-grid --map quadratic --xrange -2.0 1.0 400 --yrange -1.5 1.5 400 --stop-iterations 50 --output mandelbrot.npy
```

Add `--plot PATH.png` to any subcommand to also save a Matplotlib figure
(requires the `plot` extra). `python -m dds` works the same way as `dds`.

## Notebooks

Runnable Jupyter notebooks covering each feature area (orbits, fixed points
and stability, Lyapunov exponents, bifurcation diagrams, basins of
attraction, Mandelbrot/Julia sets, and the Collatz function and its smooth
extension) live in [notebooks/](notebooks/README.md).

## Included features

- Deterministic orbit generation for scalar and complex maps
- Exact and tolerance-aware recurrence detection with explicit statuses
- Scalar multipliers and multidimensional monodromy stability analysis
- Scalar Lyapunov exponents and multidimensional spectra
- Parameter sweeps and bifurcation data
- Attractor discovery and two-dimensional basin classification
- Fixed-point search by iteration, Newton, secant, and bisection
- Escape-time grid computation for Mandelbrot- and Julia-style analysis
- Optional plotting helpers that return Matplotlib figures
- Regression tests for known issues in the original project

## Documentation

Project docs live in [docs/](docs/index.md) and are organized around:

- installation and quickstart
- API reference
- worked examples
