Fast C++ implementation of fractional calculus operators via pybind11
Project description
differintC
differintC is a high-performance C++ library with Python bindings for computing fractional differintegrals (derivatives and integrals of arbitrary real order) using numerical methods.
This package implements optimized versions of the Riemann–Liouville and Grünwald–Letnikov (GL) fractional differintegral operators, inspired by the original DifferInt project.
⚙️ Built with modern C++17 and exposed to Python via
pybind11, this library is significantly faster than pure-Python equivalents, especially for large arrays and high-precision needs.
📦 Installation
pip install differintC
To build from source:
git clone https://github.com/your-username/differintC-project.git
cd differintC-project
pip install .
🚀 Usage
from differintC import RLpoint, RL, GLpoint, GL
# Example 1: Riemann–Liouville at a single point
result = RLpoint(0.5, lambda x: x**2)
print("RLpoint(0.5, x^2) =", result)
# Example 2: RL on a whole domain
import numpy as np
x = np.linspace(0, 1, 100)
f = x**2
out = RL(0.5, f)
# Example 3: Grünwald–Letnikov pointwise
gl_res = GLpoint(0.5, lambda x: np.sqrt(x))
# Example 4: Full array version (fastest)
gl_array = GL(0.5, lambda x: np.sqrt(x))
All functions support either a NumPy array or a Python callable as the f_name argument.
📚 Implemented Functions
| Function | Description |
|---|---|
RLpoint |
Riemann–Liouville differintegral at a point |
RL |
RL differintegral over a uniform domain |
GLpoint |
Grünwald–Letnikov at a point (optimized) |
GL |
Vectorized GL differintegral with FFT |
⚖️ License and Credits
This package was inspired by and based on the original DifferInt project. We thank the authors for their foundational work in fractional calculus.
Licensed under MIT.
🛠 Development Notes
See the todo list 1 for the development roadmap and planned features. Contributions are welcome.
Project details
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 differintc-0.0.1.tar.gz.
File metadata
- Download URL: differintc-0.0.1.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29979954bcb70d2bfec2773ba94f81eeff5cd6d8c00d32222931e02ef532e454
|
|
| MD5 |
c9eebf0d62d7090ca4dcb23748d7d417
|
|
| BLAKE2b-256 |
109f25a6f78c1b3b36d188b01434c157ee25dd0369687edebc4fe520bbfcdb75
|
File details
Details for the file differintc-0.0.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: differintc-0.0.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 4.5 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c5c997484bef5fb3c0018533bf8dabc4310363f3ed8e8bc7c08db2c7498ac2b
|
|
| MD5 |
c2876acd75ebcee15f1c71f5d47c8719
|
|
| BLAKE2b-256 |
501ec153b61e49c41e181969c7a9c965c5f4df5495ddd4c2d0ffd70bac4f0acb
|