---
title: "init(previous:count:direction:transformType:ofType:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/vdsp/discretefouriertransform/init(previous:count:direction:transformtype:oftype:)"
---

# init(previous:count:direction:transformType:ofType:)

Returns a new discrete Fourier transform instance.

## Declaration

```swift
init(previous: vDSP.DiscreteFourierTransform<Float>? = nil, count: Int, direction: vDSP.FourierTransformDirection, transformType: vDSP.DFTTransformType, ofType: T.Type) throws
```

## Parameters

- `previous`: An existing doc://com.apple.accelerate/documentation/Accelerate/vDSP/DiscreteFourierTransform structure that shares memory with the discrete Fourier transform instance that this function returns. Pass nil to create an object with newly initialized and allocated memory.
- `count`: The number of complex elements.
- `direction`: A flag that specifies the transform direction.
- `transformType`: A flag that specifies whether the forward transform is real-to-complex or complex-to-complex.
- `ofType`: The data type for the discrete Fourier transform operation. For split-complex operations, this needs to be be either doc://com.apple.documentation/documentation/Swift/Float or doc://com.apple.documentation/documentation/Swift/Double. For interleaved operations, this needs to be either doc://com.apple.accelerate/documentation/Accelerate/DSPComplex or doc://com.apple.accelerate/documentation/Accelerate/DSPDoubleComplex.

## Discussion

Discussion The interleaved DFT operations that the Accelerate framework provides work over collections with specific counts. The maximum number of complex elements that these operations support is 4096, and other supported counts are the result of the formula f * 2ⁿ for certain values of f and n. In the case of real-to-complex, n is the number of real elements divided by two, and for complex-to-complex n is the number of complex elements. The following tables show the complete list of supported lengths for different values of f and n: Supported lengths for f = 1  |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |  Supported lengths for f = 3  |  |   |  |   |  |   |  |   |  |   |  |   |  |   |  |  Supported lengths for f = 5  |  |   |  |   |  |   |  |   |  |   |  |   |  |  Supported lengths for f = 9  |  |   |  |   |  |   |  |   |  |   |  |   |  |  Supported lengths for f = 15  |  |   |  |   |  |   |  |   |  |   |  |   |  |
