|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.matrix.AbstractMatrix
public abstract class AbstractMatrix
An AbstractMatrix implements most of a matrix's
functionality in terms of methods for accessing numbers of rows and
columns and values.
| Constructor Summary | |
|---|---|
protected |
AbstractMatrix()
Construct an abstract matrix. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractMatrix()
| Method Detail |
|---|
public abstract int numRows()
Matrix
numRows in interface Matrixpublic abstract int numColumns()
Matrix
numColumns in interface Matrix
public abstract double value(int row,
int column)
Matrix
value in interface Matrixrow - The specified row.column - The specified column.
public 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().
equals in interface Matrixequals in class Objectthat - Object to test for equality with this matrix.
true if the specified object is a matrix
with the same dimensionality and values as this matrix.public int hashCode()
Matrix
interface's documentation.
hashCode in interface MatrixhashCode in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||