cumulative_ancestor

function cumulative_ancestor(W:Real[_]) -> Integer

Sample a single ancestor for a cumulative weight vector.