com.croftsoft.core.math.matrix
Class MatrixImp

java.lang.Object
  extended by com.croftsoft.core.math.matrix.MatrixImp
All Implemented Interfaces:
Matrix, MatrixMut
Direct Known Subclasses:
Matrix3x3Imp

public class MatrixImp
extends Object
implements MatrixMut

Implementation of interface MatrixMut.

Since:
2008-04-25
Version:
$Id: MatrixImp.java,v 1.5 2008/05/09 18:35:56 croft Exp $
Author:
David Wallace Croft

Field Summary
protected  int columnCount
           
protected  int rowCount
           
protected  double[][] values
           
 
Constructor Summary
MatrixImp(double[][] values)
           
MatrixImp(int rowCount, int columnCount)
           
MatrixImp(Matrix matrix)
           
 
Method Summary
 MatrixMut copy()
           
 void copyToSelf(Matrix copy)
           
 double get(int row, int column)
           
 int getColumnCount()
           
 int getRowCount()
           
 boolean isIdentity()
           
 boolean isSquare()
           
 boolean matches(Matrix matrix)
           
 boolean matches(Matrix matrix, double tolerance)
           
 MatrixMut multiply(double scalar)
           
 MatrixMut multiply(Matrix matrix)
           
 void multiplyToSelf(double scalar)
           
 void multiplyToSelf(Matrix matrix)
           
 void set(int row, int column, double value)
           
 void setIdentity()
           
 String toString()
           
 MatrixMut transpose()
           
 void transposeSelf()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rowCount

protected final int rowCount

columnCount

protected final int columnCount

values

protected final double[][] values
Constructor Detail

MatrixImp

public MatrixImp(int rowCount,
                 int columnCount)

MatrixImp

public MatrixImp(Matrix matrix)

MatrixImp

public MatrixImp(double[][] values)
Method Detail

get

public double get(int row,
                  int column)
Specified by:
get in interface Matrix

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface Matrix

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface Matrix

isIdentity

public boolean isIdentity()
Specified by:
isIdentity in interface Matrix

isSquare

public boolean isSquare()
Specified by:
isSquare in interface Matrix

matches

public boolean matches(Matrix matrix)
Specified by:
matches in interface Matrix

matches

public boolean matches(Matrix matrix,
                       double tolerance)
Specified by:
matches in interface Matrix

copy

public MatrixMut copy()
Specified by:
copy in interface Matrix

multiply

public MatrixMut multiply(Matrix matrix)
Specified by:
multiply in interface Matrix

multiply

public MatrixMut multiply(double scalar)
Specified by:
multiply in interface Matrix

copyToSelf

public void copyToSelf(Matrix copy)
Specified by:
copyToSelf in interface MatrixMut

multiplyToSelf

public void multiplyToSelf(double scalar)
Specified by:
multiplyToSelf in interface MatrixMut

multiplyToSelf

public void multiplyToSelf(Matrix matrix)
Specified by:
multiplyToSelf in interface MatrixMut

set

public void set(int row,
                int column,
                double value)
Specified by:
set in interface MatrixMut

setIdentity

public void setIdentity()
Specified by:
setIdentity in interface MatrixMut

transpose

public MatrixMut transpose()
Specified by:
transpose in interface Matrix

transposeSelf

public void transposeSelf()
Specified by:
transposeSelf in interface MatrixMut

toString

public String toString()
Overrides:
toString in class Object

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)