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

# cells -- return the cells of a cell complex as a hashtable whose keys are cell dimensions

- Usage:
    `cells(C)`
- Inputs:
  - C, a cell complex, the CellComplex whose cells are to be returned
- Outputs:
  - a hash table, the cells of C

## Description

Given a cell complex, this function will return all the cells in that cell complex, index by dimension. The order of the cells in each dimension is arbitrary.

    i1 : R = QQ[x,y,z];

    i2 : vx = newSimplexCell({},x);

    i3 : vy = newSimplexCell({},y);

    i4 : vz = newSimplexCell({},z);

    i5 : exy = newSimplexCell {vx,vy};

    i6 : C = cellComplex(R,{exy,vz});

    i7 : cells(C)

    o7 = HashTable{0 => {Cell of dimension 0 with label x, Cell of dimension 0 with label z, Cell of dimension 0 with label y}}
                   1 => {Cell of dimension 1 with label x*y}

    o7 : HashTable

    i8 : R = QQ;

    i9 : P = convexHull matrix {{1,1,-1,-1},{1,-1,1,-1}};

    i10 : C = cellComplex(R,P);

    i11 : cells C

    o11 = HashTable{0 => {Cell of dimension 0 with label 1, Cell of dimension 0 with label 1, Cell of dimension 0 with label 1, Cell of dimension 0 with label 1}}
                    1 => {Cell of dimension 1 with label 1, Cell of dimension 1 with label 1, Cell of dimension 1 with label 1, Cell of dimension 1 with label 1}
                    2 => {Cell of dimension 2 with label 1}

    o11 : HashTable

## See also

- cells(ZZ,CellComplex) -- return the cells of a cell complex

## Ways to use cells:

- `cells(CellComplex)`
- cells(ZZ,CellComplex) -- return the cells of a cell complex

## For the programmer

The object cells is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/CellularResolutions/doc.m2:395:0.