Class AbstractStorage<T extends AbstractStorage<T>>

    • Constructor Detail

      • AbstractStorage

        public AbstractStorage​(StorageType storageType)
        Construct a new Data store.
        Parameters:
        storageType - StorageType; the data type
    • Method Detail

      • getStorageType

        public final StorageType getStorageType()
        Return the StorageType (DENSE, SPARSE, etc.) for the stored indexed value.
        Returns:
        the StorageType (DENSE, SPARSE, etc.) for the stored indexed value
      • isDense

        public final boolean isDense()
        Is this indexed value dense?
        Returns:
        boolean; true if the data storage type is dense; false if the data storage type is not dense
      • isSparse

        public final boolean isSparse()
        Is this indexed value sparse?
        Returns:
        boolean; true if the data storage type is sparse; false if the data storage type is not sparse
      • cardinality

        public abstract int cardinality()
        Compute and return the number of non-zero cells in this indexed value.
        Returns:
        int; the number of non-zero cells
      • copy

        public abstract T copy()
        Create and return a deep copy of the data.
        Returns:
        T; a deep copy of the data