Metadata-Version: 2.4
Name: clif-ga
Version: 0.1.0
Summary: Clifford-algebra engine: multivector inverse algorithms
Author: D. A. Jones
License: MIT License
        
        Copyright (c) 2026 D. A. Jones
        
        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.
        
Project-URL: Homepage, https://github.com/dajonesy/engine
Project-URL: Documentation, https://clif-ga.readthedocs.io
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: numba>=0.58
Provides-Extra: dev
Requires-Dist: jupyter; extra == "dev"
Requires-Dist: ipykernel; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: myst-nb; extra == "dev"
Requires-Dist: jupyter-cache; extra == "dev"
Requires-Dist: matplotlib; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: furo; extra == "dev"
Dynamic: license-file

# clif

A research toolkit for numerical computations in Clifford / geometric algebras, 
with an emphasis on **fast multivector inverses**, including a 6D inverse and 
an emerging dimension-independent approach.

> **Status:** research prototype, not yet a packaged release.
> The API is unstable and the test suite is still being built out.
> Star the repo if you want to follow along.

---

## What's here

The package implements Clifford algebra with explicit ordinal indexing of 
multivector components, efficient sign-table-based multiplication, and support 
for arbitrary metric signature and degeneracy. 
It's organized as four cooperating layers:

- `clif.context` — global algebra state (dimension, signature, degeneracy, grade table).
- `clif.sign_table` — builds/caches the multiplication sign table and a Numba-jitted fast
  multiplier for dimensions < 8.
- `clif.multivector` — the `Accum` class, a multivector as a NumPy array of real coefficients indexed by ordinal.
- `clif.util` — construction, printing, grade projection, involutions, and inverse models for specific dimensions.
- `clif.tools` — primitive signtable support functions
 
Inverse algorithms live in `clif.inverse`:

- `clif.inverse.fls` (and `clif.inverse.sparse_fls`) — Faddeev–LeVerrier–Souriau based inverses, with even/odd-graded variants.
- `clif.inverse.euclidean` — inverse for Euclidean (positive-definite) signatures.
- `clif.inverse.newton` — iterative refinement via Newton–Schulz.

## A worked example

```python
from clif.context import Cl, Layout
from clif.multivector import Accum

Cl(1, 1, 1)        # algebra with 1 positive, 1 negative, 1 null basis vector
A = Accum.random()
print(A)

Cl(1, 3)                  # spacetime algebra  Cl(1,3)
Layout([1, -1, -1, -1])   # equivalent, explicit
```

## Documentation

Built locally with Sphinx:

```bash
cd docs && make html
```

Then open `docs/_build/html/index.html` in a browser.

## License

MIT. See [LICENSE](LICENSE).
