|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.PersistentObject
org.apache.mahout.math.matrix.linalg.Property
@Deprecated public class Property
Field Summary | |
---|---|
static Property |
DEFAULT
Deprecated. The default Property object; currently has tolerance()==1.0E-9. |
static Property |
TWELVE
Deprecated. A Property object with tolerance()==1.0E-12. |
static Property |
ZERO
Deprecated. A Property object with tolerance()==0.0. |
Constructor Summary | |
---|---|
Property(double newTolerance)
Deprecated. Constructs an instance with a tolerance of Math.abs(newTolerance). |
Method Summary | |
---|---|
protected static java.lang.String |
blanks(int length)
Deprecated. Returns a String with length blanks. |
static void |
checkRectangular(AbstractMatrix2D A)
Deprecated. Checks whether the given matrix A is rectangular. |
static void |
checkSquare(AbstractMatrix2D A)
Deprecated. Checks whether the given matrix A is square. |
static double |
density(DoubleMatrix2D A)
Deprecated. Returns the matrix's fraction of non-zero cells; A.cardinality() / A.size(). |
boolean |
equals(DoubleMatrix1D A,
double value)
Deprecated. Returns whether all cells of the given matrix A are equal to the given value. |
boolean |
equals(DoubleMatrix1D A,
DoubleMatrix1D B)
Deprecated. Returns whether both given matrices A and B are equal. |
boolean |
equals(DoubleMatrix2D A,
double value)
Deprecated. Returns whether all cells of the given matrix A are equal to the given value. |
boolean |
equals(DoubleMatrix2D A,
DoubleMatrix2D B)
Deprecated. Returns whether both given matrices A and B are equal. |
boolean |
equals(DoubleMatrix3D A,
double value)
Deprecated. Returns whether all cells of the given matrix A are equal to the given value. |
boolean |
equals(DoubleMatrix3D A,
DoubleMatrix3D B)
Deprecated. Returns whether both given matrices A and B are equal. |
static void |
generateNonSingular(DoubleMatrix2D A)
Deprecated. Modifies the given matrix square matrix A such that it is diagonally dominant by row and column, hence non-singular, hence invertible. |
protected static java.lang.String |
get(ObjectArrayList<java.lang.String> list,
int index)
Deprecated. |
boolean |
isDiagonal(DoubleMatrix2D A)
Deprecated. A matrix A is diagonal if A[i,j] == 0 whenever i != j. |
static boolean |
isDiagonallyDominantByColumn(DoubleMatrix2D A)
Deprecated. A matrix A is diagonally dominant by column if the absolute value of each diagonal element is larger than the sum of the absolute values of the off-diagonal elements in the corresponding column. |
static boolean |
isDiagonallyDominantByRow(DoubleMatrix2D A)
Deprecated. A matrix A is diagonally dominant by row if the absolute value of each diagonal element is larger than the sum of the absolute values of the off-diagonal elements in the corresponding row. |
boolean |
isIdentity(DoubleMatrix2D A)
Deprecated. A matrix A is an identity matrix if A[i,i] == 1 and all other cells are zero. |
boolean |
isLowerBidiagonal(DoubleMatrix2D A)
Deprecated. A matrix A is lower bidiagonal if A[i,j]==0 unless i==j || i==j+1. |
boolean |
isLowerTriangular(DoubleMatrix2D A)
Deprecated. A matrix A is lower triangular if A[i,j]==0 whenever i < j. |
static boolean |
isNonNegative(DoubleMatrix2D A)
Deprecated. A matrix A is non-negative if A[i,j] >= 0 holds for all cells. |
boolean |
isOrthogonal(DoubleMatrix2D A)
Deprecated. A square matrix A is orthogonal if A*transpose(A) = I. |
static boolean |
isPositive(DoubleMatrix2D A)
Deprecated. A matrix A is positive if A[i,j] > 0 holds for all cells. |
boolean |
isSingular(DoubleMatrix2D A)
Deprecated. A matrix A is singular if it has no inverse, that is, iff det(A)==0. |
boolean |
isSkewSymmetric(DoubleMatrix2D A)
Deprecated. A square matrix A is skew-symmetric if A = -transpose(A), that is A[i,j] == -A[j,i]. |
static boolean |
isSquare(AbstractMatrix2D A)
Deprecated. A matrix A is square if it has the same number of rows and columns. |
boolean |
isStrictlyLowerTriangular(DoubleMatrix2D A)
Deprecated. A matrix A is strictly lower triangular if A[i,j]==0 whenever i <= j. |
boolean |
isStrictlyTriangular(DoubleMatrix2D A)
Deprecated. A matrix A is strictly triangular if it is triangular and its diagonal elements all equal 0. |
boolean |
isStrictlyUpperTriangular(DoubleMatrix2D A)
Deprecated. A matrix A is strictly upper triangular if A[i,j]==0 whenever i >= j. |
boolean |
isSymmetric(DoubleMatrix2D A)
Deprecated. A matrix A is symmetric if A = tranpose(A), that is A[i,j] == A[j,i]. |
boolean |
isTriangular(DoubleMatrix2D A)
Deprecated. A matrix A is triangular iff it is either upper or lower triangular. |
boolean |
isTridiagonal(DoubleMatrix2D A)
Deprecated. A matrix A is tridiagonal if A[i,j]==0 whenever Math.abs(i-j) > 1. |
boolean |
isUnitTriangular(DoubleMatrix2D A)
Deprecated. A matrix A is unit triangular if it is triangular and its diagonal elements all equal 1. |
boolean |
isUpperBidiagonal(DoubleMatrix2D A)
Deprecated. A matrix A is upper bidiagonal if A[i,j]==0 unless i==j || i==j-1. |
boolean |
isUpperTriangular(DoubleMatrix2D A)
Deprecated. A matrix A is upper triangular if A[i,j]==0 whenever i > j. |
boolean |
isZero(DoubleMatrix2D A)
Deprecated. A matrix A is zero if all its cells are zero. |
int |
lowerBandwidth(DoubleMatrix2D A)
Deprecated. The lower bandwidth of a square matrix A is the maximum i-j for which A[i,j] is nonzero and i > j. |
int |
semiBandwidth(DoubleMatrix2D A)
Deprecated. Returns the semi-bandwidth of the given square matrix A. |
void |
setTolerance(double newTolerance)
Deprecated. Sets the tolerance to Math.abs(newTolerance). |
double |
tolerance()
Deprecated. Returns the current tolerance. |
java.lang.String |
toString(DoubleMatrix2D A)
Deprecated. Returns summary information about the given matrix A. |
int |
upperBandwidth(DoubleMatrix2D A)
Deprecated. The upper bandwidth of a square matrix A is the maximum j-i for which A[i,j] is nonzero and j > i. |
Methods inherited from class org.apache.mahout.math.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Property DEFAULT
public static final Property ZERO
public static final Property TWELVE
Constructor Detail |
---|
public Property(double newTolerance)
Method Detail |
---|
protected static java.lang.String blanks(int length)
public static void checkRectangular(AbstractMatrix2D A)
java.lang.IllegalArgumentException
- if A.rows() < A.columns().public static void checkSquare(AbstractMatrix2D A)
java.lang.IllegalArgumentException
- if A.rows() != A.columns().public static double density(DoubleMatrix2D A)
public boolean equals(DoubleMatrix1D A, double value)
A
- the first matrix to compare.value
- the value to compare against.
public boolean equals(DoubleMatrix1D A, DoubleMatrix1D B)
A
- the first matrix to compare.B
- the second matrix to compare.
public boolean equals(DoubleMatrix2D A, double value)
A
- the first matrix to compare.value
- the value to compare against.
public boolean equals(DoubleMatrix2D A, DoubleMatrix2D B)
A
- the first matrix to compare.B
- the second matrix to compare.
public boolean equals(DoubleMatrix3D A, double value)
A
- the first matrix to compare.value
- the value to compare against.
public boolean equals(DoubleMatrix3D A, DoubleMatrix3D B)
A
- the first matrix to compare.B
- the second matrix to compare.
public static void generateNonSingular(DoubleMatrix2D A)
A
- the square matrix to modify.
java.lang.IllegalArgumentException
- if !isSquare(A).protected static java.lang.String get(ObjectArrayList<java.lang.String> list, int index)
public boolean isDiagonal(DoubleMatrix2D A)
public static boolean isDiagonallyDominantByColumn(DoubleMatrix2D A)
Note: Ignores tolerance.
public static boolean isDiagonallyDominantByRow(DoubleMatrix2D A)
Note: Ignores tolerance.
public boolean isIdentity(DoubleMatrix2D A)
public boolean isLowerBidiagonal(DoubleMatrix2D A)
public boolean isLowerTriangular(DoubleMatrix2D A)
public static boolean isNonNegative(DoubleMatrix2D A)
Note: Ignores tolerance.
public boolean isOrthogonal(DoubleMatrix2D A)
java.lang.IllegalArgumentException
- if !isSquare(A).public static boolean isPositive(DoubleMatrix2D A)
Note: Ignores tolerance.
public boolean isSingular(DoubleMatrix2D A)
public boolean isSkewSymmetric(DoubleMatrix2D A)
java.lang.IllegalArgumentException
- if !isSquare(A).public static boolean isSquare(AbstractMatrix2D A)
public boolean isStrictlyLowerTriangular(DoubleMatrix2D A)
public boolean isStrictlyTriangular(DoubleMatrix2D A)
public boolean isStrictlyUpperTriangular(DoubleMatrix2D A)
public boolean isSymmetric(DoubleMatrix2D A)
java.lang.IllegalArgumentException
- if !isSquare(A).public boolean isTriangular(DoubleMatrix2D A)
public boolean isTridiagonal(DoubleMatrix2D A)
public boolean isUnitTriangular(DoubleMatrix2D A)
public boolean isUpperBidiagonal(DoubleMatrix2D A)
public boolean isUpperTriangular(DoubleMatrix2D A)
public boolean isZero(DoubleMatrix2D A)
public int lowerBandwidth(DoubleMatrix2D A)
A
- the square matrix to analyze.
java.lang.IllegalArgumentException
- if !isSquare(A).semiBandwidth(DoubleMatrix2D)
,
upperBandwidth(DoubleMatrix2D)
public int semiBandwidth(DoubleMatrix2D A)
The upper bandwidth is the maximum j-i for which A[i,j] is nonzero and j > i. The lower bandwidth is the maximum i-j for which A[i,j] is nonzero and i > j. Diagonal, tridiagonal and triangular matrices are special cases.
Examples:
matrix | 4 x 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 | 4 x 4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 |
4 x 4 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1 | 4 x 4 0 1 1 1 0 1 1 1 0 0 0 1 0 0 0 1 |
4 x 4 0 0 0 0 1 1 0 0 1 1 0 0 1 1 1 1 | 4 x 4 1 1 0 0 0 1 1 0 0 1 0 1 1 0 1 1 | 4 x 4 1 1 1 0 0 1 0 0 1 1 0 1 0 0 1 1 |
upperBandwidth | 0 | 0 | 1 | 3 | 0 | 1 | 2 |
lowerBandwidth | 0 | 0 | 1 | 0 | 3 | 3 | 2 |
semiBandwidth | 1 | 1 | 2 | 4 | 4 | 4 | 3 |
description |
zero | diagonal | tridiagonal | upper triangular | lower triangular | unstructured | unstructured |
A
- the square matrix to analyze.
java.lang.IllegalArgumentException
- if !isSquare(A).lowerBandwidth(DoubleMatrix2D)
,
upperBandwidth(DoubleMatrix2D)
public void setTolerance(double newTolerance)
java.lang.UnsupportedOperationException
- if this==DEFAULT || this==ZERO || this==TWELVE.public double tolerance()
public java.lang.String toString(DoubleMatrix2D A)
density : 0.9 isDiagonal : false isDiagonallyDominantByRow : false isDiagonallyDominantByColumn : false isIdentity : false isLowerBidiagonal : false isLowerTriangular : false isNonNegative : true isOrthogonal : Illegal operation or error: Matrix must be square. isPositive : true isSingular : Illegal operation or error: Matrix must be square. isSkewSymmetric : Illegal operation or error: Matrix must be square. isSquare : false isStrictlyLowerTriangular : false isStrictlyTriangular : false isStrictlyUpperTriangular : false isSymmetric : Illegal operation or error: Matrix must be square. isTriangular : false isTridiagonal : false isUnitTriangular : false isUpperBidiagonal : false isUpperTriangular : false isZero : false lowerBandwidth : Illegal operation or error: Matrix must be square. semiBandwidth : Illegal operation or error: Matrix must be square. upperBandwidth : Illegal operation or error: Matrix must be square.
public int upperBandwidth(DoubleMatrix2D A)
A
- the square matrix to analyze.
java.lang.IllegalArgumentException
- if !isSquare(A).semiBandwidth(DoubleMatrix2D)
,
lowerBandwidth(DoubleMatrix2D)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |