14 Trees
Some applications require the knowledge of how items can be linked together given specific scoring functions. These applications and many others use trees to sort and organize the data in a very efficient manner. The tree obtains this efficiency by linking data such that searches through the data follow short paths. At each node in the tree the search makes a simple decision to create this path. Tree searches are highly efficient means of organizing and searching data.
14.1 Basic Tree Theory
Tree theory starts with the simpler concept of linked lists. Consider a case in which data arrives in no particular order but must be sorted while it arrives. In Python it is easy to put data into a list and sort it. However, if sorting is required ...
Get Python for Bioinformatics now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.