xen-dev-utils
    Preparing search index...

    Function padMatrix

    • Fix a 2-D matrix to have full rows (pad with zeros).

      Type Parameters

      • T extends number | bigint

      Parameters

      • M: T[][]

        Input matrix.

      Returns { height: number; M: T[][]; one: number | bigint; width: number; zero: T }

      Height, width, the padded matrix and the corresponding 0 or 0n and 1 or 1n.