| In: | structures/CellComplex.rb | 
| Parent: | Object | 
 
		This class represents a cell complex where the incidence lattice has the diamond property. It implements a switch operator that can be used with cell tuple objects.
initialize
create an empty cell complex. The complex can contain cells of dimension between 0 and dim.
add
Add a cell to the complex. lower is an array with the cells of dimension one lower that are incident to the cell. It is required that these lower dimensional cells be in the complex. Also the new cell can not be in the boundary of any other existing cell. This function returns the newly created cell.
delete
delete the given cell from the complex. All other cells that contain it in their boundary are also deleted.
down
retrive the cells lower than the parameter cell which are offset dimensions lower (offset >= 0)
getTuple
returns a tuple containing cell. The algorithm to determine the tuple is as follows. Let k be the dimension of c. Let t be the tuple that has c in its k^th entry and such that the i^th entry is the first cell that was given when i+1^th cell was created. If the cell of dimension d in the t is not inverted then t is returned otherwise switch(0,t) is returned.
import
this function adds the elements of otherComplex to this one nothing is cloned, so it is assumed that otherComplex will be discarded
rotate
get a circular ordering of the k-1 and k cells between the (k-2) and (k+1) cells of the given tuple in the incidence lattice. More precisely it returns a sequnence c_0, …, c_m of cells such that if i is even then c_i is of dimension k - 1 and if i is odd then c_i is of dimension k. In addition c_i and c_i+1 are adjacent. If the (k-2) cell is in the interior of the complex then c_m and c_i are adajacent. Otherwise c_m is on the boundary.