ivy.matrix module¶
Functions for dealing with trees as matrices.
-
ivy.matrix.
readEL
(el)[source]¶ Create a tree from an edge list
Parameters: el (list) – Edge list where each index is a node and each index’s value is the node’s parent. The root is its own parent. Returns: Tree from the edge list Return type: Node Example
el = [1,1,1,3,3]
print readEL(el).ascii()
——————————————–+ 2- 1+
: ———————-+ 4 ———————3+
———————-+ 5