thanos

thanos

Ex_graphblas - sparse linear algebra and graph computation

I’ve released ex_graphblas v0.2.0, an Elixir library for sparse linear algebra and graph computation inspired by the GraphBLAS standard.

What is it?

ex_graphblas lets you express graph algorithms as sparse matrix operations using semiring algebra. This is the approach behind the GraphBLAS standard – the same mathematical foundation used by MATLAB’s sparse operations and Python’s python-graphblas.

What’s it good for

GraphBLAS is especially powerful for massive, sparse graphs—where most possible connections don’t exist, which is the reality for domains like social networks (users ↔ relationships), financial systems (accounts ↔ transactions), knowledge graphs (entities ↔ relationships), and infrastructure maps (services ↔ dependencies). By representing these structures as sparse matrices and operating on them with linear algebra, GraphBLAS delivers highly efficient, parallelizable computation for tasks like traversal, ranking, and pathfinding, while its semiring abstraction lets you change the meaning of computation (e.g., shortest path, reachability, risk propagation) without rewriting algorithms. Backed by optimized implementations like SuiteSparse:GraphBLAS, it provides near-HPC performance on a single machine, making it an ideal foundation for large-scale graph analytics and knowledge-driven systems.

What’s included

  • Sparse matrices and vectors – COO construction, element-wise operations, transpose, dup
  • 12 built-in semiringsplus_times, min_plus, lor_land, max_min, and type-specific variants
  • Masks and descriptors – Structural and complement masks on all compute operations
  • 7 graph algorithms – BFS (reach + levels), SSSP, triangle count, connected components, degree, PageRank
  • Knowledge-graph queriesGraphBLAS.Relation with multi-predicate traversal and transitive closure

Backends:

  • Pure Elixir reference backend for development and testing (no dependencies)
  • SuiteSparse:GraphBLAS native backend via Zigler NIFs for production performance. The SuiteSparse backend wraps the same C library that powers MATLAB’s sparse operations and Python’s python-graphblas. If you’re doing graph analytics, recommendation engines, or knowledge-graph queries in Elixir, this gives you a path from prototype (pure Elixir) to production (native NIFs) without changing your application code.

The pure Elixir backend works out of the box. For the SuiteSparse backend, precompiled NIFs are downloaded automatically on supported platforms.

Links:

https://github.com/thanos/ex_graphblas

Roadmap

  • 0.3.x: Better error messages, instrumentation hooks
  • 0.4.x: Higher-level graph APIs, richer Relation combinators
  • 0.5.x: Nx integration exploration

This is the first external release, so I’d appreciate any feedback on the API design, documentation, or use cases you’d like to see supported. Happy to answer questions.

Where Next?

Popular in Announcing Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43622 214
New
riverrun
I’ve just released version 3 of Comeonin, a password hashing library. The following small changes have been made: changes to the NIF c...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
michalmuskala
Hello everybody. I have just released Jason - a new JSON library. You might be wondering, why do we need a new library? The primary foc...
New
archan937
It is a well-know topic within the Elixir community: “To mock or not to mock? :)” Every alchemist probably has his / her own opinion con...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement