RingElements and FieldElements with operations like addition, subtraction, multiplication and - for FieldElements - division.
Euclidean division and Euclidean algorithm on any RingElements (Matrix, Polynomials, Rationals, Complex numbers etc.).
Basic matrix and vector operations like scalar product and matrix multiplication.
Also: Fast matrix multiplication using the Strassen- and the Strassen-Winograd algorithms.
Matrices and vectors can be filled with arbitrary field elements like rational numbers, complex numbers or even prime fields.
Compute the inverse or the determinant of a matrix.
Gauss- and Gauss-Jordan algorithm are available.
Calculate a solution or the solution space of a linear equation system.
Calculate the eigenvalues of real matrices.
Univariate polynomials including polynomial division and calculating the GCD
All operations can be done without rounding errors
(except for numeric data types like DoubleWrapper).
Element-wise mathematical and logical operations on vectors and matrices.
L1 and L2 vector norms.
Canonical vector and matrix factory methods: identity matrix,
all ones, all zeros, uniformly distributed noise,
Gaussian (normally distributed) noise.
Application of user-defined functions to all elements of a matrix
or vector (or pairs of matrices and vectors).
Getting Started
Go to the Download section and get the latest version of JLinAlg.
Set up your environment (We recommend to use Eclipse 2020-09 in any of the following two cases):
If you want to use JLinAlg as a library, use jlinalg-v0.xx.jar contained in the Zip-file.
In Eclipse you can just add it to your project by going to Project -> Properties ->
java build path -> libraries. There you can use "Add Jars" (drag and drop jlinalg-0.xx.jar
to your project first) or "Add External Jars" and select the location of jlinalg-0.xx.jar
In case you want to have a look at the source code, you can find it inside the Zip-file
under "JLinAlg/src".
In Eclipse you can just go to File -> Import -> Existing Projects into Workspace.
Now select the directory containing the downloaded Zip-file and the project JLinAlg-v0.xx
should appear and be checked. Now click "finish".
Get to know JLinAlg. Have a look at the examples and the documentation (both also included in the Zip-File).
Do something cool with it.
Use our forums at Sourceforge and tell us about it!
If you find a bug, please use our bug tracker or contact us directly to let us know.
Download
JLinAlg-v0.8:
The complete source code including Eclipse project files, the API as a jar-file and javadoc in one zip-file.
The class F2 represents an element of the modulo 2 field F2 and a factory as inner class.
F2 is a field,
just like the rational numbers. The examples in F2Demo.java illustrate how to create elements in F2 using the
factory, how to create matrices, and to operate on them. The file F2.java shows how to implement a type and a factory.
EigenvaluesDemo.java: This example
shows how JLinAlg can do eigenvalue computation
with real matrices (matrices with DoubleWrapper entries).
FieldPDemo.java: This demonstration of the class FieldP shows that in vector spaces over
finite fields there can be linear dependent vectors which are all orthogonal to
each other.
Xor.java: Exclusive-Or neural net problem using JLinAlg.
HilbertMatrixDemo.java: This demo shows how the squared distance between the real solution of an equation system to the one that is found when using floating point arithmetic, grows exponentially when the dimension of the Hilbert matrix increases.
ArbitraryPrecisionDemo.java: Demonstration that shows how quickly floating point numbers can cause rounding errors and how you can avoid these using arbitrary precision (Rational).
PolynomialDemo.java: Some operations on polynomials (including calculating the GCD using the Euclidean algorithm).
Project Members
Andreas Keilhauer: Freelance software engineer and founder of JLinAlg, Germany
Simon D. Levy: Assoc. Professor, Washington and Lee University, USA
Regression 2003: Program for regression analysis (uses JLinAlg)
SNARLI: Java-library
for neural networks (uses JLinALg)
Crystal Net tools analyse auto- and isomorphisms of infinite nets (representing often crystals ;-) and needs vectors and matrices with rational numbers for this.
JAS: The Java Algebra System (JAS) is an object oriented, type safe and multi-threaded approach to computer algebra. It also has an adapter for JLinAlg.