Macaulay2 » Documentation
Packages » Triangulations :: neighbors
next | previous | forward | backward | up | index | toc

neighbors -- triangulations adjacent to a given one in the bistellar-flip graph

Description

Two triangulations are neighbors if they differ by a single bistellar flip. With the default Fine => true, the support of $T$ is preserved: a fine triangulation has only fine neighbors. With Fine => false, flips that drop a vertex from the support (or, less commonly, add one) are also considered.

This is the building block used by generateTriangulations and flipGraph to walk the bistellar-flip graph.

i1 : A = transpose matrix {{0,3},{0,1},{-1,-1},{1,-1},{-4,-2},{4,-2}}

o1 = | 0 0 -1 1  -4 4  |
     | 3 1 -1 -1 -2 -2 |

              2       6
o1 : Matrix ZZ  <-- ZZ
i2 : T = regularFineTriangulation A

o2 = triangulation {{0, 1, 2}, {0, 1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {2, 3, 4}, {3, 4, 5}}

o2 : Triangulation
i3 : ns = neighbors T

o3 = {{{{1, 4}, {0, 2}}, triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1,
     ------------------------------------------------------------------------
     2, 3}, {1, 2, 4}, {2, 3, 4}, {3, 4, 5}}}, {{{1, 5}, {0, 3}},
     ------------------------------------------------------------------------
     triangulation {{0, 1, 2}, {0, 1, 5}, {0, 2, 4}, {1, 2, 3}, {1, 3, 5},
     ------------------------------------------------------------------------
     {2, 3, 4}, {3, 4, 5}}}, {{{3, 4}, {2, 5}}, triangulation {{0, 1, 2}, {0,
     ------------------------------------------------------------------------
     1, 3}, {0, 2, 4}, {0, 3, 5}, {1, 2, 3}, {2, 3, 5}, {2, 4, 5}}}}

o3 : List
i4 : #ns

o4 = 3
i5 : first ns

o5 = {{{1, 4}, {0, 2}}, triangulation {{0, 1, 3}, {0, 1, 4}, {0, 3, 5}, {1,
     ------------------------------------------------------------------------
     2, 3}, {1, 2, 4}, {2, 3, 4}, {3, 4, 5}}}

o5 : List

With Fine => false, support-changing flips are included:

i6 : #neighbors(T, Fine => false)

o6 = 4

See also

Ways to use neighbors:

  • neighbors(Triangulation)

For the programmer

The object neighbors is a method function with options.


The source of this document is in Triangulations.m2:2419:0.