ELDA is a small C++17 linear algebra library built with CMake. It provides a dense linalg::matrix type, common matrix operations, decomposition helpers, homogeneous transformation builders, and column-vector utilities.
The public headers live under include/elda/. The library target is elda, and the repository also includes a small demo executable named main.
For the primary documentation set, open docs/index.html in a browser. The site is fully static and now organizes the public API by header, with declaration blocks and usage examples for each exported entry, along with behavioral notes and visual 3x3 examples.
ELDA is open for contributions through GSSoC 2026. Contributors can start by reviewing issues.md for tasks grouped by difficulty, then follow the guidelines in CONTRIBUTING.md and the community standards in CODE_OF_CONDUCT.md.
For contribution-related questions, contact ayushmaankumarverma@gmail.com.
- Dense matrix storage backed by
std::vector<std::vector<double>> - Matrix addition, subtraction, multiplication, assignment, and scalar multiplication
- Elementary row and column operations
- Echelon, Gaussian, Gauss-Jordan, and canonical-style reduction helpers
- Determinant, inverse, transpose, adjoint, rank, norm, trace, characteristic polynomial, and linear-system solving helpers
- Gram-Schmidt orthogonalization and orthonormalization
- QR decomposition, LU decomposition, and eigenvalue estimation helpers
- 2D and 3D homogeneous translation, scaling, and rotation matrix builders
vec1throughvec5helpers for constructing zero or value-filled column vectorscheck_lin_comboverloads for span-membership checks on small column-vector sets- Near-zero floating-point cleanup through
fpg()
lin_alg_lib/
├── CMakeLists.txt
├── main.cpp
├── LICENSE
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── issues.md
├── include/
│ └── elda/
│ ├── linalg.hpp
│ ├── matrix.hpp
│ ├── transforms.hpp
│ └── vector_utils.hpp
├── src/
│ ├── matrix.cpp
│ ├── transforms.cpp
│ └── vector_utils.cpp
├── docs/
│ ├── index.html
│ ├── styles.css
│ └── app.js
├── DOCUMENTATION.MD
└── FUNCTIONS.MD
- CMake 3.14 or newer
- A C++17-compatible compiler such as
g++orclang++ - A native build tool supported by CMake
Configure and compile the library and demo:
cmake -S . -B build
cmake --build buildThis produces:
build/libelda.abuild/main
The demo reads a 3 x 3 matrix from standard input and prints the eigenvalue estimates returned by matrix::eigenvalues().
printf "3 4 5\n6 7 8\n8 2 3\n" | ./build/mainInclude the full public API:
#include <elda/linalg.hpp>Or include only the pieces you need:
#include <elda/matrix.hpp>
#include <elda/transforms.hpp>
#include <elda/vector_utils.hpp>If you consume this repository from another CMake project, link against the elda target after adding the source tree:
add_subdirectory(path/to/lin_alg_lib)
target_link_libraries(your_target PRIVATE elda)matrix.hpp: thelinalg::matrixtype plus arithmetic, reductions, decompositions, spectral helpers, and matrix utility functionstransforms.hpp: 2D and 3D homogeneous translation, scaling, and rotation matricesvector_utils.hpp:vec1-vec5column-vector constructors andcheck_lin_combhelperslinalg.hpp: umbrella header that includes all public headers
- The library namespace is
linalg. - Matrix entries are stored in
matrix::arrasstd::vector<std::vector<double>>. - Many transformation helpers return a new matrix, while reduction helpers such as
echelon(),gaussian(),gauss_jordan(), andcanonical()modify the matrix in place. - Most dimension mismatches are reported with
std::runtime_error. - Angles are interpreted in radians.
trace(),det(),inverse(),char_poly(), andeigenvalues()are defined only for square matrices.solve()expects an augmented matrix with shapeN x (N + 1).EPSis1e-6, andfpg()zeros values whose absolute value is at most that threshold.- Several low-level helpers assume valid indices and do not perform bounds checking.
- QR and eigenvalue routines use unshifted Gram-Schmidt/QR logic and are intended for simple real-valued workflows.
docs/index.html: primary static documentation siteDOCUMENTATION.MD: markdown summary aligned with the web docsFUNCTIONS.MD: compact public function indexissues.md: contributor issue backlog grouped by difficultyCONTRIBUTING.md: contribution workflow and development guidelinesCODE_OF_CONDUCT.md: community standards and reporting guidanceLICENSE: MIT License terms