logspace_sum_matrix_rows: Calculate logspace summation of matrix rows in a somewhat...

View source: R/math_utils.R

logspace_sum_matrix_rowsR Documentation

Calculate logspace summation of matrix rows in a somewhat numerically stable way.

Description

Calculate logspace summation of matrix rows in a somewhat numerically stable way.

Usage

logspace_sum_matrix_rows(logX)

Arguments

logX

log-scale numeric matrix of values to sum.

Value

log(apply(exp(logX), 1, sum)), but more numerically stable


reichlab/covidEnsembles documentation built on Jan. 31, 2024, 7:21 p.m.