This function is not exported currently, but is used in min_hpd_inclusion_area
hpd_cumul(B)
B
a raster of posterior probs