public class MatrixFeatures_F
extends java.lang.Object
Constructor and Description |
---|
MatrixFeatures_F() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isEquals(FMatrix a,
FMatrix b)
Checks to see if each element in the two matrices are equal:
aij == bij
|
static boolean |
isIdentical(FMatrix a,
FMatrix b,
float tol)
Checks to see if each corresponding element in the two matrices are
within tolerance of each other or have the some symbolic meaning.
|
public static boolean isEquals(FMatrix a, FMatrix b)
Checks to see if each element in the two matrices are equal: aij == bij
NOTE: If any of the elements are NaN then false is returned. If two corresponding elements are both positive or negative infinity then they are equal.
a
- A matrix. Not modified.b
- A matrix. Not modified.public static boolean isIdentical(FMatrix a, FMatrix b, float tol)
Checks to see if each corresponding element in the two matrices are within tolerance of each other or have the some symbolic meaning. This can handle NaN and Infinite numbers.
If both elements are countable then the following equality test is used:
|aij - bij| ≤ tol.
Otherwise both numbers must both be Float.NaN, Float.POSITIVE_INFINITY, or
Float.NEGATIVE_INFINITY to be identical.
a
- A matrix. Not modified.b
- A matrix. Not modified.tol
- Tolerance for equality.