Created
August 3, 2016 02:34
-
-
Save wircho/d2e16528672b14f0a541d4430cd99d9e to your computer and use it in GitHub Desktop.
SafeMatrix methods usage.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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