Matrix
public class Matrix
Matrix of Double values
-
Number of rows in Matrix.
Declaration
Swift
public var rows: Int -
Number of columns in Matrix.
Declaration
Swift
public var cols: Int -
Create new Matrix by copying existing.
Declaration
Swift
public init(_ M: Matrix) -
Create 1-column Matrix (transposed Vector)
Declaration
Swift
public init(_ v: Vector) -
Create Matrix from array of Vectors (two-dimensional array)
Declaration
Swift
public init(_ data: [Vector])
-
Get M(row, column) element of Matrix.
Declaration
Swift
public subscript(_ row: Int, _ col: Int ) -> DoubleParameters
rowrow position of element (0-based)
colcol position of element (0-based)
-
Get M(index) element of row-major represented Matrix.
Declaration
Swift
public subscript(_ index: Int) -> DoubleParameters
indexindex of element (0-based, 0 <= index < M.rows * M.cols)
-
Get M(row) row of Matrix.
Declaration
Swift
public subscript(row row: Int) -> VectorParameters
rowrow index (0-based)
-
Get M(col) column of Matrix.
Declaration
Swift
public subscript(col col: Int) -> VectorParameters
colcolumn index (0-based)
-
Iterate through matrix by rows
Declaration
Swift
public func makeIterator() -> MatrixIterator
-
Declaration
Swift
public var description: String
View on GitHub
Matrix Class Reference