Skip to content

Instantly share code, notes, and snippets.

@wircho
Created August 3, 2016 02:34
Show Gist options
  • Save wircho/d2e16528672b14f0a541d4430cd99d9e to your computer and use it in GitHub Desktop.
Save wircho/d2e16528672b14f0a541d4430cd99d9e to your computer and use it in GitHub Desktop.
SafeMatrix methods usage.
/*
* Usage.swift (continued #3)
*/
// MARK: SafeMatrix methods.
func usageMethods() throws {
let W = try SafeMatrix<Matrix,M,N>([1,2,3,4,5,6]) // MxN
let X = try W.transpose() // NxM
let Y = try X * W // NxN
let Z = try Y.inverse() // NxN
let d = Z.determinant() // Double
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment