pub fn order_entries_js(codes: &[i32]) -> Vec<u32>Expand description
Returns indices ordered by attention then path. Returns indices ordered by attention rank, then by the caller’s existing order.
codes must already be sorted by path. This function breaks ties by input
order, not by comparing paths, because path strings are not available on this
side of the boundary. Feeding unsorted entries yields a plausible order that
disagrees with the JS twin only where ranks tie – which is to say it looks
correct and is not.