Skip to content

Commit 8b15847

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

4 files changed

Lines changed: 29 additions & 29 deletions

File tree

‎doc/analysis/FrequencyResponse.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ $$\omega_k = \frac{2\pi f_k}{f_s}$$
3232

3333
## Complexity Analysis
3434

35-
| Case | Time | Space | Notes |
36-
|---------|------------------|------------------|------------------------------------|
37-
| Average | $O(N \cdot (P+Q))$ | $O(N)$ | $N$ frequency points, $P+Q$ coefficients |
35+
| Case | Time | Space | Notes |
36+
|---------|--------------------|--------|------------------------------------------|
37+
| Average | $O(N \cdot (P+Q))$ | $O(N)$ | $N$ frequency points, $P+Q$ coefficients |
3838

3939
## Step-by-Step Walkthrough
4040

‎doc/estimators/RecursiveLeastSquares.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ The implementation provides convergence diagnostics via `EstimationMetrics`:
3939

4040
## Complexity Analysis
4141

42-
| Case | Time | Space | Notes |
43-
|---------|----------|-----------|---------------------------------------|
42+
| Case | Time | Space | Notes |
43+
|---------|----------|----------|----------------------------------------|
4444
| Average | $O(p^2)$ | $O(p^2)$ | Matrix-vector products + outer product |
4545

4646
Per-update cost is $O(p^2)$ for $p$ parameters, dominated by the covariance update. This is significantly cheaper than the $O(p^3)$ batch solution via matrix inversion.
@@ -50,11 +50,11 @@ Per-update cost is $O(p^2)$ for $p$ parameters, dominated by the covariance upda
5050
Estimating the slope of $y = 2x$ with RLS ($p = 2$: bias + slope, $\lambda = 1$):
5151

5252
| Step | $\mathbf{x}$ | $y$ | $\hat{\theta}_0$ (bias) | $\hat{\theta}_1$ (slope) | Innovation |
53-
|------|---------------|-----|-------------------------|--------------------------|------------|
54-
| Init | — | — | 0.0 | 0.0 | — |
55-
| 1 | [1, 1] | 2 | 1.0 | 1.0 | 2.0 |
56-
| 2 | [1, 2] | 4 | 0.0 | 2.0 | 1.0 |
57-
| 3 | [1, 3] | 6 | 0.0 | 2.0 | 0.0 |
53+
|------|--------------|-----|-------------------------|--------------------------|------------|
54+
| Init | — | — | 0.0 | 0.0 | — |
55+
| 1 | [1, 1] | 2 | 1.0 | 1.0 | 2.0 |
56+
| 2 | [1, 2] | 4 | 0.0 | 2.0 | 1.0 |
57+
| 3 | [1, 3] | 6 | 0.0 | 2.0 | 0.0 |
5858

5959
Convergence is achieved in 2 steps for this noiseless system.
6060

‎doc/filters/passive/Fir.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ $$H(e^{j\omega}) = \sum_{i=0}^{N-1} b_i e^{-j\omega i}$$
3333

3434
## Complexity Analysis
3535

36-
| Case | Time | Space | Notes |
37-
|---------|----------|---------|----------------------------------------|
38-
| Best | $O(N)$ | $O(N)$ | Disabled (passthrough) |
39-
| Average | $O(N)$ | $O(N)$ | Convolution sum |
40-
| Worst | $O(N)$ | $O(N)$ | Same — no data-dependent branching |
36+
| Case | Time | Space | Notes |
37+
|---------|--------|--------|------------------------------------|
38+
| Best | $O(N)$ | $O(N)$ | Disabled (passthrough) |
39+
| Average | $O(N)$ | $O(N)$ | Convolution sum |
40+
| Worst | $O(N)$ | $O(N)$ | Same — no data-dependent branching |
4141

4242
Time is per sample. Space is for the coefficient and delay line buffers.
4343

@@ -46,11 +46,11 @@ Time is per sample. Space is for the coefficient and delay line buffers.
4646
Given a 3-tap FIR filter with coefficients $b = [0.25, 0.5, 0.25]$ and input sequence $x = [1.0, 2.0, 3.0, 4.0]$:
4747

4848
| $n$ | $x[n]$ | $x[n-1]$ | $x[n-2]$ | $y[n] = 0.25 x[n] + 0.5 x[n-1] + 0.25 x[n-2]$ |
49-
|-----|---------|-----------|-----------|--------------------------------------------------|
50-
| 0 | 1.0 | 0.0 | 0.0 | 0.25 |
51-
| 1 | 2.0 | 1.0 | 0.0 | 1.0 |
52-
| 2 | 3.0 | 2.0 | 1.0 | 2.0 |
53-
| 3 | 4.0 | 3.0 | 2.0 | 3.0 |
49+
|-----|--------|----------|----------|-----------------------------------------------|
50+
| 0 | 1.0 | 0.0 | 0.0 | 0.25 |
51+
| 1 | 2.0 | 1.0 | 0.0 | 1.0 |
52+
| 2 | 3.0 | 2.0 | 1.0 | 2.0 |
53+
| 3 | 4.0 | 3.0 | 2.0 | 3.0 |
5454

5555
## Pitfalls & Edge Cases
5656

‎doc/filters/passive/Iir.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ The filter is stable if and only if all poles of $H(z)$ lie strictly inside the
3030

3131
## Complexity Analysis
3232

33-
| Case | Time | Space | Notes |
34-
|---------|------------|-------------|----------------------------------------|
35-
| Best | $O(P+Q)$ | $O(P+Q)$ | Disabled (passthrough) |
36-
| Average | $O(P+Q)$ | $O(P+Q)$ | Feedforward + feedback sums |
37-
| Worst | $O(P+Q)$ | $O(P+Q)$ | Same — sequential, no branching |
33+
| Case | Time | Space | Notes |
34+
|---------|----------|----------|---------------------------------|
35+
| Best | $O(P+Q)$ | $O(P+Q)$ | Disabled (passthrough) |
36+
| Average | $O(P+Q)$ | $O(P+Q)$ | Feedforward + feedback sums |
37+
| Worst | $O(P+Q)$ | $O(P+Q)$ | Same — sequential, no branching |
3838

3939
Time is per sample. Space stores coefficient and delay line buffers.
4040

@@ -43,10 +43,10 @@ Time is per sample. Space stores coefficient and delay line buffers.
4343
Given a first-order IIR (1 feedforward, 1 feedback) with $b_0 = 0.5$, $a_0 = 0.3$ and input $x = [1.0, 0.0, 0.0]$:
4444

4545
| $n$ | $x[n]$ | $y[n-1]$ | $y[n] = 0.5 \cdot x[n] + 0.3 \cdot y[n-1]$ |
46-
|-----|---------|-----------|----------------------------------------------|
47-
| 0 | 1.0 | 0.0 | 0.5 |
48-
| 1 | 0.0 | 0.5 | 0.15 |
49-
| 2 | 0.0 | 0.15 | 0.045 |
46+
|-----|--------|----------|--------------------------------------------|
47+
| 0 | 1.0 | 0.0 | 0.5 |
48+
| 1 | 0.0 | 0.5 | 0.15 |
49+
| 2 | 0.0 | 0.15 | 0.045 |
5050

5151
The output decays exponentially — characteristic of IIR filters with $|a_0| < 1$.
5252

0 commit comments

Comments
 (0)