Matrix
public struct Matrix
extension Matrix: CustomStringConvertible
extension Matrix: Hashable
extension Matrix: Sequence
Swift representation of a complex 2-dimensional matrix
-
Number of rows in the matrix
Declaration
Swift
public let rowCount: Int -
Number of columns per row in the matrix
Declaration
Swift
public let columnCount: Int -
Returns first element in first row
Declaration
Swift
public var first: Complex<Double> { get } -
Use [row, column] to access elements in the matrix
Declaration
Swift
public subscript(row: Int, column: Int) -> Complex<Double> { get }
-
Errors throwed by
See moreMatrix()Declaration
Swift
public enum InitError : Error -
Initializes a new
Matrixinstance withelememtsThrows
Declaration
Swift
public init(_ elements: [[Complex<Double>]]) throwsParameters
elementsList of sub-list where each sub-list is a row in the matrix.
Return Value
A new
Matrixinstance.
-
Declaration
Swift
public var description: String { get }
-
Maps matrix into a list of rows
Declaration
Swift
public var elements: [[Complex<Double>]] { get }
-
Declaration
Swift
public typealias Iterator = ArraySlice<Complex<Double>>.Iterator -
Returns iterator that traverses the matrix by column
Declaration
Swift
public func makeIterator() -> Matrix.Iterator
Matrix Structure Reference