public abstract class AbstractMatrix extends Object implements Matrix
AbstractMatrix implements most of a matrix's
functionality in terms of methods for accessing numbers of rows and
columns and values.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMatrix()
Construct an abstract matrix.
|
| Modifier and Type | Method and Description |
|---|---|
Vector |
columnVector(int column)
Returns the specified column of this matrix.
|
boolean |
equals(Object that)
Return
true if the specified object is a matrix of
the same dimensionality with the same values. |
int |
hashCode()
Returns a hash code as specified in the
Matrix
interface's documentation. |
abstract int |
numColumns()
Returns the number of columns in the matrix.
|
abstract int |
numRows()
Returns the number of rows in the matrix.
|
Vector |
rowVector(int row)
Returns the specified row of this matrix.
|
void |
setValue(int row,
int column,
double value)
Throw an unsupported operation exception.
|
abstract double |
value(int row,
int column)
Returns the value in the matrix at the specified row and
column.
|
public abstract int numRows()
Matrixpublic abstract int numColumns()
MatrixnumColumns in interface Matrixpublic abstract double value(int row,
int column)
Matrixpublic void setValue(int row,
int column,
double value)
setValue in interface Matrixrow - Ignored.column - Ignored.value - Ignored.UnsupportedOperationException - If not overridden by a
subclass implementation.IndexOutOfBoundsException - If the row or column indexes
are out of bounds.public Vector rowVector(int row)
No check is made that the row is within current bounds of the
matrix, but attempts to access values for a row matrix that
is out of bounds will throw a runtime exception if the underlying
matrix's value(int,int) method throws an exception..
rowVector in interface Matrixrow - Row whose vector is returned.IndexOutOfBoundsException - If the row index is out of bounds.public Vector columnVector(int column)
No check is made that the column is within current bounds of
the matrix, but attempts to access values for a column matrix
that is out of bounds will throw a runtime exception if the
underlying matrix's value(int,int) method throws
an exception.
columnVector in interface Matrixcolumn - Column whose vector is returned.public boolean equals(Object that)
true if the specified object is a matrix of
the same dimensionality with the same values. Note that labels
are ignored in establishing matrix identity. This definition
is consistent witht he definition of hashCode().Copyright © 2016 Alias-i, Inc.. All rights reserved.