Skip to content

Commit 22c4f60

Browse files
committed
fix: add linearDependencies to TS definitions
1 parent b8b2c9f commit 22c4f60

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

matrix.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,15 @@ declare module 'ml-matrix' {
382382

383383
export function determinant(matrix: MaybeMatrix): number;
384384

385+
export interface ILinearDependenciesOptions {
386+
thresholdValue?: number;
387+
thresholdError?: number;
388+
}
389+
export function linearDependencies(
390+
matrix: MaybeMatrix,
391+
options?: ILinearDependenciesOptions
392+
): Matrix;
393+
385394
export function pseudoInverse(
386395
matrix: MaybeMatrix,
387396
threshold?: number

src/linearDependencies.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function dependenciesOneRow(
4646

4747
export function linearDependencies(matrix, options = {}) {
4848
const { thresholdValue = 10e-10, thresholdError = 10e-10 } = options;
49+
matrix = Matrix.checkMatrix(matrix);
4950

5051
var n = matrix.rows;
5152
var results = new Matrix(n, n);

0 commit comments

Comments
 (0)