public interface DBIDFactory
FACTORY
for the static
instance to use.Modifier and Type | Field and Description |
---|---|
static DBIDFactory |
FACTORY
Static DBID factory to use.
|
Modifier and Type | Method and Description |
---|---|
void |
assignVar(DBIDVar var,
int val)
Assign an integer value to a DBID variable.
|
int |
compare(DBIDRef a,
DBIDRef b)
Compare two DBIDs, for sorting.
|
void |
deallocateDBIDRange(DBIDRange range)
Deallocate a static DBID range.
|
void |
deallocateSingleDBID(DBIDRef id)
Return a single DBID for reuse.
|
boolean |
equal(DBIDRef a,
DBIDRef b)
Compare two DBIDs, for equality testing.
|
DBID |
generateSingleDBID()
Generate a single DBID.
|
DBIDRange |
generateStaticDBIDRange(int size)
Generate a static DBID range.
|
DBIDRange |
generateStaticDBIDRange(int begin,
int size)
Generate a static DBID range.
|
ByteBufferSerializer<DBID> |
getDBIDSerializer()
Get a serializer for DBIDs.
|
FixedSizeByteBufferSerializer<DBID> |
getDBIDSerializerStatic()
Get a serializer for DBIDs with static size.
|
Class<? extends DBID> |
getTypeRestriction()
Get type restriction.
|
DBID |
importInteger(int id)
Import and integer as DBID.
|
DBIDRef |
invalid()
Get the invalid DBID value, usable as "undefined" placeholder.
|
ArrayModifiableDBIDs |
newArray()
Make a new (modifiable) array of DBIDs.
|
ArrayModifiableDBIDs |
newArray(DBIDs existing)
Make a new (modifiable) array of DBIDs.
|
ArrayModifiableDBIDs |
newArray(int size)
Make a new (modifiable) array of DBIDs.
|
ModifiableDoubleDBIDList |
newDistanceDBIDList()
Create a modifiable list to store distance-DBID pairs.
|
ModifiableDoubleDBIDList |
newDistanceDBIDList(int size)
Create a modifiable list to store distance-DBID pairs.
|
HashSetModifiableDBIDs |
newHashSet()
Make a new (modifiable) hash set of DBIDs.
|
HashSetModifiableDBIDs |
newHashSet(DBIDs existing)
Make a new (modifiable) hash set of DBIDs.
|
HashSetModifiableDBIDs |
newHashSet(int size)
Make a new (modifiable) hash set of DBIDs.
|
KNNHeap |
newHeap(int k)
Create an heap for kNN search.
|
KNNHeap |
newHeap(KNNList exist)
Build a new heap from a given list.
|
DBIDPair |
newPair(DBIDRef id1,
DBIDRef id2)
Make a DBID pair from two existing DBIDs.
|
DoubleDBIDPair |
newPair(double val,
DBIDRef id)
Make a double-DBID pair.
|
DBIDVar |
newVar(DBIDRef val)
Make a new DBID variable.
|
String |
toString(DBIDRef id)
Print a DBID as string.
|
static final DBIDFactory FACTORY
DBIDVar newVar(DBIDRef val)
val
- Initial value.DBID importInteger(int id)
id
- Integer ID to importvoid assignVar(DBIDVar var, int val)
var
- Variableval
- Integer valueDBID generateSingleDBID()
void deallocateSingleDBID(DBIDRef id)
id
- DBID to deallocateDBIDRange generateStaticDBIDRange(int size)
size
- Requested sizeDBIDRange generateStaticDBIDRange(int begin, int size)
begin
- Range beginsize
- Requested sizevoid deallocateDBIDRange(DBIDRange range)
range
- Range to deallocateDBIDPair newPair(DBIDRef id1, DBIDRef id2)
id1
- first DBIDid2
- second DBIDDoubleDBIDPair newPair(double val, DBIDRef id)
val
- Double valueid
- DBIDArrayModifiableDBIDs newArray()
HashSetModifiableDBIDs newHashSet()
ArrayModifiableDBIDs newArray(int size)
size
- Size hintHashSetModifiableDBIDs newHashSet(int size)
size
- Size hintArrayModifiableDBIDs newArray(DBIDs existing)
existing
- existing DBIDs to useHashSetModifiableDBIDs newHashSet(DBIDs existing)
existing
- existing DBIDs to useKNNHeap newHeap(int k)
k
- K valueKNNHeap newHeap(KNNList exist)
exist
- Existing resultByteBufferSerializer<DBID> getDBIDSerializer()
FixedSizeByteBufferSerializer<DBID> getDBIDSerializerStatic()
Class<? extends DBID> getTypeRestriction()
int compare(DBIDRef a, DBIDRef b)
a
- Firstb
- Secondboolean equal(DBIDRef a, DBIDRef b)
a
- Firstb
- SecondString toString(DBIDRef id)
id
- DBID referenceDBIDRef invalid()
ModifiableDoubleDBIDList newDistanceDBIDList(int size)
size
- initial size estimateModifiableDoubleDBIDList newDistanceDBIDList()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.