alifestd_unfurl_traversal_topological_polars
- alifestd_unfurl_traversal_topological_polars(phylogeny_df: DataFrame) ndarray
List node indices in topological traversal order.
Parents are visited before children. If the dataframe is already topologically sorted, the existing row indices are returned directly. Otherwise, a topological ordering is computed.
Parameters
- phylogeny_dfpolars.DataFrame or polars.LazyFrame
The phylogeny as a dataframe in alife standard format.
Must represent an asexual phylogeny with contiguous ids.
Returns
- np.ndarray
Index array giving topological traversal order.
See Also
- alifestd_unfurl_traversal_topological_asexual :
Pandas-based implementation.