Vector Average Calculation

Calculate the average value in a vector.

Topics

Mean Calculation

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

Returns the double-precision vector mean.

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

Returns the single-precision vector mean.

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

Returns the double-precision vector mean magnitude.

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

Returns the single-precision vector mean magnitude.

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

Returns the double-precision vector mean square.

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

Returns the single-precision vector mean square.

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

Returns double-precision vector root mean square.

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

Returns single-precision vector root mean square.

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

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

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

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

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

Calculates the mean 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 Summation

Sum the values in a vector.