Optional
compareFn: CompareFunction<TLeaf>A function for sorting the leaves before building the tree.
Optional
metadataFn: MetadataFunction<TLeaf, TMetadata>A function for generating the tree metadata from the leaves.
Optional
depthLimit: numberLimit to the number of levels the tree is allowed to have.
A function that merges nodes at lower levels to produce nodes for higher levels of the tree.