F# Math - Using matrices for graph algorithms

added by tomasp
11/9/2011 7:15:33 AM

3 Kicks, 188 Views

This article introduces the matrix type available in F# PowerPack. It discusses how to create matrices, manipulate matrices using indexing and slices and how to use built-in functions for working with them. As a running example, we use matrix to represent a graph using an adjacency matrix.


2 comments

dpeterson
11/9/2011 7:15:27 AM
Very powerful stuff, where was this in math class? ;-)

Noldorin
11/10/2011 5:17:06 PM
It's generally only considered useful for the mathematicians per se. ;-) I did some work involving adjacency matrices and specifically spectral graph theory in my degree, but it was quite unusual even in a physics degree. It can get pretty darn tricky, I'll tell you that much!

Good article anyway, I agree. The F# PowerPack is hugely useful.