[ANN] SuiteSparseGraphBLAS.jl v0.4.0 - Complete Rewrite!

Hi everyone, I’m happy to announce the v0.4.0 release of JuliaSparse/SuiteSparseGraphBLAS.jl (github.com)!

This release is a complete rewrite of the original package, updating it to the latest version of SuiteSparse:GraphBLAS, and including much more Julian syntax.

SuiteSparseGraphBLAS.jl is a sparse linear algebra library which generalizes operations we all know and love like matrix multiplication, to arbitrary semirings. Essentially you can replace the :+ and :* operators with your own binary operators.

This lets you encode all sorts of graph algorithms in the language of linear algebra, like triangle counting:

julia> A = GBMatrix([1,1,2,2,3,4,4,5,6,7,7,7], [2,4,5,7,6,1,3,6,3,3,4,5], [1:12...])
7x7 GraphBLAS int64_t matrix, bitmap by col
  12 entries, memory: 832 bytes

    (4,1)   6
    (1,2)   1
    (4,3)   7
    (6,3)   9
    (7,3)   10
    (1,4)   2
    (7,4)   11
    (2,5)   3
    (7,5)   12
    (3,6)   5
    (5,6)   8
    (2,7)   4

julia> M = eadd(A, A', BinaryOps.PLUS) #Make A undirected/symmetric

julia> function trianglecount(A)
         L = select(SelectOps.TRIL, A)
         return reduce(Monoids.PLUS_MONOID[Int64], mul(L, L, Semirings.PLUS_PAIR; mask=L))
       end

julia> trianglecount(M)
2

This is my Julia Summer of Code project, so any feedback is more than welcome! You can expect a v1.0 release in the week before JuliaCon!

14 Likes