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
Matrix
instance withelememts
Throws
Declaration
Swift
public init(_ elements: [[Complex<Double>]]) throws
Parameters
elements
List of sub-list where each sub-list is a row in the matrix.
Return Value
A new
Matrix
instance.
-
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