colLogSumExps {DelayedMatrixStats} | R Documentation |
Accurately computes the logarithm of the sum of exponentials across rows or columns.
colLogSumExps(lx, rows = NULL, cols = NULL, na.rm = FALSE, dim. = dim(lx), ...) rowLogSumExps(lx, rows = NULL, cols = NULL, na.rm = FALSE, dim. = dim(lx), ...) ## S4 method for signature 'DelayedMatrix' colLogSumExps(lx, rows = NULL, cols = NULL, na.rm = FALSE, dim. = dim(lx), force_block_processing = FALSE, ...) ## S4 method for signature 'DelayedMatrix' rowLogSumExps(lx, rows = NULL, cols = NULL, na.rm = FALSE, dim. = dim(lx), force_block_processing = FALSE, ...)
lx |
A NxK DelayedMatrix. Typically, |
rows |
A |
cols |
A |
na.rm |
If |
dim. |
An |
... |
Additional arguments passed to specific methods. |
force_block_processing |
|
A numeric
vector
of length N
(K).
These methods are implemented in native code and have been optimized for speed and memory.
To calculate the same on vectors, logSumExp
().
x <- DelayedArray(matrix(runif(10), ncol = 2)) colLogSumExps(log(x)) rowLogSumExps(log(x))