Worst case peak gain in ltitop is currently estimated by brute force:
|
# TODO(hidmic): do better than brute force |
|
WCPG = D |
|
Ap = np.eye(A.shape[0]) |
|
WCPG_terms = np.zeros_like(D) |
|
for n in range(math.ceil(nmax / 100)): |
|
WCPG_terms[:] = 0. |
|
for _ in range(n * 100, (n + 1) * 100): |
|
WCPG_terms += np.abs(C @ Ap @ B) |
|
Ap = Ap @ A |
|
WCPG += WCPG_terms |
|
if np.all((WCPG_terms / WCPG) <= rel_tol): |
|
break # early |
Accuracy guarantees are thus quite loose, and the resulting performance is awful. It calls for a better approach.
Worst case peak gain in
ltitopis currently estimated by brute force:ltitop/src/ltitop/models/analysis.py
Lines 45 to 56 in d75f165
Accuracy guarantees are thus quite loose, and the resulting performance is awful. It calls for a better approach.