Adjacency Matrix#

class chamois.ontology.AdjacencyMatrix(data=None)#

A tree encoded as an adjacency matrix.

_leaves_to_root(data)#

Generate a walk order to explore the tree from leaves to roots.

_roots_to_leaves(data)#

Generate a walk order to explore the tree from roots to leaves.

ancestors(i)#

Get the entire tree of ancestors of class i.

children(i)#

Get the children of class i.

descendants(i)#

Get the entire tree of descendants of class i.

neighbors(i)#

Get the neighbors of class i.

parents(i)#

Get the parents of class i.