Macaulay2 » Documentation
Packages » PhylogeneticTrees :: edgeContract
next | previous | forward | backward | up | index | toc

edgeContract -- contract an edge of a tree

Synopsis

Description

This function produces a new object of class LeafTree obtained by contracting the edge e of tree T.

i1 : T = leafTree(4,{{0,1}})

o1 = {{0, 1, 2, 3}, {set {0, 1}, set {0}, set {1}, set {2}, set {3}}}

o1 : LeafTree
i2 : edgeContract(T, set {0,1})

o2 = {{0, 1, 2, 3}, {set {0}, set {1}, set {2}, set {3}}}

o2 : LeafTree

Ways to use edgeContract :

For the programmer

The object edgeContract is a method function.