Difference between revisions of "Main Page"

From Efficient Java Matrix Library
Jump to navigation Jump to search
(23 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
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 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.
  
EJML has three distinct ways to interact with it:  1) procedural, 2) object oriented, and 3) equations.  Procedure provides all capabilities of EJML and almost complete control over memory creation, speed, and specific algorithms.  Object oriented provides a simplified subset of the core capabilities in an easy to use 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.
+
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.
 
|}
 
|}
  
 
{|
 
{|
| colspan="2" width="500pt" align="center" |
+
| colspan="3" align="center" |
{|width="280pt" style="font-size:120%; text-align:left;"
+
{|style="font-size:120%; text-align:left;"
 
|-
 
|-
| '''Version:''' ''v0.26''
+
| '''Version:''' ''v0.30''
 
|-
 
|-
| '''Date:''' ''September 15, 2014''  
+
| '''Date:''' ''November 9, 2016''  
 +
|-
 +
| [[Change Log]]
 
|}
 
|}
 
|- valign="top"  
 
|- valign="top"  
 
| width="220pt" |
 
| width="220pt" |
{| width="200pt" border="1"  align="center" style="font-size:120%; text-align:center;"
+
{| width="200pt" border="1"  align="center" style="font-size:120%; text-align:center; border-collapse:collapse; background-color:#ffffee;"
 
|-
 
|-
 
| [[Download|Download]]
 
| [[Download|Download]]
Line 31: Line 33:
 
|}
 
|}
 
| width="220pt" |
 
| width="220pt" |
{| width="200pt" border="1"  align="center" style="font-size:120%; text-align:center;"
+
{| width="200pt" border="1"  align="center" style="font-size:120%; text-align:center; border-collapse:collapse;  background-color:#ffffee;"
 
|-
 
|-
 
| [http://groups.google.com/group/efficient-java-matrix-library-discuss Message Board]
 
| [http://groups.google.com/group/efficient-java-matrix-library-discuss Message Board]
 
|-
 
|-
| [http://code.google.com/p/efficient-java-matrix-library/issues/list Bug Reports]
+
| [https://github.com/lessthanoptimal/ejml/issues Bug Reports]
 
|-
 
|-
 
| [[Frequently Asked Questions|FAQ]]
 
| [[Frequently Asked Questions|FAQ]]
 
|}
 
|}
 +
| width="220pt" |
 +
{| width="200pt" border="1"  align="center" style="font-size:120%; text-align:center; border-collapse:collapse;  background-color:#ffffee;"
 +
|-
 +
| [[Acknowledgments|Acknowledgments]]
 +
|-
 +
| [[Performance|Performance]]
 +
|-
 +
| [[Users|Users]]
 +
|}
 +
|}
 +
 +
<span style="font-size:200%">[[The_Great_Refactoring| Preview of Major Upcoming Changes in 0.31]]</span>
 +
 +
 +
== Code Examples ==
 +
 +
Demonstrations on how to compute the Kalman gain "K" using each interface in EJML.
 +
 +
{| width="500pt" |
 +
|-
 +
|
 +
'''Procedural'''
 +
<syntaxhighlight lang="java">
 +
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);
 +
</syntaxhighlight>
 +
 +
'''SimpleMatrix'''
 +
<syntaxhighlight lang="java">
 +
SimpleMatrix S = H.mult(P).mult(H.transpose()).plus(R);
 +
SimpleMatrix K = P.mult(H.transpose().mult(S.invert()));
 +
</syntaxhighlight>
 +
 +
'''Equations'''
 +
<syntaxhighlight lang="java">
 +
eq.process("K = P*H'*inv( H*P*H' + R )");
 +
</syntaxhighlight>
 
|}
 
|}
 +
 +
== Functionality ==
 +
 +
{| class="wikitable" width="650pt" border="1" |
 +
!  Data Structures || Operations
 +
|-
 +
| style="vertical-align:top;" |
 +
* Fixed Sized
 +
* Dense Real
 +
** Row-major
 +
** Block
 +
* Dense Complex
 +
** Row-major
 +
 +
| style="vertical-align:top;" |
 +
* 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
 +
|}. 
 +
 +
 +
{| class="wikitable" width="650pt" border="1" |
 +
! 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 || ||
 +
|-
 +
| Cholesky LL || style="text-align:center;" | X || style="text-align:center;" | X || ||
 +
|-
 +
| Cholesky LDL || style="text-align:center;" | X || style="text-align:center;" | || ||
 +
|-
 +
| QR || style="text-align:center;" | X || style="text-align:center;" | X || ||
 +
|-
 +
| QRP || style="text-align:center;" | X || style="text-align:center;" | || ||
 +
|-
 +
| SVD || style="text-align:center;" | X || style="text-align:center;" | || ||
 +
|-
 +
| Eigen-Symmetric || style="text-align:center;" | X || style="text-align:center;" | || ||
 +
|-
 +
| Eigen-General || style="text-align:center;" | X || style="text-align:center;" | || ||
 +
|}
 +
Support is provided for doubles only.  Next release (v0.31) will provide support for floats.
 +
 +
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 18:52, 24 January 2017


Ejml logo.gif

Efficient Java Matrix Library (EJML) is a 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.

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.30
Date: November 9, 2016
Change Log
Download
Manual
JavaDoc
Message Board
Bug Reports
FAQ
Acknowledgments
Performance
Users

Preview of Major Upcoming Changes in 0.31


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
  • Dense Real
    • Row-major
    • Block
  • Dense Complex
    • Row-major
  • 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
Cholesky LL X X
Cholesky LDL X
QR X X
QRP X
SVD X
Eigen-Symmetric X
Eigen-General X

Support is provided for doubles only. Next release (v0.31) will provide support for floats.

EJML is currently a single threaded library only. Multi threaded work will start once block implementations of SVD and Eigenvalue are finished.