Contents

window(ofType:usingSequence:count:isHalfWindow:)

Returns an array that contains the specified window.

Declaration

static func window<T>(ofType: T.Type, usingSequence sequence: vDSP.WindowSequence, count: Int, isHalfWindow: Bool) -> [T] where T : vDSP_FloatingPointGeneratable

Parameters

  • ofType:

    The precision of the generated window.

  • sequence:

    The window sequence to use for generation.

  • count:

    The number of elements to generate.

  • isHalfWindow:

    A Boolean value that specifies whether the function generates half of the number of elements.

Mentioned in

Discussion

Use this function to generate and return a vector populated with values of a specified window sequence.

The following code shows how to generate a single-precision Blackman window:

let c = vDSP.window(ofType: Float.self,
                    usingSequence: .blackman,
                    count: 1024,
                    isHalfWindow: false)

The following figure illustrates the values of the output vector, c:

[Image]

See Also

Type Methods