formWindow(usingSequence:result:isHalfWindow:)
Populates a double-precision vector with a specified window.
Declaration
static func formWindow<V>(usingSequence sequence: vDSP.WindowSequence, result: inout V, isHalfWindow: Bool) where V : AccelerateMutableBuffer, V.Element == DoubleParameters
- sequence:
The window sequence to use for generation.
- result:
The destination vector that receives the result.
- isHalfWindow:
A Boolean value that specifies whether the function generates half of the number of elements.
Discussion
Use this function to populate a vector with values of a specified window sequence.
The following code shows how to generate a single-precision Blackman window:
var c = [Double](repeating: 0,
count: 1024)
vDSP.formWindow(usingSequence: .blackman,
result: &c,
isHalfWindow: false)The following figure illustrates the values of the output vector, c:
[Image]