Vector Summation

Sum the values in a vector.

Topics

Vector Summation

static func sum<U>(U) -> Double

Returns the double-precision vector sum.

static func sum<U>(U) -> Float

Returns the single-precision vector sum.

static func sumAndSumOfSquares<U>(U) -> (elementsSum: Double, squaresSum: Double)

Returns the double-precision vector sum and sum of squares.

static func sumAndSumOfSquares<U>(U) -> (elementsSum: Float, squaresSum: Float)

Returns the single-precision vector sum and sum of squares.

static func sumOfMagnitudes<U>(U) -> Double

Returns the double-precision vector sum of magnitudes.

static func sumOfMagnitudes<U>(U) -> Float

Returns the single-precision vector sum of magnitudes.

static func sumOfSquares<U>(U) -> Double

Returns the double-precision vector sum of squares.

static func sumOfSquares<U>(U) -> Float

Returns the single-precision vector sum of squares.

func vDSP_svemg(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Length)

Calculates the sum of magnitudes in a single-precision vector.

func vDSP_svs(UnsafePointer<Float>, vDSP_Stride, UnsafeMutablePointer<Float>, vDSP_Length)

Calculates the sum of signed squares in a single-precision vector.

func vDSP_svsD(UnsafePointer<Double>, vDSP_Stride, UnsafeMutablePointer<Double>, vDSP_Length)

Calculates the sum of signed squares in a double-precision vector.

See Also

Vector Reduction

Vector Extrema Calculation

Calculate the minimum and maximum values in a vector.

Vector Average Calculation

Calculate the average value in a vector.