thanos

thanos OP

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? Top

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 15136 120
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
kip
Please say hi to a new lib, Astro that aims to deliver easy-to-consume astronomy calculations of practical use. For now it only calculat...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

Other Trending Topics Top

juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

We're in Beta

About us Mission Statement