Skip to content

Commit

Permalink
fix: add linearDependencies to TS definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Apr 19, 2019
1 parent b8b2c9f commit 22c4f60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions matrix.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,15 @@ declare module 'ml-matrix' {

export function determinant(matrix: MaybeMatrix): number;

export interface ILinearDependenciesOptions {
thresholdValue?: number;
thresholdError?: number;
}
export function linearDependencies(
matrix: MaybeMatrix,
options?: ILinearDependenciesOptions
): Matrix;

export function pseudoInverse(
matrix: MaybeMatrix,
threshold?: number
Expand Down
1 change: 1 addition & 0 deletions src/linearDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function dependenciesOneRow(

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

var n = matrix.rows;
var results = new Matrix(n, n);
Expand Down

0 comments on commit 22c4f60

Please sign in to comment.