Macaulay2 » Documentation
Packages » AllMarkovBases :: computeFiber
next | previous | forward | backward | up | index | toc

computeFiber -- compute a single fiber of configuration matrix

Description

This function constructs one fiber $b$ of the configuration matrix $A$, which is returned as a list of vectors.

The algorithm used to compute the fiber can be one of "decompose", "markov", "fast" or "lattice" with "decompose" as the default option. All algorithms will return either the fiber as a list of vectors or a list of the connected components of the fiber, depending on whether the ReturnConnectedComponents option is set to false or true.

When computing lots of fibers for one configuration matrix, we recommend "decompose", especially for large fibers. "markov" works very similarly to "decompose" and will be faster for complicated input matrices with lots of rows and columns. Otherwise, "fast" is the best for a one-off computation of a smaller fiber and, if the values of the input matrix $A$ are very large, it is worth trying "lattice".

i1 : computeFiber(matrix "3,5,11", vector {27})

o1 = {| 9 |, | 0 |, | 2 |, | 4 |}
      | 0 |  | 1 |  | 2 |  | 3 |
      | 0 |  | 2 |  | 1 |  | 0 |

o1 : List
i2 : netList computeFiber(matrix "3,4,6,8,12", vector {12}, ReturnConnectedComponents => true)

     +---------------+---------------+---------------+
o2 = |{0, 1, 0, 1, 0}|{0, 3, 0, 0, 0}|               |
     +---------------+---------------+---------------+
     |{4, 0, 0, 0, 0}|{0, 0, 2, 0, 0}|{2, 0, 1, 0, 0}|
     +---------------+---------------+---------------+
     |{0, 0, 0, 0, 1}|               |               |
     +---------------+---------------+---------------+
i3 : computeFiber(matrix "51,52,53,54,55,56", vector {614}, FiberAlgorithm => "fast")

o3 = {|  0 |, | 0 |, | 10 |, | 11 |}
      |  0 |  | 0 |  |  2 |  |  0 |
      |  0 |  | 0 |  |  0 |  |  1 |
      |  1 |  | 0 |  |  0 |  |  0 |
      |  0 |  | 2 |  |  0 |  |  0 |
      | 10 |  | 9 |  |  0 |  |  0 |

o3 : List
i4 : computeFiber(matrix "2,4,5,8;7,2,6,1;11,4,3,10", vector{26828,37890,62792}, FiberAlgorithm => "lattice")

o4 = {| 3992 |, | 4012 |, | 4004 |, | 3996 |, | 3988 |, | 4016 |, | 4008 |, |
      |  918 |  | 3623 |  | 2541 |  | 1459 |  |  377 |  | 4164 |  | 3082 |  |
      | 1156 |  |  376 |  |  688 |  | 1000 |  | 1312 |  |  220 |  |  532 |  |
      | 1174 |  |  304 |  |  652 |  | 1000 |  | 1348 |  |  130 |  |  478 |  |
     ------------------------------------------------------------------------
     4000 |}
     2000 |
      844 |
      826 |

o4 : List

See also

Ways to use computeFiber:

  • computeFiber(Matrix,Vector)

For the programmer

The object computeFiber is a method function with options.


The source of this document is in AllMarkovBases.m2:738:0.