C++
Project description
cppmath
A fast library of mathematical algorithms in C++, optimized for Olympiad problems and high-performance computing.
Installation
pip install cppmath
Usage
import cppmath
# High Precision Initialization
config = cppmath.initialize_precision(precision_bits=128, optimize_cache=True)
# Linear Algebra
matrix = [[1, 2], [3, 4]]
result = cppmath.fast_matrix_power(matrix, 10)
eigenvalues = cppmath.eigenvalue_approximation(matrix)
# Optimization
objective = [1, 2, 3]
constraints = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
result = cppmath.optimization_solver(objective, constraints, method="genetic")
# Differential equations
coeffs = [1, 0.5, 0.25]
initial = [1.0, 0.0]
solution = cppmath.differential_equation_solver(coeffs, initial, step_size=0.01, num_steps=100)
# Numerical integration
function_coeffs = [1, 2, 3] # f(x) = 1 + 2x + 3x^2
integral = cppmath.numerical_integration(function_coeffs, 0, 1, intervals=1000)
# Monte Carlo simulation
points = cppmath.monte_carlo_simulation(dimensions=3, samples=1000, seed=42)
Functionality
- High-performance linear algebras
- Optimization methods (genetic algorithms, simplex method)
- Solving differential equations
- Numerical integration
- Monte Carlo simulations
- Fast Fourier transform
- Distributed caching of computations
Requirements
- Python 3.6+
- NumPy (optional, for better performance)
- requests (for distributed caching)
License
MIT
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
cppmath-1.0.0.tar.gz
(38.5 kB
view details)
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
cppmath-1.0.0-py3-none-any.whl
(40.8 kB
view details)
File details
Details for the file cppmath-1.0.0.tar.gz.
File metadata
- Download URL: cppmath-1.0.0.tar.gz
- Upload date:
- Size: 38.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac342a3eec52fb5ae9a5cd2d6a1321b5fb5d58556fd7e901c1cd1f09bff3903e
|
|
| MD5 |
a3f5a0e115db402ea69f334dc166b2e2
|
|
| BLAKE2b-256 |
0ef3c6a2235725dfc0fe3d1d60adf58404e2bcaaaadb3ded962e8c5d360e29e4
|
File details
Details for the file cppmath-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cppmath-1.0.0-py3-none-any.whl
- Upload date:
- Size: 40.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d216218a4a0a152c1b5afc3b65d7cb0bb2518c6e325415b6728e3e9a601ecd5
|
|
| MD5 |
3f0dbd186255f9272f1f0272800f4007
|
|
| BLAKE2b-256 |
4852f38c6021f08bb8824b5793f29d46096649953c3a5a956b3bea04a28d92fc
|