Package elki.database

Class 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
    • Field Detail

      • LOG

        private static final Logging LOG
        Our logger
      • 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.