# Frequently Asked Questions

- summary Frequently Asked Questions

## Contents

# Frequently Asked Questions

Here is a list of frequently asked questions about EJML. Most of these questions have been asked and answered several times already.

## Why does EJML crash when I try to process a very large matrix?

If you are working with large matrices first do a quick sanity check. Ask yourself, how much memory is that matrix using and can my computer physically store it? Compute the number of required gigabytes with the following equation:

memory in gigabytes = (columns * rows*8)/(1024*1024*1024)

Now take the number and multiply it by 3 or 4 to take in account overhead/working memory and that's about how much memory your system will need to do anything useful. This is true for ALL dense linear algebra libraries. EJML is also limited by the size of a Java array, which can have at most 2^32 elements. If you are lucky the system is sparse (mostly zeros) and there problem might actually be feasible using other libraries, see below.

The other potentially fatal problem is that very large matrices are very slow to process. So even if you have enough RAM on your computer the time to compute the solution could well exceed the lifetime of a typical human.

## Will EJML work on Android?

Yes EJML has been used for quite some time on Android. The library does include a tinny bit of swing code, which will not cause any problems as long as you do not call anything related to visualization. In Android Studio simply reference the latest jar on the Maven central repository. See [Download] for how to do that.

## Multi-Threaded

Currently EJML is entirely single threaded. The plan is to max out single threaded performance by finishing block algorithms implementations, then declare the library to be at version 1.0. After that has happened, start work on multi-threaded implementations. However, there is no schedule in place for when all this will happen.

The main driving factor for when major new features are added is when I personally need such a feature. I'm starting to work on larger scale machine learning problems, so there might be a need soon. Another way to speed up the process is to volunteer your time and help develop it.

## Sparse Matrix Support

EJML has support for sparse matrices! Standard linear algebra operations and LU, Cholesky, and QR decompositions. The decompositions are based on CSparse.

## How do I do cross product?

Cross product and other geometric operations are outside of the scope of EJML. EJML is focused on linear algebra and does not aim to replicate tools like Matlab.

## Which Java version is required?

EJML can be compiled with Java 1.8 and beyond.

## What Version of EJML Supports Java X

With a bit of effort its possible to modify EJML to build on ancient version of Java. Mostly requires stripping out annotations and hunting down a few annoying changes in language. That said, if you want to use an official release your best bet is using an older version.

Java Version | EJML |
---|---|

1.8 + | Current |

1.7 | v0.33 |

1.5 | ???? |