A high-performance matrix library for Elixir/Erlang with C and CBLAS backend, optimized for speed and large-scale operations.
Matrex is a blazing-fast matrix library for Elixir and Erlang that leverages C and CBLAS for high-performance numerical operations. It solves the need for efficient matrix manipulation within the BEAM ecosystem, offering significant speed advantages over pure-Elixir libraries and supporting large-scale data processing.
Elixir and Erlang developers working on numerical computing, machine learning, data science, or any application requiring efficient matrix operations and linear algebra.
Developers choose Matrex for its exceptional performance, achieved through native C and CBLAS integration, making it up to thousands of times faster than pure-Elixir alternatives while maintaining memory efficiency for large matrices.
A blazing fast matrix library for Elixir/Erlang with C implementation using CBLAS.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages CBLAS sgemm() for matrix multiplication, making it up to thousands of times faster than pure-Elixir libraries like Matrix and Numexy, as shown in benchmark comparisons.
Memory-efficient design supports matrices with up to a billion elements, enabling large-scale numerical computing within the BEAM ecosystem without excessive memory overhead.
Implements the Inspect protocol with heatmap display, allowing for easy matrix visualization directly in the IEx console, as demonstrated with MNIST digit examples in the README.
Supports fast binary (.mtx) and CSV formats for saving and loading, with CSV compatibility to GNU Octave for straightforward data exchange between systems.
Handles NaN, Inf, and -Inf within matrices, converting them to atoms (:nan, :inf) when accessed in Elixir, ensuring proper integration with BEAM's float handling limitations.
Requires C compiler and BLAS libraries (e.g., libatlas-base-dev on Ubuntu), with setup varying by OS and Windows support being uncertain, adding significant deployment overhead.
The optional Matrex.Operators module for readable code is 2.5 times slower than using module methods, as admitted in the README, forcing a choice between speed and syntactic sugar.
Focuses on optimized core operations but may lack the breadth of functions found in more established libraries like NumPy, such as sparse matrix support or advanced decompositions.