Macaulay2 » Documentation
Packages » CellularResolutions :: cells(ZZ,CellComplex)
next | previous | forward | backward | up | index | toc

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

- Function: cells
- Usage:
    `cells(ZZ,C)`
- Inputs:
  - r, an integer, the dimension of the cells to be returned
  - C, a cell complex, whose r-cells are to be returned
- Outputs:
  - a list, the r-cells of C

## Description

Given a dimension r and a cell complex C, cells returns a list of all the cells of dimension r in C. The order of the returned cells 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(0,C)

    o7 = {Cell of dimension 0 with label z, Cell of dimension 0 with label x,
         ------------------------------------------------------------------------
         Cell of dimension 0 with label y}

    o7 : List

    i8 : cells(1,C)

    o8 = {Cell of dimension 1 with label x*y}

    o8 : List

    i9 : cells(2,C)

    o9 = {}

    o9 : List

## See also

- cells(CellComplex) -- return the cells of a cell complex as a hashtable whose keys are cell dimensions

## Ways to use this method:

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

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