Package cern.colt.matrix.doublealgo
Class Transform
java.lang.Object
cern.colt.PersistentObject
cern.colt.matrix.doublealgo.Transform
- All Implemented Interfaces:
Serializable
,Cloneable
Deprecated.
Deprecated; Basic element-by-element transformations on
Here are some other examples.
DoubleMatrix1D
and DoubleMatrix2D
.
All transformations modify the first argument matrix to hold the result of the transformation.
Use idioms like result = mult(matrix.copy(),5) to leave source matrices unaffected.
If your favourite transformation is not provided by this class, consider using method assign in combination with prefabricated function objects of Functions
,
using idioms like
cern.jet.math.Functions F = cern.jet.math.Functions.functions; // alias matrix.assign(F.square); matrix.assign(F.sqrt); matrix.assign(F.sin); matrix.assign(F.log); matrix.assign(F.log(b)); matrix.assign(otherMatrix, F.min); matrix.assign(otherMatrix, F.max); |
Implementation: Performance optimized for medium to very large matrices. In fact, there is now nomore a performance advantage in using this class; The assign (transform) methods directly defined on matrices are now just as fast. Thus, this class will soon be removed altogether.
- Version:
- 1.0, 09/24/99
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Functions
Deprecated.static final Transform
Deprecated.Little trick to allow for "aliasing", that is, renaming this class.Fields inherited from class cern.colt.PersistentObject
serialVersionUID
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Deprecated.Makes this class non instantiable, but still let's others inherit from it. -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleMatrix1D
Deprecated.A[i] = Math.abs(A[i]).static DoubleMatrix2D
Deprecated.A[row,col] = Math.abs(A[row,col]).static DoubleMatrix1D
div
(DoubleMatrix1D A, double s) Deprecated.A = A / s invalid input: '<'=> A[i] = A[i] / s.static DoubleMatrix1D
div
(DoubleMatrix1D A, DoubleMatrix1D B) Deprecated.A = A / B invalid input: '<'=> A[i] = A[i] / B[i].static DoubleMatrix2D
div
(DoubleMatrix2D A, double s) Deprecated.A = A / s invalid input: '<'=> A[row,col] = A[row,col] / s.static DoubleMatrix2D
div
(DoubleMatrix2D A, DoubleMatrix2D B) Deprecated.A = A / B invalid input: '<'=> A[row,col] = A[row,col] / B[row,col].static DoubleMatrix2D
equals
(DoubleMatrix2D A, double s) Deprecated.A[row,col] = A[row,col] == s ? 1 : 0; ignores tolerance.static DoubleMatrix2D
Deprecated.A[row,col] = A[row,col] == B[row,col] ? 1 : 0; ignores tolerance.static DoubleMatrix2D
greater
(DoubleMatrix2D A, double s) Deprecated.A[row,col] = A[row,col] > s ? 1 : 0.static DoubleMatrix2D
Deprecated.A[row,col] = A[row,col] > B[row,col] ? 1 : 0.static DoubleMatrix2D
less
(DoubleMatrix2D A, double s) Deprecated.A[row,col] = A[row,col] invalid input: '<' s ? 1 : 0.static DoubleMatrix2D
less
(DoubleMatrix2D A, DoubleMatrix2D B) Deprecated.A[row,col] = A[row,col] invalid input: '<' B[row,col] ? 1 : 0.static DoubleMatrix1D
minus
(DoubleMatrix1D A, double s) Deprecated.A = A - s invalid input: '<'=> A[i] = A[i] - s.static DoubleMatrix1D
Deprecated.A = A - B invalid input: '<'=> A[i] = A[i] - B[i].static DoubleMatrix2D
minus
(DoubleMatrix2D A, double s) Deprecated.A = A - s invalid input: '<'=> A[row,col] = A[row,col] - s.static DoubleMatrix2D
Deprecated.A = A - B invalid input: '<'=> A[row,col] = A[row,col] - B[row,col].static DoubleMatrix1D
minusMult
(DoubleMatrix1D A, DoubleMatrix1D B, double s) Deprecated.A = A - B*s invalid input: '<'=> A[i] = A[i] - B[i]*s.static DoubleMatrix2D
minusMult
(DoubleMatrix2D A, DoubleMatrix2D B, double s) Deprecated.A = A - B*s invalid input: '<'=> A[row,col] = A[row,col] - B[row,col]*s.static DoubleMatrix1D
mult
(DoubleMatrix1D A, double s) Deprecated.A = A * s invalid input: '<'=> A[i] = A[i] * s.static DoubleMatrix1D
mult
(DoubleMatrix1D A, DoubleMatrix1D B) Deprecated.A = A * B invalid input: '<'=> A[i] = A[i] * B[i].static DoubleMatrix2D
mult
(DoubleMatrix2D A, double s) Deprecated.A = A * s invalid input: '<'=> A[row,col] = A[row,col] * s.static DoubleMatrix2D
mult
(DoubleMatrix2D A, DoubleMatrix2D B) Deprecated.A = A * B invalid input: '<'=> A[row,col] = A[row,col] * B[row,col].static DoubleMatrix1D
Deprecated.A = -A invalid input: '<'=> A[i] = -A[i] for all cells.static DoubleMatrix2D
Deprecated.A = -A invalid input: '<'=> A[row,col] = -A[row,col].static DoubleMatrix1D
plus
(DoubleMatrix1D A, double s) Deprecated.A = A + s invalid input: '<'=> A[i] = A[i] + s.static DoubleMatrix1D
plus
(DoubleMatrix1D A, DoubleMatrix1D B) Deprecated.A = A + B invalid input: '<'=> A[i] = A[i] + B[i].static DoubleMatrix2D
plus
(DoubleMatrix2D A, double s) Deprecated.A = A + s invalid input: '<'=> A[row,col] = A[row,col] + s.static DoubleMatrix2D
plus
(DoubleMatrix2D A, DoubleMatrix2D B) Deprecated.A = A + B invalid input: '<'=> A[row,col] = A[row,col] + B[row,col].static DoubleMatrix1D
plusMult
(DoubleMatrix1D A, DoubleMatrix1D B, double s) Deprecated.A = A + B*sinvalid input: '<'=> A[i] = A[i] + B[i]*s.static DoubleMatrix2D
plusMult
(DoubleMatrix2D A, DoubleMatrix2D B, double s) Deprecated.A = A + B*s invalid input: '<'=> A[row,col] = A[row,col] + B[row,col]*s.static DoubleMatrix1D
pow
(DoubleMatrix1D A, double s) Deprecated.A = As invalid input: '<'=> A[i] = Math.pow(A[i], s).static DoubleMatrix1D
pow
(DoubleMatrix1D A, DoubleMatrix1D B) Deprecated.A = AB invalid input: '<'=> A[i] = Math.pow(A[i], B[i]).static DoubleMatrix2D
pow
(DoubleMatrix2D A, double s) Deprecated.A = As invalid input: '<'=> A[row,col] = Math.pow(A[row,col], s).static DoubleMatrix2D
pow
(DoubleMatrix2D A, DoubleMatrix2D B) Deprecated.A = AB invalid input: '<'=> A[row,col] = Math.pow(A[row,col], B[row,col]).Methods inherited from class cern.colt.PersistentObject
clone
-
Field Details
-
transform
Deprecated.Little trick to allow for "aliasing", that is, renaming this class. Normally you would writeTransform.mult(myMatrix,2); Transform.plus(myMatrix,5);
Since this class has only static methods, but no instance methods you can also shorten the name "DoubleTransform" to a name that better suits you, for example "Trans".Transform T = Transform.transform; // kind of "alias" T.mult(myMatrix,2); T.plus(myMatrix,5);
-
F
Deprecated.
-
-
Constructor Details
-
Transform
protected Transform()Deprecated.Makes this class non instantiable, but still let's others inherit from it.
-
-
Method Details
-
abs
Deprecated.A[i] = Math.abs(A[i]).- Parameters:
A
- the matrix to modify.- Returns:
- A (for convenience only).
-
abs
Deprecated.A[row,col] = Math.abs(A[row,col]).- Parameters:
A
- the matrix to modify.- Returns:
- A (for convenience only).
-
div
Deprecated.A = A / s invalid input: '<'=> A[i] = A[i] / s.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
div
Deprecated.A = A / B invalid input: '<'=> A[i] = A[i] / B[i].- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
div
Deprecated.A = A / s invalid input: '<'=> A[row,col] = A[row,col] / s.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
div
Deprecated.A = A / B invalid input: '<'=> A[row,col] = A[row,col] / B[row,col].- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
equals
Deprecated.A[row,col] = A[row,col] == s ? 1 : 0; ignores tolerance.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
equals
Deprecated.A[row,col] = A[row,col] == B[row,col] ? 1 : 0; ignores tolerance.- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
greater
Deprecated.A[row,col] = A[row,col] > s ? 1 : 0.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
greater
Deprecated.A[row,col] = A[row,col] > B[row,col] ? 1 : 0.- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
less
Deprecated.A[row,col] = A[row,col] invalid input: '<' s ? 1 : 0.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
less
Deprecated.A[row,col] = A[row,col] invalid input: '<' B[row,col] ? 1 : 0.- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
minus
Deprecated.A = A - s invalid input: '<'=> A[i] = A[i] - s.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
minus
Deprecated.A = A - B invalid input: '<'=> A[i] = A[i] - B[i].- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
minus
Deprecated.A = A - s invalid input: '<'=> A[row,col] = A[row,col] - s.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
minus
Deprecated.A = A - B invalid input: '<'=> A[row,col] = A[row,col] - B[row,col].- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
minusMult
Deprecated.A = A - B*s invalid input: '<'=> A[i] = A[i] - B[i]*s.- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
minusMult
Deprecated.A = A - B*s invalid input: '<'=> A[row,col] = A[row,col] - B[row,col]*s.- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
mult
Deprecated.A = A * s invalid input: '<'=> A[i] = A[i] * s.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
mult
Deprecated.A = A * B invalid input: '<'=> A[i] = A[i] * B[i].- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
mult
Deprecated.A = A * s invalid input: '<'=> A[row,col] = A[row,col] * s.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
mult
Deprecated.A = A * B invalid input: '<'=> A[row,col] = A[row,col] * B[row,col].- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
negate
Deprecated.A = -A invalid input: '<'=> A[i] = -A[i] for all cells.- Returns:
- A (for convenience only).
-
negate
Deprecated.A = -A invalid input: '<'=> A[row,col] = -A[row,col].- Returns:
- A (for convenience only).
-
plus
Deprecated.A = A + s invalid input: '<'=> A[i] = A[i] + s.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
plus
Deprecated.A = A + B invalid input: '<'=> A[i] = A[i] + B[i].- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
plus
Deprecated.A = A + s invalid input: '<'=> A[row,col] = A[row,col] + s.- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
plus
Deprecated.A = A + B invalid input: '<'=> A[row,col] = A[row,col] + B[row,col].- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
plusMult
Deprecated.A = A + B*sinvalid input: '<'=> A[i] = A[i] + B[i]*s.- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
plusMult
Deprecated.A = A + B*s invalid input: '<'=> A[row,col] = A[row,col] + B[row,col]*s.- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
pow
Deprecated.A = As invalid input: '<'=> A[i] = Math.pow(A[i], s).- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
pow
Deprecated.A = AB invalid input: '<'=> A[i] = Math.pow(A[i], B[i]).- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-
pow
Deprecated.A = As invalid input: '<'=> A[row,col] = Math.pow(A[row,col], s).- Parameters:
A
- the matrix to modify.s
- the scalar; can have any value.- Returns:
- A (for convenience only).
-
pow
Deprecated.A = AB invalid input: '<'=> A[row,col] = Math.pow(A[row,col], B[row,col]).- Parameters:
A
- the matrix to modify.B
- the matrix to stay unaffected.- Returns:
- A (for convenience only).
-