|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.matrix.Matrices
public class Matrices
The Matrices class contains static utility methods
for various matrix properties and operations.
| Method Summary | |
|---|---|
static boolean |
hasZeroDiagonal(Matrix m)
Returns true if the specified matrix has
only zero values on its diagonal. |
static boolean |
isNonNegative(Matrix m)
Returns true if the matrix contains only positive
numbers or zeros. |
static boolean |
isSymmetric(Matrix m)
Returns true if the specified matrix is symmetric. |
static double[] |
toArray(Vector v)
Returns the content of the specified vector as an array. |
static Vector |
unmodifiableVector(Vector v)
Returns an unmodifiable view of the specified vector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Vector unmodifiableVector(Vector v)
UnsupportedOperationException
if Vector.setValue(int,double) is called.
v - Vector to return anpublic static boolean hasZeroDiagonal(Matrix m)
true if the specified matrix has
only zero values on its diagonal. If the matrix is
not square or has non-zero values on the diagonal, the
return result is false.
m - Matrix to test.
true if the matrix is square and has
only zero values on its diagonal.public static boolean isSymmetric(Matrix m)
true if the specified matrix is symmetric.
A matrix m is symmetric if it's equal to its
transpose, m = mT. Stated
directly, a matrix m is symmetric if it has the
same number of rows as columns:
m.numRows() == m.numColumns()
and meets the symmetry condition:
m.value(i,j) == m.value(j,i)fori,j < m.numRows().
m - Matrix to test.
true if the matrix is symmetric.public static boolean isNonNegative(Matrix m)
true if the matrix contains only positive
numbers or zeros. If it contains a finite negative number,
Double.NaN, or Double.NEGATIVE_INFINITY, the
result will be false.
m - Matrix to test.
true if the matrix contains only positive
entries or zeros.public static double[] toArray(Vector v)
v - The vector.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||