public class ArrayDoubleDistanceStore extends Object implements WritableDoubleDistanceDataStore
Modifier and Type | Field and Description |
---|---|
private double[] |
data
Data array
|
private DataStoreIDMap |
idmap
DBID to index map
|
Constructor and Description |
---|
ArrayDoubleDistanceStore(int size,
DataStoreIDMap idmap)
Constructor.
|
ArrayDoubleDistanceStore(int size,
DataStoreIDMap idmap,
double def)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(DBIDRef id)
Delete the contents for a particular ID and notifies the registered
listeners.
|
void |
destroy()
Deallocate the storage, freeing the memory and notifies the registered
listeners.
|
double |
doubleValue(DBIDRef id)
Retrieves an object from the storage.
|
DoubleDistance |
get(DBIDRef id)
Deprecated.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
String |
getShortName()
A short name for the result, useful for file names.
|
double |
put(DBIDRef id,
double value)
Associates the specified value with the specified id in this storage.
|
DoubleDistance |
put(DBIDRef id,
DoubleDistance value)
Deprecated.
|
double |
putDouble(DBIDRef id,
double value)
Associates the specified value with the specified id in this storage.
|
private double[] data
private DataStoreIDMap idmap
public ArrayDoubleDistanceStore(int size, DataStoreIDMap idmap)
size
- Sizeidmap
- ID mappublic ArrayDoubleDistanceStore(int size, DataStoreIDMap idmap, double def)
size
- Sizeidmap
- ID mapdef
- Default value@Deprecated public DoubleDistance get(DBIDRef id)
DoubleDistanceDataStore
get
in interface DataStore<DoubleDistance>
get
in interface DoubleDistanceDataStore
id
- Database ID.null
@Deprecated public DoubleDistance put(DBIDRef id, DoubleDistance value)
WritableDoubleDistanceDataStore
put
in interface WritableDataStore<DoubleDistance>
put
in interface WritableDoubleDistanceDataStore
id
- Database ID.value
- Value to store.public double doubleValue(DBIDRef id)
DoubleDistanceDataStore
doubleValue
in interface DoubleDistanceDataStore
id
- Database ID.public double putDouble(DBIDRef id, double value)
WritableDoubleDistanceDataStore
putDouble
in interface WritableDoubleDistanceDataStore
id
- Database ID.value
- Value to store.public double put(DBIDRef id, double value)
WritableDoubleDistanceDataStore
put
in interface WritableDoubleDistanceDataStore
id
- Database ID.value
- Value to store.public void destroy()
WritableDataStore
destroy
in interface WritableDataStore<DoubleDistance>
public void delete(DBIDRef id)
WritableDataStore
delete
in interface WritableDataStore<DoubleDistance>
id
- Database ID.public String getLongName()
Result
getLongName
in interface Result
public String getShortName()
Result
getShortName
in interface Result