|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.math.matrix.MatricesMeasure
public class MatricesMeasure
MatricesMeasure provides methods applicable to two (or more) matrices.
Given two matrices A and B, returns a single value which is a function of A and B.
Constructor Summary | |
---|---|
MatricesMeasure()
|
Method Summary | |
---|---|
static boolean |
areEqual(Matrix a,
Matrix b)
Compares all elements of two matrices for equality. |
static boolean |
areEqual(Matrix a,
Matrix b,
double tolerance)
Compares all elements of two matrices for equality to specified tolerance. |
static boolean |
areSameSize(Matrix a,
Matrix b)
Compares size of two matrices. |
static double |
dotProduct(Matrix a,
Matrix b)
Dot product of two matrices. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatricesMeasure()
Method Detail |
---|
public static double dotProduct(Matrix a, Matrix b)
a
- First matrix.b
- Second matrix.
The two matrices must be the same size. The dot product is the sum of the element-wise products of the two matrices.
public static boolean areEqual(Matrix a, Matrix b, double tolerance)
a
- First matrix.b
- Second matrix.tolerance
- Tolerance.
Two matrix elements are deemed equal if |a(i,j) - b(i,j)| <= tolerance.
public static boolean areEqual(Matrix a, Matrix b)
a
- First matrix.b
- Second matrix.
public static boolean areSameSize(Matrix a, Matrix b)
a
- First matrix.b
- Second matrix.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |