Skip to content

How not to store 0's #110

@cdelv

Description

@cdelv

Hi, given a sparse matrix

 A = GBMatrix{Float64}(300,300)
A[1,2] = 1.0
A[2,2] = 0.0
A[2,3] = 1.0
A
300x300 GraphBLAS double matrix, hypersparse by row
  3 entries, memory: 480 bytes

    (1,2)    1
    (2,2)    0
    (2,3)    1

Note that it is stored in memory element [2,2] although it's 0. Is it possible to do A[2,2] = 0.0 and make the matrix not store it?

However, if A[2,2] were to be different from 0 and then I set it to zero, it will be important to store it as 0 so I can drop it later (or it should drop it automatically). After all, it's a space matrix, zeros should not be stored.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions