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

phyloToricRandom -- compute a random invariant of a group-based phylogenetic model

Synopsis

Description

This function computes a random invariant of a group-based phylogenetic tree model using the toric fiber product structure.

With equal probability the algorithm decides to return a linear, quadratic, or higher degree binomial. It then selects one of these at random (but uniformity is not guaranteed).

This is a much more efficient way to produce a single generator than listing all of them, which is useful for Monte Carlo random walk algorithms.

i1 : phyloToricRandom(4,{{0,1}},CFNmodel)

o1 = - q       q        + q       q
        0,0,1,1 1,1,0,0    0,0,0,0 1,1,1,1

o1 : QQ[q       , q       , q       , q       , q       , q       , q       , q       ]
         0,0,0,0   0,0,1,1   0,1,0,1   0,1,1,0   1,0,0,1   1,0,1,0   1,1,0,0   1,1,1,1

Caveat

We currently do not guarantee a uniform distribution on the generators, even after the choice of linear, quadratic or higher degree.

See also

Ways to use phyloToricRandom :

For the programmer

The object phyloToricRandom is a method function with options.