Package elki.database
Class StaticArrayDatabase
- java.lang.Object
-
- elki.database.AbstractDatabase
-
- elki.database.StaticArrayDatabase
-
- All Implemented Interfaces:
Database
@Description("Database using an in-memory hashtable and at least providing linear scans.") public class StaticArrayDatabase extends AbstractDatabase
This database class uses array-based storage and thus does not allow for dynamic insert, delete and update operations. However, array access is expected to be faster and use less memory.- Since:
- 0.4.0
- Author:
- Arthur Zimek, Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StaticArrayDatabase.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description protected DatabaseConnection
databaseConnection
The data source we get the initial data from.private DBIDView
idrep
The DBID representation we useprivate ArrayStaticDBIDs
ids
IDs of this databaseprivate static Logging
LOG
Our logger-
Fields inherited from class elki.database.AbstractDatabase
eventManager, indexFactories, relations
-
-
Constructor Summary
Constructors Constructor Description StaticArrayDatabase(DatabaseConnection databaseConnection)
Constructor with no indexes.StaticArrayDatabase(DatabaseConnection databaseConnection, java.util.Collection<? extends IndexFactory<?>> indexFactories)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Logging
getLogger()
Get the class logger.void
initialize()
Initialize the database by getting the initial data from the database connection.-
Methods inherited from class elki.database.AbstractDatabase
accumulateDataStoreEvents, addDataStoreListener, flushDataStoreEvents, getBundle, getLongName, getRelation, getRelations, getShortName, removeDataStoreListener
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Our logger
-
ids
private ArrayStaticDBIDs ids
IDs of this database
-
idrep
private DBIDView idrep
The DBID representation we use
-
databaseConnection
protected DatabaseConnection databaseConnection
The data source we get the initial data from.
-
-
Constructor Detail
-
StaticArrayDatabase
public StaticArrayDatabase(DatabaseConnection databaseConnection, java.util.Collection<? extends IndexFactory<?>> indexFactories)
Constructor.- Parameters:
databaseConnection
- Database connection to get the initial data from.indexFactories
- Indexes to add
-
StaticArrayDatabase
public StaticArrayDatabase(DatabaseConnection databaseConnection)
Constructor with no indexes.- Parameters:
databaseConnection
- Database connection to get the initial data from.
-
-
Method Detail
-
initialize
public void initialize()
Initialize the database by getting the initial data from the database connection.
-
getLogger
protected Logging getLogger()
Description copied from class:AbstractDatabase
Get the class logger.- Specified by:
getLogger
in classAbstractDatabase
- Returns:
- Class logger
-
-