@@ -63,13 +63,13 @@ pointwise complex product replaces the $O(MK)$ direct sum.
6363
6464## Complexity Analysis
6565
66- | Operation | Time | Space (extra) | Notes |
67- | ---------------------| ---------------| ---------------| ---------------------------------------|
68- | Linear convolution | $O(MK)$ | $O(1)$ | Writes into caller-owned buffer |
69- | Circular convolution| $O(N^2)$ | $O(1)$ | Same as linear for equal-length input |
70- | Cross-correlation | $O(MK)$ | $O(K)$ | Reverses one operand on the stack |
71- | Auto-correlation | $O(M^2)$ | $O(1)$ | Alias of cross-correlation |
72- | Fast convolution | $O(L \log L)$ | $O(L)$ | $L = 2^{\lceil\log_2(M+K-1)\rceil}$ |
66+ | Operation | Time | Space (extra) | Notes |
67+ | ---------------------- | ---------------| ---------------| ---------------------------------------|
68+ | Linear convolution | $O(MK)$ | $O(1)$ | Writes into caller-owned buffer |
69+ | Circular convolution | $O(N^2)$ | $O(1)$ | Same as linear for equal-length input |
70+ | Cross-correlation | $O(MK)$ | $O(K)$ | Reverses one operand on the stack |
71+ | Auto-correlation | $O(M^2)$ | $O(1)$ | Alias of cross-correlation |
72+ | Fast convolution | $O(L \log L)$ | $O(L)$ | $L = 2^{\lceil\log_2(M+K-1)\rceil}$ |
7373
7474The fast path is beneficial when $MK > L \log_2 L$, roughly when both operands exceed 32–64
7575samples.
@@ -78,12 +78,12 @@ samples.
7878
7979Linear convolution of $x = [ 1, 2, 3] $ and $h = [ 1, 1] $ (output length $= 4$):
8080
81- | $n$ | Active $k$ range | Computation | $y[ n] $ |
82- | -----| ------------------| ------------------------------- | --------|
83- | 0 | $k=0$ | $1 \cdot 1$ | 1 |
84- | 1 | $k=0,1$ | $2 \cdot 1 + 1 \cdot 1$ | 3 |
85- | 2 | $k=1,2$ | $3 \cdot 1 + 2 \cdot 1$ | 5 |
86- | 3 | $k=2$ | $3 \cdot 1$ | 3 |
81+ | $n$ | Active $k$ range | Computation | $y[ n] $ |
82+ | -----| ------------------| -------------------------| --------|
83+ | 0 | $k=0$ | $1 \cdot 1$ | 1 |
84+ | 1 | $k=0,1$ | $2 \cdot 1 + 1 \cdot 1$ | 3 |
85+ | 2 | $k=1,2$ | $3 \cdot 1 + 2 \cdot 1$ | 5 |
86+ | 3 | $k=2$ | $3 \cdot 1$ | 3 |
8787
8888Result: $[ 1, 3, 5, 3] $.
8989
0 commit comments