Difference between revisions of "Main Page"

From Efficient Java Matrix Library
Jump to navigation Jump to search
(20 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
|-
 
|-
 
|
 
|
Efficient Java Matrix Library (EJML) is a [http://en.wikipedia.org/wiki/Linear_algebra linear algebra] library for manipulating dense 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.
+
 
 +
Efficient Java Matrix Library (EJML) is a [http://en.wikipedia.org/wiki/Linear_algebra 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 small and large, dense and sparse, real and complex 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.
 +
 
  
 
EJML has three distinct ways to interact with it:  1) ''procedural'', 2) ''SimpleMatrix'', and 3) ''Equations''.  ''Procedure'' provides all capabilities of EJML and almost complete control over memory creation, speed, and specific algorithms.  ''SimpleMatrix'' provides a simplified subset of the core capabilities in an easy to use flow styled object-oriented API, inspired by [http://math.nist.gov/javanumerics/jama/ Jama].  ''Equations'' is a symbolic interface, similar in spirit to [http://www.mathworks.com/products/matlab/ Matlab] and other [http://en.wikipedia.org/wiki/Computer_algebra_system CAS], that provides a compact way of writing equations.
 
EJML has three distinct ways to interact with it:  1) ''procedural'', 2) ''SimpleMatrix'', and 3) ''Equations''.  ''Procedure'' provides all capabilities of EJML and almost complete control over memory creation, speed, and specific algorithms.  ''SimpleMatrix'' provides a simplified subset of the core capabilities in an easy to use flow styled object-oriented API, inspired by [http://math.nist.gov/javanumerics/jama/ Jama].  ''Equations'' is a symbolic interface, similar in spirit to [http://www.mathworks.com/products/matlab/ Matlab] and other [http://en.wikipedia.org/wiki/Computer_algebra_system CAS], that provides a compact way of writing equations.
Line 16: Line 18:
 
{|style="font-size:120%; text-align:left;"
 
{|style="font-size:120%; text-align:left;"
 
|-
 
|-
| '''Version:''' ''v0.31''
+
| '''Version:''' ''v0.40''
 
|-
 
|-
| '''Date:''' ''May 17, 2017''  
+
| '''Date:''' ''November 4, 2020''  
 
|-
 
|-
| [https://github.com/lessthanoptimal/ejml/blob/master/convert_to_ejml31.py Upgrade Script]
+
| [https://github.com/lessthanoptimal/ejml/blob/master/convert_to_ejml31.py v0.31 Upgrade Script]
 
|-
 
|-
| [[Change Log]]
+
| [https://github.com/lessthanoptimal/ejml/blob/v0.40/change.txt Change Log]
 
|}
 
|}
 
|- valign="top"  
 
|- valign="top"  
Line 42: Line 44:
 
|-
 
|-
 
| [[Frequently Asked Questions|FAQ]]
 
| [[Frequently Asked Questions|FAQ]]
 +
|-
 +
| [[Kotlin|Kotlin]]
 
|}
 
|}
 
| width="220pt" |
 
| width="220pt" |
Line 52: Line 56:
 
| [[Users|Users]]
 
| [[Users|Users]]
 
|}
 
|}
 +
|}
 +
 +
== News 2021 ==
 +
 +
{| width="500pt" |
 +
| -
 +
|
 +
* Read and write EJML in Matlab format with [https://github.com/HebiRobotics/MFL MFL] from HEBI Robotics
 +
* Graph BLAS continues to be flushed out with masks being added to latest SNAPSHOT
 +
* Concurrency/threading has been added to some operations
 
|}
 
|}
  
Line 66: Line 80:
 
multTransB(c,H,S);
 
multTransB(c,H,S);
 
addEquals(S,R);
 
addEquals(S,R);
if( !invert(S,S_inv) ) throw new RuntimeException("Invert failed");
+
if( !invert(S,S_inv) )
 +
    throw new RuntimeException("Invert failed");
 
multTransA(H,S_inv,d);
 
multTransA(H,S_inv,d);
 
mult(P,d,K);
 
mult(P,d,K);
Line 90: Line 105:
 
| style="vertical-align:top;" |
 
| style="vertical-align:top;" |
 
* Fixed Sized
 
* Fixed Sized
 +
** Matrix 2x2 to 6x6
 +
** Vector 2 to 6
 
* Dense Real
 
* Dense Real
 
** Row-major
 
** Row-major
Line 95: Line 112:
 
* Dense Complex
 
* Dense Complex
 
** Row-major
 
** Row-major
 +
* Sparse Real
 +
** Compressed Column
  
 
| style="vertical-align:top;" |
 
| style="vertical-align:top;" |
 +
* Full support for floats and doubles
 
