Is tree.num_samples_array useful/worth it?
We have a tree.num_children_array but not a tree.num_samples_array. Is such a thing worth making available? I suspect we need to keep track of the number of samples under each node anyway. I recently wanted to be able to quickly check all the doubleton nodes in a tree sequence, and this would have been helpful. But perhaps it's just extra burden to maintain something like this, for little gain. Either way, we can record here for posterity what the the conclusion is.
I think the reason I didn't implement it is because sample_counting is an optional feature of the tree class, which would require some extra layers of checking to be made safe. Otherwise it's definitely useful.
I think we always count the number of samples (but it's their identity that's optional though), right?
No it's optional at the c level
No it's optional at the c level
Ah, I didn't realise, sorry. I see. Thanks for the clarification.
Closing for inactivity.