matrix-vector multiplication
matrix-vector multiplication
Hadamard product
Hadamard product
in-place Hadamard product.
in-place Hadamard product. We probably don't want to use assign to optimize for sparse operations, in case of Hadamard product it really can be done
5.
5.0 *=: A is equivalent to A *= 5.0. Included for completeness.
A *=: B is equivalent to B *= A.
A *=: B is equivalent to B *= A. Included for completeness.
A := B - A which is -(A - B)
A := B - A which is -(A - B)
1.
1.0 /: A is eqivalent to R's 1.0/A
Elementwise deletion
1.
1.0 /=: A is equivalent to A = 1.0/A in R
Sparse function assign: iterate and assign over non-zeros only
Sparse function assign: iterate and assign over non-zeros only
Sparse assign: iterate and assign over non-zeros only
Sparse assign: iterate and assign over non-zeros only
Functional assign with (Double) => Double
Functional assign with (Double) => Double
Assigning from a row-wise collection of vectors
A version of function apply with default AUTO treatment of evalZeros
.
A version of function apply with default AUTO treatment of evalZeros
.
A version of function apply with default AUTO treatment of evalZeros
.
A version of function apply with default AUTO treatment of evalZeros
.
Apply a function element-wise without side-effects to the argument (creates a new matrix).
Apply a function element-wise without side-effects to the argument (creates a new matrix).
element-wise function (row, column, value) ⇒ "new value"
Do we have to process zero elements? true, false, auto: if auto, we will test
the supplied function for f(0) != 0
, and depending on the result, will
decide if we want evaluation for zero elements. WARNING: the AUTO setting
may not always work correctly for functions that are meant to run in a specific
backend context, or non-deterministic functions, such as {-1,0,1} random
generators.
new DRM with the element-wise function applied.
Apply a function element-wise without side-effects to the argument (creates a new matrix).
Apply a function element-wise without side-effects to the argument (creates a new matrix).
element-wise function "value" ⇒ "new value"
Do we have to process zero elements? true, false, auto: if auto, we will test
the supplied function for f(0) != 0
, and depending on the result, will
decide if we want evaluation for zero elements. WARNING: the AUTO setting
may not always work correctly for functions that are meant to run in a specific
backend context, or non-deterministic functions, such as {-1,0,1} random
generators.
new DRM with the element-wise function applied.
Ideally, we would probably want to override equals().
Ideally, we would probably want to override equals(). But that is not possible without modifying AbstractMatrix implementation in Mahout which would require discussion at Mahout team.
test if rank == min(nrow,ncol).
Structure-optimized mmul
Warning: This provides read-only view only.
Warning: This provides read-only view only.
In most cases that's what one wants. To get a copy,
use m.t cloned
transposed view
Warning: this creates a clone (as in mx * -1), in many applications inplace inversion mx *= -1
might be an infinitely better choice.
Warning: this creates a clone (as in mx * -1), in many applications inplace inversion mx *= -1
might be an infinitely better choice.