MCPcopy Create free account
hub / github.com/bitanath/pca / assertMatrixElements

Function assertMatrixElements

src/assert.ts:13–20  ·  view source on GitHub ↗
(matrix: Matrix, name: string, indices: [number, number?][])

Source from the content-addressed store, hash-verified

11}
12
13export function assertMatrixElements(matrix: Matrix, name: string, indices: [number, number?][]): void {
14 for (const [row, col] of indices) {
15 assertNotNull(matrix[row], `Row ${name}[${row}][${col}]`);
16 if (col !== undefined) {
17 assertNotNull(matrix[row]![col], `Col ${name}[${row}][${col}]`);
18 }
19 }
20}
21
22export function assertValidMatrix(a:Matrix,aName:string):void{
23 if(!a[0] || !a.length){

Callers 1

svdFunction · 0.85

Calls 1

assertNotNullFunction · 0.85

Tested by

no test coverage detected