org.jmatrices.dbl.operator
Interface MatrixEBEOperation


public interface MatrixEBEOperation

MatrixEBEOperation

Encapsulates an operation that can be performed on elements at the same position in two matrices.

Usage: from MatrixOperator.add(org.jmatrices.dbl.Matrix, org.jmatrices.dbl.Matrix)

 public static Matrix add(Matrix a, Matrix b) {
       return applyEBEOperation(a, b, new MatrixEBEOperation() {
           public double apply(double a, double b) {
               return a + b;
           }
       });
   }
 

Check out the "See Also" list to find some more methods that use this method

Author: purangp

Date: 07.03.2004 Time: 19:17:46

See Also:
MatrixOperator, MatrixOperator.subtract(org.jmatrices.dbl.Matrix, org.jmatrices.dbl.Matrix), MatrixOperator.multiplyEBE(org.jmatrices.dbl.Matrix, org.jmatrices.dbl.Matrix), MatrixOperator.divideEBE(org.jmatrices.dbl.Matrix, org.jmatrices.dbl.Matrix)

Method Summary
 double apply(double a, double b)
          Applies the operation to the elements todo - perhaps we should provide row, col for better control!
 

Method Detail

apply

public double apply(double a,
                    double b)
Applies the operation to the elements

todo - perhaps we should provide row, col for better control!

Parameters:
a - element of a matrix
b - element of a matrix
Returns:
result of application of an operation