Follow-up to #54, which loosened constraint enforcement to the documented
free-taxa contract. random_constrained_tree() (src/ts_wagner.cpp, the
RANDOM_TREE start strategy) still applies the strict reading when it builds a
start tree.
It reads cd.split_tips only. Every tip the constraint does not name is
collected as a root-level item, so it is placed outside every constrained
group, and each "together" group comes out as an exact clade.
Every tree it returns is compliant — strict implies loose — so this is not a
soundness bug. It is a sampling bug: most of the compliant topologies are
unreachable at every seed.
Exhaustively, on 6 taxa with one constraint character ({c,d} together,
{a,b} apart, {e,f} coded ?): 35 of the 105 unrooted binary trees are
compliant, and the generator can produce only 15 of them. The other 20 are
never drawn, whatever the seed.
Expected: a free taxon may sit on either side of every constraint edge, so a
random constrained start tree should be able to place it inside a constrained
group as readily as outside one.
Follow-up to #54, which loosened constraint enforcement to the documented
free-taxa contract.
random_constrained_tree()(src/ts_wagner.cpp, theRANDOM_TREEstart strategy) still applies the strict reading when it builds astart tree.
It reads
cd.split_tipsonly. Every tip the constraint does not name iscollected as a root-level item, so it is placed outside every constrained
group, and each "together" group comes out as an exact clade.
Every tree it returns is compliant — strict implies loose — so this is not a
soundness bug. It is a sampling bug: most of the compliant topologies are
unreachable at every seed.
Exhaustively, on 6 taxa with one constraint character (
{c,d}together,{a,b}apart,{e,f}coded?): 35 of the 105 unrooted binary trees arecompliant, and the generator can produce only 15 of them. The other 20 are
never drawn, whatever the seed.
Expected: a free taxon may sit on either side of every constraint edge, so a
random constrained start tree should be able to place it inside a constrained
group as readily as outside one.