Shape-preserving piecewise rational cubic interpolation (Delbourgo-Gregory algorithm)
Project description
piecewise-rational
Shape-preserving piecewise rational cubic interpolation using the Delbourgo-Gregory algorithm.
Installation
pip install piecewise-rational
Usage
from piecewise_rational import rational_cubic_interpolation
# Interpolate at x=0.5 given endpoints and derivatives
x_l, x_r = 0.0, 1.0 # interval
y_l, y_r = 0.0, 1.0 # values at endpoints
d_l, d_r = 1.0, 1.0 # derivatives at endpoints
r = 0.0 # control parameter
y = rational_cubic_interpolation(0.5, x_l, x_r, y_l, y_r, d_l, d_r, r)
Features
- Shape-preserving interpolation (maintains monotonicity and convexity)
- Control parameters for fitting second derivatives
- High numerical precision
References
- R. Delbourgo, J.A. Gregory, "Shape preserving piecewise rational interpolation", SIAM Journal on Scientific and Statistical Computing, 1985.
- Peter Jaeckel, "Let's Be Rational", www.jaeckel.org
License
MIT License. Python implementation derived from Peter Jaeckel's LetsBeRational.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file piecewise_rational-1.0.0.tar.gz.
File metadata
- Download URL: piecewise_rational-1.0.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.2 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6d9d9022b78fa689ac4a62045401c6d0489ca69c94ce55befe045e0bfd4d6da
|
|
| MD5 |
f01a6d07a8c369f2b06cf4c218432a29
|
|
| BLAKE2b-256 |
bd4897b958909077335ffdfbb5eae12c4125d2fcfd0fa0cac45c8f451ee1be5e
|
File details
Details for the file piecewise_rational-1.0.0-py3-none-any.whl.
File metadata
- Download URL: piecewise_rational-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.12.2 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a972b0b9bb45acc78f1c8bc9a26575c002c79bee8da5811783890d9ed5902ed
|
|
| MD5 |
3b197e417661361f4e299dcd6ba79568
|
|
| BLAKE2b-256 |
b30b7b20d417bcdea2f0ad0b2cac966d48ba03181a607977c5a4de8276b9eee9
|