Metadata-Version: 2.2
Name: apxchol
Version: 0.1.1
Summary: CPU approximate-Cholesky preconditioner for graph-Laplacian / SDDM linear systems
License: Academic Evaluation License (interim)
         
         Copyright (c) 2026 ETH Zürich and the apxchol contributors.
         All rights reserved.
         
         This software is provided free of charge for academic research and
         evaluation purposes only. Redistribution, sublicensing, or commercial
         use, in source or binary form, is prohibited without prior written
         permission from the copyright holders.
         
         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 ARISING FROM THE USE OF THE SOFTWARE.
         
         This is an interim license intended to enable early access while a
         final license is selected; it may be replaced in a future release.
         
Requires-Python: >=3.10
Requires-Dist: numpy>=1.21
Requires-Dist: scipy>=1.7
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Description-Content-Type: text/markdown

# apxchol (Python, CPU)

Approximate-Cholesky preconditioner for graph-Laplacian / SDDM linear systems.

```bash
pip install apxchol
```

Prebuilt wheels: Linux x86_64 (manylinux), CPython 3.10–3.14. CPU only.

```python
import apxchol

solver = apxchol.solver(A)              # scipy sparse SPD Laplacian or SDDM; factor once
res = solver.solve(b, tol=1e-8, maxiter=500)
res.x, res.iters, res.residual, res.converged

z = solver.apply(r)                     # M^{-1} r
M = solver.aslinearoperator()           # use as M= in scipy.sparse.linalg.cg

res = apxchol.solve(A, b)               # one-shot convenience
```

Laplacian vs SDDM is auto-detected: singular Laplacians get a rank-(n−1)
factor with native null-space handling; SDDM systems get the full-rank factor.
The factor is built once per `solver(A)` and reused across right-hand sides;
`solve` runs the library's OpenMP-parallel PCG (threads via `OMP_NUM_THREADS`).

Defaults only — tuning parameters, GPU, and 64-bit indices (n or nnz ≥ 2³¹)
are not exposed in this version.

## License

Interim academic-evaluation license: free for academic research and
evaluation; redistribution and commercial use prohibited. See `LICENSE`.

## From source (requires repository access)

The wheel build compiles the library's two core translation units directly;
building from a repo checkout works the same way:

```bash
pip install -e python          # from the repository root
pytest python/tests -v
```

Source builds use `-O3 -march=native` (the distributed wheels are built
portable). If your environment requires `--no-build-isolation`, first
`pip install pybind11 scikit-build-core`.
