diff --git a/README.md b/README.md index 71e9a2a..41f64ea 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,64 @@ # numethods +A small, from-scratch, object-oriented Python package implementing classic numerical methods. +**No NumPy / SciPy solvers used** — algorithms are implemented transparently for learning and research. + +## Features + +### Linear system solvers + +- **LU decomposition** (with partial pivoting): `LUDecomposition` +- **Gauss–Jordan** elimination: `GaussJordan` +- **Jacobi** iterative method: `Jacobi` +- **Gauss–Seidel** iterative method: `GaussSeidel` +- **Cholesky** factorization (SPD): `Cholesky` + +### Root-finding + +- **Bisection**: `Bisection` +- **Fixed-Point Iteration**: `FixedPoint` +- **Secant**: `Secant` +- **Newton’s method** (for roots): `NewtonRoot` + +### Interpolation + +- **Newton** (divided differences): `NewtonInterpolation` +- **Lagrange** polynomials: `LagrangeInterpolation` + +### Orthogonalization, QR, and Least Squares (NEW) + +- **Classical Gram–Schmidt**: `QRGramSchmidt` +- **Modified Gram–Schmidt**: `QRModifiedGramSchmidt` +- **Householder QR** (numerically stable): `QRHouseholder` +- **QR-based linear solver** (square systems): `QRSolver` +- **Least Squares** for overdetermined systems (via QR): `LeastSquaresSolver` + +### Matrix & Vector utilities + +- Minimal `Matrix` / `Vector` classes +- `@` operator for **matrix multiplication** (NEW) +- `*` for **scalar**–matrix multiplication +- `.T` for transpose +- Forward / backward substitution helpers + +--- + +## Install (editable) + +```bash +pip install -e /numethods +``` + +or just add `/numethods` to `PYTHONPATH`. + +## Examples + +```bash +python /numethods/examples/demo.py +``` + +## Notes + +- All algorithms are implemented without relying on external linear algebra solvers. +- Uses plain Python floats and list-of-lists for matrices/vectors. +- Tolerances use a relative criterion `|Δ| ≤ tol (1 + |value|)`. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..814b978 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,18 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "numethods" +version = "0.1.0" +description = "Some numerical methods implemented in Python" +authors = [ + { name = "Deniz Donmez", email = "denzdonmez@gmail.com" } +] +readme = "README.md" +requires-python = ">=3.8" +license = { text = "MIT" } + +[tool.setuptools.packages.find] +where = ["."] +include = ["numethods"]