complex
Interface Complex

All Known Subinterfaces:
EditableComplex, EditableGeoComplex, GeoComplex
All Known Implementing Classes:
AbstractComplex, DBGeoComplex, StandardComplex, StandardGeoComplex

public interface Complex

A representation of a complex, which consists of a collection of cells together with a boundary operator. For each cell in a complex, boundary(cell.boundary).isZero has to be always true.

Author:
karsten

Method Summary
 IntegerMap boundary(IntegerMap cells)
          Calculates the boundary of a set of cells.
 Cell getCell(CellID cell)
          Returns the cell with the specified ID.
 int getCellCount()
          Returns the number of cells in this complex object.
 java.util.Iterator getCellIterator()
          Returns an iterator over the Cells contained in this Complex.
 EditableComplex getCopy()
          copy simple this complex a new complex with same data, but the return type should be EditableComplex, z.b copy DBComplex nach StandardComplex
 int getDim()
          Returns the Dimension of the complex (which has to be larger or equal to the maximal dimension of the contained cells).
 CellID getMaxCellID()
          Returns The maximum CellID of this complex object.
 EditableComplex getPartofComplex(java.util.Set collection)
          collection consist of CellID, search a minimal editable complex, which contains all member of this collection
 boolean hasCell(CellID cell)
          Checks if a cell with the specified ID is contained in this complex.
 

Method Detail

getDim

public int getDim()
Returns the Dimension of the complex (which has to be larger or equal to the maximal dimension of the contained cells). if this complex contains no cell, returns -1

Returns:
the Dimension of the complex

boundary

public IntegerMap boundary(IntegerMap cells)
Calculates the boundary of a set of cells. For every entry (key,value) in the map cells the maps value * getCell(key).boundary() are added.

Parameters:
cells - a map CellID->Integer
Returns:
the boundary of cells

getCellIterator

public java.util.Iterator getCellIterator()
Returns an iterator over the Cells contained in this Complex.

Returns:
an iterator of instances of Cell

hasCell

public boolean hasCell(CellID cell)
Checks if a cell with the specified ID is contained in this complex.

Parameters:
cell - the ID of the cell
Returns:
true if this complex contains a cell with this ID

getCell

public Cell getCell(CellID cell)
Returns the cell with the specified ID.

Parameters:
cell - the ID of the cell
Returns:
the selected cell as an instance of Cell

getCellCount

public int getCellCount()
Returns the number of cells in this complex object.

Returns:
the number of Cells

getMaxCellID

public CellID getMaxCellID()
Returns The maximum CellID of this complex object.

Returns:
the maximum CellID of this complex

getCopy

public EditableComplex getCopy()
copy simple this complex a new complex with same data, but the return type should be EditableComplex, z.b copy DBComplex nach StandardComplex

Returns:
this complex

getPartofComplex

public EditableComplex getPartofComplex(java.util.Set collection)
collection consist of CellID, search a minimal editable complex, which contains all member of this collection

Parameters:
collection -
Returns: