-
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.
Merge pull request #70 from jbrown1618/singular-value-decomposition
Implemented Singular Value Decomposition
- Loading branch information
Showing
20 changed files
with
422 additions
and
10 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,33 @@ | ||
Size,Min Time,Max Time,Mean Time | ||
1,0,3,1.2 | ||
2,2,5,3.2 | ||
3,2,5,3.6 | ||
4,4,8,5.4 | ||
5,7,9,8.2 | ||
6,11,12,11.8 | ||
7,15,20,17.2 | ||
8,23,26,24.2 | ||
9,32,39,34 | ||
10,45,46,45.6 | ||
11,59,63,60.6 | ||
12,81,88,85 | ||
13,104,106,105 | ||
14,132,137,134 | ||
15,165,179,169.4 | ||
16,205,219,211.2 | ||
17,251,266,255.6 | ||
18,311,325,316 | ||
19,380,394,384.6 | ||
20,460,469,464.8 | ||
21,542,554,547.6 | ||
22,682,696,688.8 | ||
23,800,834,810.6 | ||
24,935,990,951.4 | ||
25,1092,1105,1099.2 | ||
26,1269,1287,1277.4 | ||
27,1464,1482,1471.2 | ||
28,1679,1694,1685.4 | ||
29,1962,2229,2113 | ||
30,2233,2843,2520.2 | ||
31,2482,2793,2586.4 | ||
32,2807,3444,3173.4 |
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,30 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@josh-brown/vector](./vector.md) > [calculateCholeskyDecomposition](./vector.calculatecholeskydecomposition.md) | ||
|
||
## calculateCholeskyDecomposition() function | ||
|
||
Uses the serial version of the Cholesky algorith to calculate the Cholesky decomposition of a matrix `A`<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function calculateCholeskyDecomposition<S>(A: Matrix<S>): CholeskyDecomposition<S> | undefined; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| A | <code>Matrix<S></code> | The matrix to decompose | | ||
|
||
<b>Returns:</b> | ||
|
||
`CholeskyDecomposition<S> | undefined` | ||
|
||
## Remarks | ||
|
||
A Cholesky decomposition of a matrix `A` consists of a lower-triangular matrix `L` such that \_LL\* = A\_. | ||
|
||
A Cholesky decomposition only exists if `A` is symmetrix and positive-definite. | ||
|
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) > [calculateSingularValueDecomposition](./vector.calculatesingularvaluedecomposition.md) | ||
|
||
## calculateSingularValueDecomposition() function | ||
|
||
Uses the Power Method to calculate the Singular Value Decomposition of a matrix `A` | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function calculateSingularValueDecomposition<S>(A: Matrix<S>): SingularValueDecomposition<S>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| A | <code>Matrix<S></code> | the matrix to decompose | | ||
|
||
<b>Returns:</b> | ||
|
||
`SingularValueDecomposition<S>` | ||
|
||
## Remarks | ||
|
||
A Singular Value Decomposition consists of orthogonal matrices `U` and `V` and a diagonal matrix `Sigma` such that \_USigmaV\* = A\_ | ||
|
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@josh-brown/vector](./vector.md) > [CholeskyDecomposition](./vector.choleskydecomposition.md) > [L](./vector.choleskydecomposition.l.md) | ||
|
||
## CholeskyDecomposition.L property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
L: Matrix<S>; | ||
``` |
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,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@josh-brown/vector](./vector.md) > [CholeskyDecomposition](./vector.choleskydecomposition.md) | ||
|
||
## CholeskyDecomposition interface | ||
|
||
The result of a Cholesky Decomposition | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface CholeskyDecomposition<S> | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [L](./vector.choleskydecomposition.l.md) | <code>Matrix<S></code> | | | ||
|
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) > [rank](./vector.rank.md) | ||
|
||
## rank() function | ||
|
||
Calculates the rank of a matrix | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare function rank<S>(matrix: Matrix<S>): number; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| matrix | <code>Matrix<S></code> | the matrix for which to determine the rank | | ||
|
||
<b>Returns:</b> | ||
|
||
`number` | ||
|
||
## Remarks | ||
|
||
The rank of a matrix A is the dimension of the vector space spanned by the columns of A. Equivalently, it is the number of pivot entries in the row-echelon form of A, or the number of nonzero rows in the row echelon form of A. | ||
|
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,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@josh-brown/vector](./vector.md) > [SingularValueDecomposition](./vector.singularvaluedecomposition.md) | ||
|
||
## SingularValueDecomposition interface | ||
|
||
The result of a Singular Value Decomposition | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface SingularValueDecomposition<S> | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [Sigma](./vector.singularvaluedecomposition.sigma.md) | <code>Matrix<S></code> | | | ||
| [U](./vector.singularvaluedecomposition.u.md) | <code>Matrix<S></code> | | | ||
| [V](./vector.singularvaluedecomposition.v.md) | <code>Matrix<S></code> | | | ||
|
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@josh-brown/vector](./vector.md) > [SingularValueDecomposition](./vector.singularvaluedecomposition.md) > [Sigma](./vector.singularvaluedecomposition.sigma.md) | ||
|
||
## SingularValueDecomposition.Sigma property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
Sigma: Matrix<S>; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@josh-brown/vector](./vector.md) > [SingularValueDecomposition](./vector.singularvaluedecomposition.md) > [U](./vector.singularvaluedecomposition.u.md) | ||
|
||
## SingularValueDecomposition.U property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
U: Matrix<S>; | ||
``` |
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@josh-brown/vector](./vector.md) > [SingularValueDecomposition](./vector.singularvaluedecomposition.md) > [V](./vector.singularvaluedecomposition.v.md) | ||
|
||
## SingularValueDecomposition.V property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
V: Matrix<S>; | ||
``` |
Oops, something went wrong.