Class MatMult

java.lang.Object
  extended by MatMult

public class MatMult
extends java.lang.Object

Matrix Multiplication main class.

Author:
Heinz Kredel.

Constructor Summary
MatMult()
           
 
Method Summary
static void main(java.lang.String[] args)
          main
 boolean matcheck0(double[][] A)
          Checks if the matrix is approximatly zero.
 double[][] matgen(int n, int m)
          Generates a matrix.
 double[][] matgen0(int n, int m)
          Generates the null-matrix.
 double[][] matgen1(int n, int m)
          Generates the unit-matrix.
 void matprint(double[][] A)
          Prints out the rows of matrix.
 void seqdiff(double[][] C, double[][] A, double[][] B)
          Performs a subtraction operation between two arrays sequentially.
 void transpose(double[][] B, double[][] A)
          Performs a transpose operation of the matrix.
 void transposeInplace(double[][] A)
          Performs a transpose operation of the matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatMult

public MatMult()
Method Detail

seqdiff

public void seqdiff(double[][] C,
                    double[][] A,
                    double[][] B)
Performs a subtraction operation between two arrays sequentially.

Parameters:
C - result matrix = A-B.
A - left matrix.
B - right matirx.

transposeInplace

public void transposeInplace(double[][] A)
Performs a transpose operation of the matrix. Must be a square matrix.

Parameters:
A - matrix.

transpose

public void transpose(double[][] B,
                      double[][] A)
Performs a transpose operation of the matrix. If A is n x m then B must be m x n.

Parameters:
A - Array.
B - Array transpose(A).

matgen

public double[][] matgen(int n,
                         int m)
Generates a matrix. Creates a two dimensional array A with the dimension n, m. The method random returns a random number within the intervall [0,1].

Parameters:
n - dimension of matrix.
m - dimension of matrix.

matgen0

public double[][] matgen0(int n,
                          int m)
Generates the null-matrix.

Parameters:
n - dimension of matrix.
m - dimension of matrix.

matgen1

public double[][] matgen1(int n,
                          int m)
Generates the unit-matrix.

Parameters:
n - dimension of matrix.
m - dimension of matrix.

matprint

public void matprint(double[][] A)
Prints out the rows of matrix.

Parameters:
A - Array.

matcheck0

public boolean matcheck0(double[][] A)
Checks if the matrix is approximatly zero. Checks if the absolut value of the matrix's elements are less than the production of the smallest positive value and 1000.

Parameters:
A - Two dimensional array.

main

public static void main(java.lang.String[] args)
main