In this post we’ll cover solving a system of linear equations using Swift and Accelerate. It get’s a little bit hairy, but it’s not so bad once you get the hang of it.
I found out how to invert a matrix on SO, but I didn’t understand the solution, so I thought I’d talk more about it here. First of all, there isn’t a one-off inverse function in the Accelerate framework. You need to calculate the LU facotrization first using
dgetrf_(), and then plug that data into
dgetri_() to calculate the inverse.
In this post I’ll walk through setting up a hierarchical view with expanding nodes using NSOutlineView and NSTreeController. This is the sort of thing you’d want if you had to describe a file system. In this example I’ll be using Xcode 7 and Swift 2.