* Basic Operators (addition, multiplication, ... )
 
* Basic Operators (addition, multiplication, ... )
 
* Matrix Manipulation (extract, insert, combine, ... )
 
* Matrix Manipulation (extract, insert, combine, ... )
Line 110: Line 130:
 
! style="width: 40%;" | Decomposition || style="width: 15%;" |Dense Real || style="width: 15%;" |Dense Complex || style="width: 15%;" |Sparse Real  || style="width: 15%;" |Sparse Complex
 
! style="width: 40%;" | Decomposition || style="width: 15%;" |Dense Real || style="width: 15%;" |Dense Complex || style="width: 15%;" |Sparse Real  || style="width: 15%;" |Sparse Complex
 
|-
 
|-
| LU || style="text-align:center;" | X || style="text-align:center;" | X || ||  
+
| LU || style="text-align:center;" | X || style="text-align:center;" | X || style="text-align:center;" | X ||  
 
|-
 
|-
| Cholesky LL || style="text-align:center;" | X || style="text-align:center;" | X || ||  
+
| Cholesky LL || style="text-align:center;" | X || style="text-align:center;" | X || style="text-align:center;" | X ||  
 
|-
 
|-
 
| Cholesky LDL || style="text-align:center;" | X || style="text-align:center;" | || ||  
 
| Cholesky LDL || style="text-align:center;" | X || style="text-align:center;" | || ||  
 
|-
 
|-
| QR || style="text-align:center;" | X || style="text-align:center;" | X || ||  
+
| QR || style="text-align:center;" | X || style="text-align:center;" | X || style="text-align:center;" | X ||  
 
|-
 
|-
 
| QRP || style="text-align:center;" | X || style="text-align:center;" | || ||  
 
| QRP || style="text-align:center;" | X || style="text-align:center;" | || ||  
Line 127: Line 147:
 
|}
 
|}
 
Support for floats (32-bit) and doubles (64-bit) is available.  Sparse matrix support is only available for basic operations at this time.
 
Support for floats (32-bit) and doubles (64-bit) is available.  Sparse matrix support is only available for basic operations at this time.
 
EJML is currently a single threaded library only.  Multi threaded work will start once block implementations of SVD and Eigenvalue are finished.
 
 
</center>
 
</center>

Revision as of 19:45, 17 February 2021


Ejml logo.gif

Efficient 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 small and large, dense and sparse, real and complex 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.


EJML has three distinct ways to interact with it: 1) procedural, 2) SimpleMatrix, and 3) Equations. Procedure provides all capabilities of EJML and almost complete control over memory creation, speed, and specific algorithms. 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.

Version: v0.40
Date: November 4, 2020
v0.31 Upgrade Script
Change Log
Download
Manual
JavaDoc
Message Board
Bug Reports
FAQ
Kotlin
Acknowledgments
Performance
Users

News 2021

-
  • Read and write EJML in Matlab format with MFL from HEBI Robotics
  • Graph BLAS continues to be flushed out with masks being added to latest SNAPSHOT
  • Concurrency/threading has been added to some operations

Code Examples

Demonstrations on how to compute the Kalman gain "K" using each interface in EJML.

Procedural

mult(H,P,c);
multTransB(c,H,S);
addEquals(S,R);
if( !invert(S,S_inv) )
    throw new RuntimeException("Invert failed");
multTransA(H,S_inv,d);
mult(P,d,K);

SimpleMatrix

SimpleMatrix S = H.mult(P).mult(H.transpose()).plus(R);
SimpleMatrix K = P.mult(H.transpose().mult(S.invert()));

Equations

eq.process("K = P*H'*inv( H*P*H' + R )");

Functionality

Data Structures Operations
  • Fixed Sized
    • Matrix 2x2 to 6x6
    • Vector 2 to 6
  • Dense Real
    • Row-major
    • Block
  • Dense Complex
    • Row-major
  • Sparse Real
    • Compressed Column
  • Full support for floats and doubles
  • Basic Operators (addition, multiplication, ... )
  • Matrix Manipulation (extract, insert, combine, ... )
  • Linear Solvers (linear, least squares, incremental, ... )
  • Decompositions (LU, QR, Cholesky, SVD, Eigenvalue, ...)
  • Matrix Features (rank, symmetric, definitiveness, ... )
  • Random Matrices (covariance, orthogonal, symmetric, ... )
  • Unit Testing
.


Decomposition Dense Real Dense Complex Sparse Real Sparse Complex
LU X X X
Cholesky LL X X X
Cholesky LDL X
QR X X X
QRP X
SVD X
Eigen-Symmetric X
Eigen-General X

Support for floats (32-bit) and doubles (64-bit) is available. Sparse matrix support is only available for basic operations at this time.