-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement multiplying chains of matrices using dynamic programm…
…ing (#141)
- Loading branch information
1 parent
aef543b
commit ffdc77f
Showing
13 changed files
with
1,453 additions
and
2,469 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@josh-brown/vector](./vector.md) > [chainProduct](./vector.chainproduct.md) | ||
|
||
## chainProduct() function | ||
|
||
Returns the product of the given array of matrices. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function chainProduct<S>(...matrices: Matrix<S>[]): Matrix<S>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| matrices | [Matrix](./vector.matrix.md)<!-- --><S>\[\] | The array of matrices to multiply | | ||
|
||
<b>Returns:</b> | ||
|
||
[Matrix](./vector.matrix.md)<!-- --><S> | ||
|
||
## Remarks | ||
|
||
Uses dynamic programming to determine the order of multiplication that minimizes the total number of scalar multiplications. | ||
|
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.