org.naokishibata.math
Class Matrix

java.lang.Object
  extended by org.naokishibata.math.Matrix
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
VectorN, ViewMatrix

public class Matrix
extends java.lang.Object
implements java.io.Serializable

Matrix is an immutable class representing a matrix

See Also:
Serialized Form

Field Summary
protected  double[] a
           
protected  int m
           
protected  int n
           
 
Constructor Summary
Matrix(double[][] ary)
           
Matrix(double[] ary, int m, int n)
           
Matrix(int m0, int n0)
           
Matrix(Matrix m0)
           
 
Method Summary
 double determinant()
          Returns the determinant of this matrix
 boolean equals(Matrix mat)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
static Matrix identity(int n0)
           
 Matrix inversion()
          Returns the inversion of this matrix
 int m()
          Returns the number of of this matrix
 Matrix minus(Matrix m0)
           
 int n()
           
 Matrix plus(Matrix m0)
           
 Matrix put(int y, int x, double d)
           
 Matrix put(int y, int x, Matrix s)
           
 Matrix times(double v)
           
 Matrix times(Matrix m0)
           
 java.lang.String toString()
           
 Matrix transposition()
          Returns the transposition of this matrix
 double v(int y, int x)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

n

protected final int n

m

protected final int m

a

protected final double[] a
Constructor Detail

Matrix

public Matrix(int m0,
              int n0)

Matrix

public Matrix(Matrix m0)

Matrix

public Matrix(double[][] ary)

Matrix

public Matrix(double[] ary,
              int m,
              int n)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(Matrix mat)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

identity

public static Matrix identity(int n0)

v

public double v(int y,
                int x)

put

public Matrix put(int y,
                  int x,
                  double d)

put

public Matrix put(int y,
                  int x,
                  Matrix s)

n

public int n()

m

public int m()
Returns the number of of this matrix


times

public Matrix times(Matrix m0)

times

public Matrix times(double v)

plus

public Matrix plus(Matrix m0)

minus

public Matrix minus(Matrix m0)

transposition

public Matrix transposition()
Returns the transposition of this matrix


inversion

public Matrix inversion()
Returns the inversion of this matrix


determinant

public double determinant()
Returns the determinant of this matrix