|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
MatrixEBETransformation
Encapsulates an operation that can be performed on each element of a matrix
Meant for scalar ebe transformations or ebe function application.
Examples: As annonymous classes ..
private static Matrix scalarAddition(Matrix m, final double s) { return MatrixEBETransformer.ebeTransform(m, new MatrixEBETransformation() { public double transform(double element) { return element + s; //could be +, *, -, / } }); }
// unary minus or negation new MatrixEBETransformation() { double transform(double element) { return -element; } };
//scalar multiplication new MatrixEBETransformation() { double transform(double element) { return 2 * element; } };
// function application new MatrixEBETransformation() { double transform(double element) { return Math.sin(element); } };This interface may be dropped in the future in favour of the conditional one as that one essentially allows for everything that this interface allows .. or we might drop the MatrixConditionalEBETransformation, replacing the method here with the one in MatrixConditionalEBETransformation
Author: purangp
Date: 07.03.2004 Time: 15:54:31
MatrixEBETransformer
Method Summary | |
double |
transform(double element)
Transforms an elements value into another value |
Method Detail |
public double transform(double element)
element
- value of the element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |