Package elki.database.datastore
Class DataStoreUtil
- java.lang.Object
-
- elki.database.datastore.DataStoreUtil
-
public final class DataStoreUtil extends java.lang.Object
Storage utility class. Mostly a shorthand forDataStoreFactory.FACTORY
.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DataStoreUtil.AscendingByDoubleDataStore
Sort objects by a double relationstatic class
DataStoreUtil.AscendingByDoubleDataStoreAndId
Sort objects by a double relationstatic class
DataStoreUtil.AscendingByIntegerDataStore
Sort objects by a integer relationstatic class
DataStoreUtil.DescendingByDoubleDataStore
Sort objects by a double relationstatic class
DataStoreUtil.DescendingByDoubleDataStoreAndId
Sort objects by a double relationstatic class
DataStoreUtil.DescendingByIntegerDataStore
Sort objects by a integer relation
-
Constructor Summary
Constructors Modifier Constructor Description private
DataStoreUtil()
Private constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WritableDBIDDataStore
makeDBIDStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.static WritableDoubleDataStore
makeDoubleStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.static WritableDoubleDataStore
makeDoubleStorage(DBIDs ids, int hints, double def)
Make a new storage, to associate the given ids with an object of class dataclass.static WritableIntegerDataStore
makeIntegerStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.static WritableIntegerDataStore
makeIntegerStorage(DBIDs ids, int hints, int def)
Make a new storage, to associate the given ids with an object of class dataclass.static WritableRecordStore
makeRecordStorage(DBIDs ids, int hints, java.lang.Class<?>... dataclasses)
Make a new record storage, to associate the given ids with an object of class dataclass.static <T> WritableDataStore<T>
makeStorage(DBIDs ids, int hints, java.lang.Class<? super T> dataclass)
Make a new storage, to associate the given ids with an object of class dataclass.
-
-
-
Method Detail
-
makeStorage
public static <T> WritableDataStore<T> makeStorage(DBIDs ids, int hints, java.lang.Class<? super T> dataclass)
Make a new storage, to associate the given ids with an object of class dataclass.- Type Parameters:
T
- stored data type- Parameters:
ids
- DBIDs to store data forhints
- Hints for the storage managerdataclass
- class to store- Returns:
- new data store
-
makeDBIDStorage
public static WritableDBIDDataStore makeDBIDStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids
- DBIDs to store data forhints
- Hints for the storage manager- Returns:
- new data store
-
makeDoubleStorage
public static WritableDoubleDataStore makeDoubleStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids
- DBIDs to store data forhints
- Hints for the storage manager- Returns:
- new data store
-
makeDoubleStorage
public static WritableDoubleDataStore makeDoubleStorage(DBIDs ids, int hints, double def)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids
- DBIDs to store data forhints
- Hints for the storage managerdef
- Default value- Returns:
- new data store
-
makeIntegerStorage
public static WritableIntegerDataStore makeIntegerStorage(DBIDs ids, int hints)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids
- DBIDs to store data forhints
- Hints for the storage manager- Returns:
- new data store
-
makeIntegerStorage
public static WritableIntegerDataStore makeIntegerStorage(DBIDs ids, int hints, int def)
Make a new storage, to associate the given ids with an object of class dataclass.- Parameters:
ids
- DBIDs to store data forhints
- Hints for the storage managerdef
- Default value- Returns:
- new data store
-
makeRecordStorage
public static WritableRecordStore makeRecordStorage(DBIDs ids, int hints, java.lang.Class<?>... dataclasses)
Make a new record storage, to associate the given ids with an object of class dataclass.- Parameters:
ids
- DBIDs to store data forhints
- Hints for the storage managerdataclasses
- classes to store- Returns:
- new record store
-
-