base Float32Array arbitrary (from ndArrayArb)
matrix order — number of diagonal entries
leading dimension — diagonal entries sit at i*lda+i
lower bound for |diagonal entry| (default: 5)
upper bound for |diagonal entry| (default: 15)
fast-check arbitrary producing the same-shaped array with its diagonal patched
Wraps a matrix arbitrary so its n diagonal entries (
A[i*lda+i]) are overridden to a fixed away-from-zero band instead of whatever the base arbitrary generated there. A plain uniform fill (including near-zero or exactly-zero diagonal entries) is a perfectly legal general matrix, but a routine that divides by the diagonal (e.g. a triangular solve) needs it bounded away from 0 — a near-singular fixture would make even a bug-free GPU/CPU pair disagree wildly, since large relative error there is expected ill-conditioning, not incorrectness.