Package elki.database.datastore.memory
Class MapIntegerDBIDDoubleStore
- java.lang.Object
-
- elki.database.datastore.memory.MapIntegerDBIDDoubleStore
-
- All Implemented Interfaces:
DataStore<java.lang.Double>,DoubleDataStore,WritableDataStore<java.lang.Double>,WritableDoubleDataStore
public class MapIntegerDBIDDoubleStore extends java.lang.Object implements WritableDoubleDataStore
Writable data store for double values.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private it.unimi.dsi.fastutil.ints.Int2DoubleOpenHashMapmapData storage.
-
Constructor Summary
Constructors Constructor Description MapIntegerDBIDDoubleStore(int size)Constructor.MapIntegerDBIDDoubleStore(int size, double def)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Clear the storage (resetting it to the default value).voiddelete(DBIDRef id)Delete the contents for a particular ID and notifies the registered listeners.voiddestroy()Deallocate the storage, freeing the memory and notifies the registered listeners.doubledoubleValue(DBIDRef id)Retrieves an object from the storage.java.lang.Doubleget(DBIDRef id)Deprecated.voidincrement(DBIDRef id, double value)Increment the specified value with the specified id in this storage.doubleput(DBIDRef id, double value)Associates the specified value with the specified id in this storage.java.lang.Doubleput(DBIDRef id, java.lang.Double value)Deprecated.doubleputDouble(DBIDRef id, double value)Associates the specified value with the specified id in this storage.
-
-
-
Method Detail
-
get
@Deprecated public java.lang.Double get(DBIDRef id)
Deprecated.Description copied from interface:DoubleDataStoreGetter, but using objects.- Specified by:
getin interfaceDataStore<java.lang.Double>- Specified by:
getin interfaceDoubleDataStore- Parameters:
id- Database ID.- Returns:
- Object or
null
-
doubleValue
public double doubleValue(DBIDRef id)
Description copied from interface:DoubleDataStoreRetrieves an object from the storage.- Specified by:
doubleValuein interfaceDoubleDataStore- Parameters:
id- Database ID.- Returns:
- Double value
-
put
@Deprecated public java.lang.Double put(DBIDRef id, java.lang.Double value)
Deprecated.Description copied from interface:WritableDoubleDataStoreSetter, but using objects.- Specified by:
putin interfaceWritableDataStore<java.lang.Double>- Specified by:
putin interfaceWritableDoubleDataStore- Parameters:
id- Database ID.value- Value to store.- Returns:
- previous value
-
delete
public void delete(DBIDRef id)
Description copied from interface:WritableDataStoreDelete the contents for a particular ID and notifies the registered listeners.- Specified by:
deletein interfaceWritableDataStore<java.lang.Double>- Parameters:
id- Database ID.
-
putDouble
public double putDouble(DBIDRef id, double value)
Description copied from interface:WritableDoubleDataStoreAssociates the specified value with the specified id in this storage. If the storage previously contained a value for the id, the previous value is replaced by the specified value.- Specified by:
putDoublein interfaceWritableDoubleDataStore- Parameters:
id- Database ID.value- Value to store.- Returns:
- previous value
-
put
public double put(DBIDRef id, double value)
Description copied from interface:WritableDoubleDataStoreAssociates the specified value with the specified id in this storage. If the storage previously contained a value for the id, the previous value is replaced by the specified value.- Specified by:
putin interfaceWritableDoubleDataStore- Parameters:
id- Database ID.value- Value to store.- Returns:
- previous value
-
increment
public void increment(DBIDRef id, double value)
Description copied from interface:WritableDoubleDataStoreIncrement the specified value with the specified id in this storage.- Specified by:
incrementin interfaceWritableDoubleDataStore- Parameters:
id- Database ID.value- Value to add to the previous value.
-
clear
public void clear()
Description copied from interface:WritableDataStoreClear the storage (resetting it to the default value).- Specified by:
clearin interfaceWritableDataStore<java.lang.Double>
-
destroy
public void destroy()
Description copied from interface:WritableDataStoreDeallocate the storage, freeing the memory and notifies the registered listeners.- Specified by:
destroyin interfaceWritableDataStore<java.lang.Double>
-
-