logspace_sub_matrix_rows: Calculate logspace difference of matrix rows in a somewhat...

View source: R/math_utils.R

logspace_sub_matrix_rowsR Documentation

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

Description

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

Usage

logspace_sub_matrix_rows(logX)

Arguments

logX

log-scale numeric matrix of values to subtract. logX must have exactly 2 columns.

Value

log(exp(logX), 1 - exp(logX), 2), but more numerically stable


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