-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add usolveAll and lsolveAll methods (#1916)
* refactor solveValidation * refactor usolve * usolve algorithm implemented (for square mat.) * added lsolve, consistent return type, fixed tests * fixed lusolve and its tests, fixed linting issues * added tests for usolve&lsolve, try-catch in lusolve * put changes into separate files (u-/lsolveAll), revert changes to u-, l- and lusolve * made *solveAll return [] for non-solvable, implemented sparse algorithms * improved documentation for *solve(All) Co-authored-by: Jos de Jong <[email protected]>
- Loading branch information
Showing
14 changed files
with
939 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const lsolveAllDocs = { | ||
name: 'lsolveAll', | ||
category: 'Algebra', | ||
syntax: [ | ||
'x=lsolveAll(L, b)' | ||
], | ||
description: | ||
'Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.', | ||
examples: [ | ||
'a = [-2, 3; 2, 1]', | ||
'b = [11, 9]', | ||
'x = lsolve(a, b)' | ||
], | ||
seealso: [ | ||
'lsolve', 'lup', 'lusolve', 'usolve', 'matrix', 'sparse' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export const usolveAllDocs = { | ||
name: 'usolveAll', | ||
category: 'Algebra', | ||
syntax: [ | ||
'x=usolve(U, b)' | ||
], | ||
description: | ||
'Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.', | ||
examples: [ | ||
'x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])' | ||
], | ||
seealso: [ | ||
'usolve', 'lup', 'lusolve', 'lsolve', 'matrix', 'sparse' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.