swixSwift 矩阵库
swix 是 Swift 的矩阵库。示例代码:
ones(4) == [1, 1, 1, 1] ones((4,4)) == matrix([1, 1], [1, 1]) // same with zeros array(1, 2, 3, 4) == [1, 2, 3, 4] array("[1 2; 4 5]") == matrix([1 2], [4 5]) ones(4) * 4 == [4, 4, 4, 4] ones(4) * (zeros(4) + 2) == [2, 2, 2, 2] // same for +, -, *, /
评论