org.jmatrices.dbl.measure
Class MatricesMeasure

java.lang.Object
  extended byorg.jmatrices.dbl.measure.MatricesMeasure

public final class MatricesMeasure
extends java.lang.Object

MatricesMeasure provides methods applicable to two (or more) matrices

Given two matrices A,B -yields-> value ,where value is a number, boolean, or any other primitive type

Author: purangp

Date: 12.03.2004 Time: 12:51:46


Constructor Summary
MatricesMeasure()
           
 
Method Summary
static boolean areEqual(Matrix a, Matrix b)
          Compares elements of matrices to try and determine equality of matrices
static boolean areSameDimension(Matrix a, Matrix b)
          Compares dimensions of the two matrices
static double dotProduct(Matrix a, Matrix b)
          The dot or scalar product expects two vectors

It basically does an element-by-element multiplication and sums the elements of the resulting matrix.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatricesMeasure

public MatricesMeasure()
Method Detail

areEqual

public static boolean areEqual(Matrix a,
                               Matrix b)
Compares elements of matrices to try and determine equality of matrices

Parameters:
a - Matrix
b - Matrix
Returns:
true iff element in a at a given position equals the element in b at the same position

areSameDimension

public static boolean areSameDimension(Matrix a,
                                       Matrix b)
Compares dimensions of the two matrices

Parameters:
a - Matrix
b - Matrix
Returns:
true if rows and columns, i.e. the dimensions of a and b are are equal

dotProduct

public static double dotProduct(Matrix a,
                                Matrix b)
The dot or scalar product expects two vectors

It basically does an element-by-element multiplication and sums the elements of the resulting matrix. So the two matrices need to be of the same dimensions

Parameters:
a - an mxn Matrix
b - an mxn Matrix
Returns: