Apply a function element-wise.
Apply a function element-wise.
element-wise function
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.
Slicing the DRM.
Slicing the DRM. Should eventually work just like in-core drm (e.g. A(0 until 5, 5 until 15)).<P>
The all-range is denoted by '::', e.g.: A(::, 0 until 5).<P>
Row range is currently unsupported except for the all-range. When it will be fully supported, the input must be Int-keyed, i.e. of DrmLike[Int] type for non-all-range specifications.
Row range. This must be '::' (all-range) unless matrix rows are keyed by Int key.
col range. Must be a sub-range of 0 until ncol
. '::' denotes all-range.
Map matrix block-wise vertically.
Map matrix block-wise vertically. Blocks of the new matrix can be modified original block
matrices; or they could be completely new matrices with new keyset. In the latter case, output
matrix width must be specified with ncol
parameter.<P>
New block heights must be of the same height as the original geometry.<P>
new matrix' width (only needed if width changes).
Parallelism adjustments.
Parallelism adjustments. <P/>
Change only one of parameters from default value to choose new parallelism adjustment strategy. <P/>
E.g. use
drmA.par(auto = true)to use automatic parallelism adjustment. <P/>
Parallelism here in API is fairly abstract concept, and actual value interpretation is left for a particular backend strategy. However, it is usually equivalent to number of map tasks or data splits. <P/>
If changed from default, ensures the product has at least that much parallelism.
if changed from default, ensures the pipeline product has exactly that much parallelism.
If changed from default, engine-specific automatic parallelism adjustment strategy is applied.
rowSums
method for non-int keyed matrices.
rowSums
method for non-int keyed matrices.
Slight problem here is the limitation of in-memory representation of Colt's Matrix, which can only have String row labels. Therefore, internally we do ".toString()" call on each key object, and then put it into Matrix row label bindings, at which point they are coerced to be Strings.
This is obviously a suboptimal behavior, so as TODO we have here future enhancements of collect'.
map of row keys into row sums, front-end collected.