wgblas
    Preparing search index...

    Function triangularDiagonalArb

    • 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.

      Parameters

      • arrArb: any

        base Float32Array arbitrary (from ndArrayArb)

      • n: any

        matrix order — number of diagonal entries

      • lda: any

        leading dimension — diagonal entries sit at i*lda+i

      • diagLow: number = 5

        lower bound for |diagonal entry| (default: 5)

      • diagHigh: number = 15

        upper bound for |diagonal entry| (default: 15)

      Returns Arbitrary<Float32Array<ArrayBuffer>>

      fast-check arbitrary producing the same-shaped array with its diagonal patched