{"id":13647202,"url":"https://github.com/lessthanoptimal/ejml","last_synced_at":"2025-05-14T12:09:03.224Z","repository":{"id":14336727,"uuid":"17046292","full_name":"lessthanoptimal/ejml","owner":"lessthanoptimal","description":"A fast and easy to use linear algebra library written in Java for dense, sparse, real, and complex matrices.","archived":false,"fork":false,"pushed_at":"2025-03-22T01:28:53.000Z","size":9616,"stargazers_count":579,"open_issues_count":35,"forks_count":119,"subscribers_count":30,"default_branch":"SNAPSHOT","last_synced_at":"2025-04-15T01:55:05.347Z","etag":null,"topics":["blas","hacktoberfest","linear-algebra-library","matrix","sparse-matrix"],"latest_commit_sha":null,"homepage":"https://ejml.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lessthanoptimal.png","metadata":{"files":{"readme":"README.md","changelog":"change.txt","contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-21T05:16:46.000Z","updated_at":"2025-04-09T17:09:17.000Z","dependencies_parsed_at":"2024-01-14T10:18:35.485Z","dependency_job_id":"ec601f56-452f-46f8-a555-7bd5ec369802","html_url":"https://github.com/lessthanoptimal/ejml","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanoptimal%2Fejml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanoptimal%2Fejml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanoptimal%2Fejml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessthanoptimal%2Fejml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lessthanoptimal","download_url":"https://codeload.github.com/lessthanoptimal/ejml/tar.gz/refs/heads/SNAPSHOT","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991542,"owners_count":21194894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blas","hacktoberfest","linear-algebra-library","matrix","sparse-matrix"],"created_at":"2024-08-02T01:03:23.935Z","updated_at":"2025-04-15T01:55:11.073Z","avatar_url":"https://github.com/lessthanoptimal.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# Efficient Java Matrix Library\n\n                    Author: Peter Abeles\n                            peter.abeles@gmail.com \n\n#####  Project Website: http://ejml.org\n\n[![Build Status](https://github.com/lessthanoptimal/ejml/actions/workflows/gradle.yml/badge.svg)](https://github.com/lessthanoptimal/ejml/actions/workflows/gradle.yml)\n\n## Introduction\n\nEfficient Java Matrix Library (EJML) is a linear algebra library for manipulating real/complex/dense/sparse matrices. Its design goals are; 1) to be as computationally and memory efficient as possible for both small and large matrices, and 2) to be accessible to both novices and experts. These goals are accomplished by dynamically selecting the best algorithms to use at runtime, clean API, and multiple interfaces. EJML is free, written in 100% Java and has been released under an Apache v2.0 license.\n\nEJML has three distinct ways to interact with it: 1) Operations, 2) SimpleMatrix, and 3) Equations. Operations provides all capabilities of EJML and almost complete control over memory creation, speed, and specific algorithms with a procedural API. SimpleMatrix provides a simplified subset of the core capabilities in an easy to use flow styled object-oriented API, inspired by Jama. Equations is a symbolic interface, similar in spirit to Matlab and other CAS, that provides a compact way of writing equations.\nThe following functionality is provided:\n\n* Basic Operators (addition, multiplication, ...)\n* Matrix Manipulation (extract, insert, combine, ...)\n* Linear Solvers (linear, least squares,incremental, ...)\n* Decompositions (LU, QR, Cholesky, SVD, Eigenvalue, ...)\n* Matrix Features (rank, symmetric, definitiveness, ...)\n* Random Matrices (covariance, orthogonal, symmetric, ...)\n* Different Internal Formats (row-major, block, sparse, ...)\n* Graph BLAS (Semirings)\n* Single Thread and Concurrent Implementations\n* Unit Testing\n* Kotlin Extensions\n\nUnit tests are extensively used to ensure correctness of each algorithm's implementation.  Internal benchmarks and [Java Matrix Benchmark](https://lessthanoptimal.github.io/Java-Matrix-Benchmark/) are both used to ensure the speed of this library.\n\n---------------------------------------------------------------------------\n## Documentation\n\nFor a more detailed explanation of how to use the library see:\n\nhttp://ejml.org/wiki/index.php?title=Manual\n\nThe JavaDoc has also been posted online at:\n\nhttp://ejml.org/javadoc/\n\n---------------------------------------------------------------------------\n## Maven Central\n\nEJML is in Maven central repository and can easily be added to Gradle, Maven, and similar project managers.\n\n```\n\u003cgroupId\u003eorg.ejml\u003c/groupId\u003e\n\u003cartifactId\u003eejml-all\u003c/artifactId\u003e\n\u003cversion\u003e0.44.0\u003c/version\u003e\n```\n\nThis will add the entire library.  Alternatively, you can include the required modules individually:\n\n| Name                | Description                                           |\n|---------------------|-------------------------------------------------------|\n| ejml-core           | Contains core data structures and common code         |\n| ejml-fdense         | Algorithms for dense real 32-bit floats               |\n| ejml-ddense         | Algorithms for dense real 64-bit floats               |\n| ejml-cdense         | Algorithms for dense complex 32-bit floats            |\n| ejml-zdense         | Algorithms for dense complex 64-bit floats            |\n| ejml-fsparse        | Algorithms for sparse real 32-bit floats              |\n| ejml-dsparse        | Algorithms for sparse real 64-bit floats              |\n| ejml-simple         | Object oriented SimpleMatrix and Equations interfaces |\n\n## Building\n\nUnless you need a bleeding edge new feature or are contributing to EJML you probably don't need to build it yourself\nsince pre-build jars are readily available on Maven Central.  Gradle is the official tool environment for EJML. Java 17\nor higher is required to build EJML, but it will generate Java 11 byte code. This is because it uses a few recent\nlanguage features.\n\nTo build EJML from the command line use the following commands. These will generate all the source code and install\nit in your local Maven repository. \n```bash\ncd ejml\n./gradlew autogenerate\n./gradlew publishToMavenLocal\n```\n\nHere are a few other useful Gradle commands:\n\n* createLibraryDirectory : To build all the modules as jars and save them in ejml/libraries\n* oneJar : To compile all the modules into a single jar at ejml/EJML.jar\n\n---\n\n## File System\n\n* **docs/** :\n         Documentation for this library. This documentation is often out of date and online is the best place to get the latest.\n* **examples/** :\n         Contains several examples of how EJML can be used to solve different problems or how EJML can be modified for different applications.\n* **main/** :\n         Library source code\n* **change.txt** :\n         History of what changed between each version.\n\n---------------------------------------------------------------------------\n\n# Procedural, SimpleMatrix, and Equations API\n\nEJML provides three different ways to access the library.  This lets the user trade off ease of use for control/complexity.  An example of each is shown below.  All of which implement Kalman gain function:\n\n[Procedural](http://ejml.org/wiki/index.php?title=Procedural)\n```\nmult(H,P,c);\nmultTransB(c,H,S);\naddEquals(S,R);\nif( !invert(S,S_inv) ) throw new RuntimeException(\"Invert failed\");\nmultTransA(H,S_inv,d);\nmult(P,d,K);\n```\n\n[SimpleMatrix](http://ejml.org/wiki/index.php?title=SimpleMatrix)\n```\nSimpleMatrix S = H.mult(P).mult(H.transpose()).plus(R);\nSimpleMatrix K = P.mult(H.transpose().mult(S.invert()));\n```\n\n[Equations](http://ejml.org/wiki/index.php?title=Equations)\n```\neq.process(\"K = P*H'*inv( H*P*H' + R )\");\n```\n\n---------------------------------------------------------------------------\n\n## Procedural API: Matrix and Class Names\n\nEJML supports a variety of different matrix types and uses the following pattern for matrix class names:\n\n```\nPatterns:\n\n\u003cdata type\u003eMatrix\u003cstructure\u003e\n\u003cdata type\u003eMatrixSparse\u003cstructure\u003e\n\nDescription:\n\n\u003cdata type\u003e is a single character\n  'D' for real double \n  'F' for real float \n  'Z' for complex double\n  'C' for complex float\n  'B' for binary\n\u003cstructure\u003e is the internal data structure's name, see below.\n\nMatrix Suffix   Abbreviation   Description\n=========================================================================\n   RMaj            RM         dense row-major\n   RBlock          RB         dense block row-major\n   NxN             FN         dense fixed sized matrix of size N\n   N               FN         dense fixed sized vector of length N  \n   CSC             CC         compressed sparse column\n   Triplet         TR         sparse triplet\n=========================================================================\n\nExamples:\n\n  DMatrixRMaj         double real dense row-major matrix\n  CMatrixRMaj         float complex dense row-major matrix\n  ZMatrixSparseCSC    double complex sparse CSC matrix\n  \n  CommonOps_DDRM      Operations on DMatrixRMaj\n  CommonOps_DSCC      Operations on DMatrixSparseCSC\n```\n\nAlgorithms which operate on a specific matrix type have a suffix that's 5 characters, e.g. _DDRM.  The first letter 'D' is the data type, the second letter 'D' is for dense (sparse is 'S'), and the last two letters are an abbreviation for the structure.\n\n---------------------------------------------------------------------------\n## Questions and Comments\n\nA public message board has been created for asking questions and making comments:\n\nhttp://groups.google.com/group/efficient-java-matrix-library-discuss\n\nBugs can either be posted on that message board or at:\n\nhttps://github.com/lessthanoptimal/ejml/issues\n\n---------------------------------------------------------------------------\n## Acknowledgements\n\nI would like to thank all the people have made various comments, suggestions, and reported bugs.  Also David Watkins\nfor writing \"Fundamentals of Matrix Computations\", which clearly explains algorithms and yet addresses important\nimplementation issues.  Timothy A. Davis for his book \"Direct Methods for Sparse Linear Systems\" and for CSparse\nwhich provided the initial seed for the sparse algorithms.\n\n---------------------------------------------------------------------------\n## License\n\nEJML is released under the Apache v2.0 open source license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flessthanoptimal%2Fejml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flessthanoptimal%2Fejml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flessthanoptimal%2Fejml/lists"}