Interface Matrix
-
- All Superinterfaces:
Cloneable
,Cloneable
- All Known Subinterfaces:
XMatrix
- All Known Implementing Classes:
AffineTransform2D
,GeneralMatrix
,Matrix1
,Matrix2
,Matrix3
,Matrix4
@UML(identifier="PT_Matrix", specification=OGC_01009) public interface Matrix extends Cloneable
A two dimensional array of numbers. Row and column numbering begins with zero.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Matrix
clone()
Returns a clone of this matrix.double
getElement(int row, int column)
Retrieves the value at the specified row and column of this matrix.int
getNumCol()
Returns the number of columns in this matrix.int
getNumRow()
Returns the number of rows in this matrix.boolean
isIdentity()
Returnstrue
if this matrix is an identity matrix.void
setElement(int row, int column, double value)
Modifies the value at the specified row and column of this matrix.
-
-
-
Method Detail
-
getNumRow
@Extension int getNumRow()
Returns the number of rows in this matrix.- Returns:
- The number of rows in this matrix.
-
getNumCol
@Extension int getNumCol()
Returns the number of columns in this matrix.- Returns:
- The number of columns in this matrix.
-
getElement
@Extension 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
@Extension 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
@Extension boolean isIdentity()
Returnstrue
if this matrix is an identity matrix.- Returns:
true
if this matrix is an identity matrix.
-
-