Vector

public struct Vector
extension Vector: CustomStringConvertible
extension Vector: Hashable
extension Vector: Sequence

Swift representation of a complex “column” vector

Public properties

  • Number of elements in the vector

    Declaration

    Swift

    public var count: Int { get }
  • Returns first element

    Declaration

    Swift

    public var first: Complex<Double> { get }
  • Use [index] to access elements in the vector

    Declaration

    Swift

    public subscript(index: Int) -> Complex<Double> { get }

Public init methods

  • Errors throwed by Vector.init()

    See more

    Declaration

    Swift

    public enum InitError : Error
  • Initializes a new column Vector instance with elements.

    Declaration

    Swift

    public init(_ elements: [Complex<Double>]) throws

    Parameters

    elements

    List of Complex values.

    Return Value

    A new column Vector instance.

Public properties

  • Maps vector into a list

    Declaration

    Swift

    public var elements: [Complex<Double>] { get }

CustomStringConvertible methods

  • Declaration

    Swift

    public var description: String { get }

Sequence methods

  • Declaration

    Swift

    public typealias Iterator = ArraySlice<Complex<Double>>.Iterator
  • Declaration

    Swift

    public func makeIterator() -> Vector.Iterator