UNPKG

@mojir/lits

Version:

Lits is a pure functional programming language implemented in TypeScript

12 lines (11 loc) 631 B
/** * Checks if a matrix is banded with the given lower and upper bandwidth. * A matrix is banded if all non-zero elements are within 'lower' diagonals * below the main diagonal and 'upper' diagonals above the main diagonal. * * @param matrix - The matrix to check, represented as a 2D array of numbers * @param lower - Number of non-zero diagonals below the main diagonal * @param upper - Number of non-zero diagonals above the main diagonal * @returns true if the matrix is banded with the given parameters, false otherwise */ export declare function isBanded(matrix: number[][], lower: number, upper: number): boolean;