Binding to a C implementation of addition and normalization in log space.
Usage
log_normalize(vals, maxi = max(vals), ID = which.max(vals)[1])
Arguments
vals
Log-values to be normalize
maxi
The maximum value of vals
ID
One entry of vals which has the highest value.
Value
A list with three slots. First one is a numerical vector with values normalized so that they sum to 1. The second is the same normalized vector in log space. The last one is the log of the normalization constant. See example.