Adjacency Matrices in Zig

Recently I’ve been interested in a particular systems programming problem and since I have been lurking around the edges of Zig for a while, I decided this problem was a good place to try my hand.

The topic is obscure, dealing with managing relationships between sets, so interest may be limited. The implementation is a literate program which can be found in a PDF here that is intended for your reading pleasure.

If you wish to see the intermediate files, which includes the Zig source, without having to install a long tool chain, there is a zip file that has everything expanded out.

4 Likes

Really cool stuff! I’ll take a look at it a little bit more but I’m very interested in matrix stuff. I’m working on some very similar stuff with a general rank N tensor library over here: GitHub - andrewCodeDev/ZEIN: Zig-based implementation of tensors

I’ll read through your work on sparse tensors as they are something I may decide support in the future!

Also, welcome to the forum!

This is really cool! We need more literature using Zig.

2 Likes