MDArray
is a multidimensional array type for Swift. You can use it to represent vectors, matrices, and other higher order objects. It conforms to the MutableCollection
protocol, and its math functions use the Accelerate
framework.
You can use MDArray
to store any type in the form of a multidimensional array, such as String
values in the title banner above. Some of the more interesting applications include machine learning, signal processing, physics, engineering, and just good ol' mathematics.
Clone the repository using your terminal of choice, and add the appropriate files to your project.
https://github.com/colinc86/MDArray.git
The MDArray
type and associated functions are separated in to different files. Depending on how you'll be using MDArray, you may only need one or two of them.
MDArray.swift
- documentation - Contains the mainMDArray
type declaration. If you only need MDArray's storage handling, then you can get away with only including this file in your project.MDExtensions.swift
- documentation - Adds computational functions to theMDArray
type such as calculating determinants and determining symmetry/antisymmetry.MDMath.swift
- documentation - Contains binary/unary operators and is the file responsible for utilizing theAccelerate
framework to accomplish mathematical computations betweenMDArray
s.
Please read the documentation for each of the files that you use in your project to get a general idea of how they are used.
There is still work to be done! Please feel free to contribute to any of the following areas.
- Complex number support (
MDMath
should handleDSPSplitComplex
andDSPDoubleSplitComplex
vDSP functions) - Row reductions
- Multidimensional array inverse, outter/inner products.