Skip to content

Commit 71a7fa0

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 0f959a8 commit 71a7fa0

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

doc/analysis/ConvolutionCorrelation.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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

7474
The fast path is beneficial when $MK > L \log_2 L$, roughly when both operands exceed 32–64
7575
samples.
@@ -78,12 +78,12 @@ samples.
7878

7979
Linear 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

8888
Result: $[1, 3, 5, 3]$.
8989

0 commit comments

Comments
 (0)