Algae is a fast matrix processing library written in Swift. Uses Accelerate and Metal.
##features
- Constructors
- Extractors
- Element-wise operations (e.g. trig functions, abs)
- Column or row-wise operators
- Matrix-wide operations.
- Basic Linear Algebra Subprograms (e.g. scalar multiplication, matrix multiplication, dot products)
- GPU support using Metal
##examples
- Multilayer perceptron.
- Speed-test
/* 5-dimension vector. By default filled with zeros */
let v = Vector(size:5)
/* 5-dimensional vector. Filled with given data */
let v2 = Vector(data:[1.0, 2.0, 3.0, 4.0, 5.0])
let m = m2.copy()
/* 2x2 Matrix. By default filled with zeros */
let m = Matrix(rows:2, columns:2)
/* 2x2 Matrix. Filled with given data */
let m2 = Matrix(rows:2, columns:2, data:[1.0, 2.0, 3.0, 4.0])
/* 2x2 Matrix. By default filled with zeros */
let m = Algae.eye(size:2, fill:1.0)
let m = m2.copy()