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
ivy.matrix.vcv(root)[source]

Leaf variances and covariances :param root: A node object :type root: Node

Returns:A defaultdict mapping pairs of nodes to variances cov: A defaultdict mapping pairs of nodes to covariances
Return type:var