public class ReusingDBIDFactory extends SimpleDBIDFactory
Modifier and Type | Field and Description |
---|---|
(package private) int |
dynamicStart
Keep track of the lowest unused dynamic DBID
|
(package private) BitSet |
dynamicUsed
Bit set to keep track of dynamic DBIDs
|
private static Logging |
LOG
Logging for error messages.
|
(package private) ArrayList<IntegerDBIDRange> |
returnedAllocations
Returned range allocations
|
dynamicids, rangestart
invalid
FACTORY
Constructor and Description |
---|
ReusingDBIDFactory()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
deallocateDBIDRange(DBIDRange range)
Deallocate a static DBID range.
|
void |
deallocateSingleDBID(DBIDRef id)
Return a single DBID for reuse.
|
DBID |
generateSingleDBID()
Generate a single DBID.
|
DBIDRange |
generateStaticDBIDRange(int size)
Generate a static DBID range.
|
assignVar, compare, equal, getDBIDSerializer, getDBIDSerializerStatic, getTypeRestriction, importInteger, invalid, newArray, newArray, newArray, newDistancePair, newDistancePair, newDoubleDistanceHeap, newHashSet, newHashSet, newHashSet, newHeap, newHeap, newPair, newPair, newVar, toString
private static final Logging LOG
BitSet dynamicUsed
int dynamicStart
ArrayList<IntegerDBIDRange> returnedAllocations
public DBID generateSingleDBID()
DBIDFactory
generateSingleDBID
in interface DBIDFactory
generateSingleDBID
in class SimpleDBIDFactory
public void deallocateSingleDBID(DBIDRef id)
DBIDFactory
deallocateSingleDBID
in interface DBIDFactory
deallocateSingleDBID
in class SimpleDBIDFactory
id
- DBID to deallocatepublic DBIDRange generateStaticDBIDRange(int size)
DBIDFactory
generateStaticDBIDRange
in interface DBIDFactory
generateStaticDBIDRange
in class SimpleDBIDFactory
size
- Requested sizepublic void deallocateDBIDRange(DBIDRange range)
DBIDFactory
deallocateDBIDRange
in interface DBIDFactory
deallocateDBIDRange
in class SimpleDBIDFactory
range
- Range to deallocate