edu.stanford.math.plex4.streams.storage_structures
T - public class HashedStorageStructure<T extends PrimitiveBasisElement> extends java.lang.Object implements StreamStorageStructure<T>
| Constructor and Description | 
|---|
| HashedStorageStructure(java.util.Comparator<T> basisComparator)This construction initializes the class with a comparator for comparing the basis elements. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addElement(T basisElement,
          int filtrationIndex)This function adds the given basis element to the storage structure, with
 the supplied filtration index. | 
| boolean | containsElement(T basisElement)This function returns true if the stream contains the given basis element,
 and false otherwise. | 
| void | finalizeStructure()This function sets the stream as being finalized. | 
| java.util.Comparator<T> | getBasisComparator()This function returns a Comparator | 
| int | getFiltrationIndex(T basisElement)This function returns the filtration index of the given basis element. | 
| int | getMaximumFiltrationIndex()This function gets the maximum filtration index in the complex. | 
| int | getMinimumFiltrationIndex()This function gets the minimum filtration index in the complex. | 
| int | getSize()This function returns the number of elements in the storage structure. | 
| boolean | isFinalized()This function returns true if the stream has been finalized. | 
| java.util.Iterator<T> | iterator() | 
| void | removeElement(T basisElement)This function removes the specified element form the storage structure. | 
public HashedStorageStructure(java.util.Comparator<T> basisComparator)
basisComparator - the comparatorpublic java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T extends PrimitiveBasisElement>public void addElement(T basisElement, int filtrationIndex)
StreamStorageStructureaddElement in interface StreamStorageStructure<T extends PrimitiveBasisElement>basisElement - the basis element to addfiltrationIndex - the filtration index of the basis elementpublic void removeElement(T basisElement)
StreamStorageStructureremoveElement in interface StreamStorageStructure<T extends PrimitiveBasisElement>basisElement - the basisElement to removepublic boolean containsElement(T basisElement)
StreamStorageStructurecontainsElement in interface StreamStorageStructure<T extends PrimitiveBasisElement>basisElement - the basis element to querypublic int getFiltrationIndex(T basisElement)
StreamStorageStructuregetFiltrationIndex in interface StreamStorageStructure<T extends PrimitiveBasisElement>basisElement - the element to querypublic boolean isFinalized()
StreamStorageStructureisFinalized in interface StreamStorageStructure<T extends PrimitiveBasisElement>public java.util.Comparator<T> getBasisComparator()
StreamStorageStructuregetBasisComparator in interface StreamStorageStructure<T extends PrimitiveBasisElement>public int getSize()
StreamStorageStructuregetSize in interface StreamStorageStructure<T extends PrimitiveBasisElement>public void finalizeStructure()
StreamStorageStructurefinalizeStructure in interface StreamStorageStructure<T extends PrimitiveBasisElement>public int getMaximumFiltrationIndex()
StreamStorageStructuregetMaximumFiltrationIndex in interface StreamStorageStructure<T extends PrimitiveBasisElement>public int getMinimumFiltrationIndex()
StreamStorageStructuregetMinimumFiltrationIndex in interface StreamStorageStructure<T extends PrimitiveBasisElement>