Maths Package

The maths package contains the following sub-packages:

Interface descriptions

NumericalConstants

This interface defines some commonly used numbers. It is desirable to use these where possible as it removes the need to compute them, reducing numerical errors and processor time.

Class descriptions

Complex

Complex functions are implemented as static methods. This was done to improve code readability, e.g. Complex.sin(z) rather than z.sin().

Tip: where possible use the constants defined in the Complex class. These numbers are already instantiated and will reduce memory usage.

Matrix and Vector classes

The matrix and vector classes support three different numeric types. These are integer (for speed), double (for accuracy) and complex.

The square matrix classes introduce the following methods:

ExtraMath

The ExtraMath class contains methods that are not and should be available in java.lang.Math. These consist of the hyperbolic trigonometric functions.

LinearMath

This class contains methods for solving common linear algebra problems.

FourierMath

The FourierMath class contains methods for performing the FFT and the inverse FFT of an array of data. Most uses will need to wrap the sort method around the FFT method to return the output in the correct ascending order.

Class hierarchy

Vector tree

 MathVector
     |
...Vector
     |
     ------------------
     |                |
...3Vector     ...SparseVector

Matrix tree

     Matrix
       |
  ...Matrix
       |
       ------------------------
       |                      |
...SquareMatrix      ...SparseMatrix
       |
...TridiagonalMatrix
       |
...DiagonalMatrix

Statistics

This package contains classes that model several statistical distributions.

Chaos

Contains some chaotic maps.

Groups

The discrete group classes represent elements using a,b,c,e notation (e=identity). The Lie group parent class uses complex square matrices to represent its elements. All Lie group sub-classes override the LieGroup class methods in such a way as to maintain the matrix representation, even though they themselves may use a different representation.

Algebras

This package contains classes that encapsulate some common Lie algebras.


Return to the Developer's Guide contents.