Interface Matrix
-
- All Known Subinterfaces:
XMatrix
- All Known Implementing Classes:
AffineTransform2D,GeneralMatrix,Matrix1,Matrix2,Matrix3,Matrix4
public interface Matrix extends Cloneable
A two dimensional array of numbers. Row and column numbering begins with zero.- Since:
- GeoAPI 1.0
- Author:
- Martin Desruisseaux (IRD)
- See Also:
AffineTransform,
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Matrixclone()Returns a clone of this matrix.doublegetElement(int row, int column)Retrieves the value at the specified row and column of this matrix.intgetNumCol()Returns the number of columns in this matrix.intgetNumRow()Returns the number of rows in this matrix.booleanisIdentity()Returnstrueif this matrix is an identity matrix.voidsetElement(int row, int column, double value)Modifies the value at the specified row and column of this matrix.
-
-
-
Method Detail
-
getNumRow
int getNumRow()
Returns the number of rows in this matrix.- Returns:
- The number of rows in this matrix.
-
getNumCol
int getNumCol()
Returns the number of columns in this matrix.- Returns:
- The number of columns in this matrix.
-
getElement
double getElement(int row, int column)Retrieves the value at the specified row and column of this matrix.- Parameters:
row- The row number to be retrieved (zero indexed).column- The column number to be retrieved (zero indexed).- Returns:
- The value at the indexed element.
-
setElement
void setElement(int row, int column, double value)Modifies the value at the specified row and column of this matrix.- Parameters:
row- The row number to be retrieved (zero indexed).column- The column number to be retrieved (zero indexed).value- The new matrix element value.
-
isIdentity
boolean isIdentity()
Returnstrueif this matrix is an identity matrix.- Returns:
trueif this matrix is an identity matrix.
-
clone
Matrix clone()
Returns a clone of this matrix.- Specified by:
clonein interfaceCloneable- Returns:
- A clone of this matrix.
- See Also:
Object.clone()
-
-