Function

vDSP_measqvD(_:_:_:_:)

Calculates the mean of squares in a double-precision vector.

Declaration

func vDSP_measqvD(_ __A: UnsafePointer<Double>, _ __I: vDSP_Stride, _ __C: UnsafeMutablePointer<Double>, _ __N: vDSP_Length)

Parameters

__A

Single-precision real input vector.

__I

Stride for A.

__C

Output scalar.

__N

The number of elements to process. If N is zero (0), this function returns -INFINITY.

Discussion

This function calculates the mean of the squares of the first N elements of A and writes the result to C:

A diagram showing the operation of the vDSP_measqv function. There are three rows. The top row represents the input, vector A. The second row represents the averaging operation. The bottom row represents the output, vector C. The diagram has connecting lines from the input vectors to the operation and from the operation to the output vector indicating the relationships between the input and output.

The operation is:

C[0] = sum(A[n] * A[n], 0 <= n < N) / N;

See Also

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.