Metadata-Version: 2.4
Name: cubicmultispline
Version: 0.1.2
Summary: Generation of cubic, multivariate splines from samples with arbitrary boundary conditions
Home-page: https://github.com/a118145/cubic-multivar-spline
Author: A. C. Feldkamp
Author-email: 
License: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.4
Requires-Dist: scipy>=1.12
Requires-Dist: matplotlib>=3.10.0
Provides-Extra: dev
Requires-Dist: twine>=6.2; extra == "dev"
Requires-Dist: setuptools>=82.0.0; extra == "dev"
Requires-Dist: matplotlib>=3.10.0; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Provides-Extra: torch
Requires-Dist: torch>=2.0; extra == "torch"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# CubicMultiSpline documentation
Library for cubic, **multivariate spline interpolation** from samples with **arbitrary boundary conditions for each dimension**. Optional GPU backend available via PyTorch. The full documentation can be found at <a href="https://cubicmultispline.readthedocs.io" target="_blank">https://cubicmultispline.readthedocs.io</a>.

## Overview
This library implements the recursive algorithm by <a href="https://link.springer.com/article/10.1007/s10614-007-9092-4" target="_blank">Habermann and Kindermann</a> in the `Spline` class. The 1-dimensional base case, which is needed during recursion is implemented in the `Spline1D` class. In contrast to other multivariate spline implementations, this library allows for arbitrary boundary conditions for each dimension, that is
1. not-a-knot
2. first order (clamped)
3. second order (natural)
4. periodic 

Additionally, the library provides an efficient function `eval_spline` to evaluate the spline at arbitrary points inside the domain. The GPU backend is accessed via the `TorchSpline` and `TorchSpline1D` classes.

## Installation

The easiest way to install the library is to use `pip`:

```bash
pip install cubicmultispline
```

If you want to use the PyTorch backend, install with:

```bash
pip install cubicmultispline[torch]
```

Alternatively, you can install the library from source:

```bash
python setup.py install
```

## License

This library is licensed under the MIT License.
