Interface IndexedValue<U extends Unit<U>,​S extends Scalar<U,​S>,​T extends IndexedValue<U,​S,​T>>

    • Method Detail

      • getStorageType

        StorageType getStorageType()
        Return the StorageType (DENSE, SPARSE, etc.) for the stored vector.
        Returns:
        StorageType; the storage type (DENSE, SPARSE, etc.) for the stored vector
      • toDense

        T toDense()
        Create and return a dense version of this internal storage. When the data was already dense, the current version is returned and no copy will be made of the data.
        Returns:
        T; a dense version of this internal storage
      • toSparse

        T toSparse()
        Create and return a sparse version of this internal storage. When the data was already sparse, the current version is returned and no copy will be made of the data.
        Returns:
        T; a sparse version of this internal storage
      • isDense

        boolean isDense()
        Return whether the internal storage type of the indexed value is dense or not.
        Returns:
        boolean; whether the internal storage type of the indexed value is dense or not
      • isSparse

        boolean isSparse()
        Return whether the internal storage type of the indexed value is sparse or not.
        Returns:
        boolean; whether the internal storage type of the indexed value is sparse or not
      • isMutable

        boolean isMutable()
        Return whether the data is mutable or not.
        Returns:
        boolean; whether the data is mutable or not
      • immutable

        T immutable()
        Turn the immutable flag on for this vector.
        Returns:
        T; the vector with a raised immutable flag
      • mutable

        T mutable()
        Turn the immutable flag off for this internal storage.
        Returns:
        T; the internal storage with a cleared immutable flag
      • cardinality

        int cardinality()
        Count the number of cells that have a non-zero SI value.
        Returns:
        int; the number of cells having non-zero SI value
      • getScalarClass

        Class<S> getScalarClass()
        Return the class of the corresponding scalar.
        Returns:
        Class<S>; the class of the corresponding scalar