Macaulay2 » Documentation
Packages » CellularResolutions :: relabelCellComplex
next | previous | forward | backward | up | index | toc

relabelCellComplex -- relabels a cell complex

Synopsis

Description

Given a cell complex C and a hashtable, whose key-value pairs are a cell from C and a new label for that cell, this command relabels C accordingly. Labels for cells not provided in the hashtable are inferred to be the least common multiple of the labels of their boundary cells, unless the option InferLabels is set to false.

i1 : R = QQ[a,b,c];
i2 : P1 = convexHull matrix {{0,1,0},{0,0,1}};
i3 : P2 = convexHull matrix {{1,0,1},{0,1,1}};
i4 : P = polyhedralComplex {P1,P2};
i5 : C = cellComplex(R,P);
i6 : verts = cells(0,C);
i7 : v0 = verts#0;
i8 : v1 = verts#1;
i9 : v2 = verts#2;
i10 : v3 = verts#3;
i11 : T = new HashTable from {v0 => a^2*b, v1 => b*c^2, v2 => b^2, v3 => a*c};
i12 : relabeledC = relabelCellComplex(C,T);
i13 : for c in cells(0,relabeledC) list cellLabel(c)

        2        2      2
o13 = {b , a*c, a b, b*c }

o13 : List
i14 : for c in cells(1,relabeledC) list cellLabel(c)

        2 2       2     2    2   2   2 2
o14 = {b c , a*b*c , a*b c, a b*c , a b }

o14 : List

See also

Ways to use relabelCellComplex :

For the programmer

The object relabelCellComplex is a method function with options.