Actually I am trying to implement PageRank Algorithm in Swift. I am using Swix and Accelerate framework.Actually for getting the pageRank I need to solve Linear Equation.I am trying to do this by taking the Inverse of the matrix.Then multiply the Inverse with some other matrix.I need to declare the matrix as "Matrix" type so I can get its inverse directly by inv() function in Swix.
I need a matrix like this:
[[1.0,0.0,-0.85],
[-0.425,1.0,0.0],
[-0.425,0.85,1.0]]
I have tried this
var A=matrix(columns:3,rows:3)
A=[[1.0,0.0,-0.85],[-0.425,1,0],[-0.425,-0.85,1]]
How to do this? Also any other help will be appreciated.