While trying to use the Random General Tree plugin, I've been surprised by the plugin behavior. Although setting the minsize and maxsize parameters to the same value (5), I got trees of varying sizes ... (6 or 7 nodes in total with a number of leaves varying between 3 to 5 ) which is inconsistent with the specs (doc).
That being said, I would also find the algorithm useful if one could specify the number of requested leaves.
It seems to be an old bug. Its fix will be available in the next Tulip release.
Can you tell me more about the number of requested leaves in a new feature request.
General trees are often used to encode a cluster structure, where leaves correspond to clusters and inner nodes correspond to hierarchical merging patterns of clusters. The number of leaves in such a tree thus exactly corresponds to the number of clusters which may be handy to control when generating a tree. While binary trees with a given number of leaves can easily be generated, I am struggling to find a reference for an algorithm that does the same for geenral trees (at first I thought one of Xavier Viennot's bijection would do the trick, but it is not the case, not to my knowledge). I'll let you know if I find anything useful.