The iq_ functions are the exposed functions on the IQ-TREE side. Lists are automatically transformed into vectors.
iq_random_tree here should throw a RuntimeError on the IQ-TREE side. It does when called by itself, or when either of the two lines above it are missing.
However, when build_tree or fit_tree is called at least two times above it, instead of the C++ code throwing an error it causes a segmentation fault. Curiously, the segmentation fault does not arise on good inputs (say I use three taxa instead of two taxa).
Here is a minimal example:
The
iq_
functions are the exposed functions on the IQ-TREE side. Lists are automatically transformed into vectors.iq_random_tree
here should throw a RuntimeError on the IQ-TREE side. It does when called by itself, or when either of the two lines above it are missing.However, when
build_tree
orfit_tree
is called at least two times above it, instead of the C++ code throwing an error it causes a segmentation fault. Curiously, the segmentation fault does not arise on good inputs (say I use three taxa instead of two taxa).