Numerical Eigenvalues
This module provides iterative methods and algorithms for computing eigenvalues and eigenvectors of matrices.
Aitken(Eigenvalues)
Apply Aitken's delta-squared process for accelerated convergence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Eigenvalues
|
list
|
List of computed eigenvalues. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
Accelerated eigenvalue. |
Source code in openum/NumEigenv.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
Eigenvalue_calc(mat, vec, Iteration)
Compute an eigenvalue and eigenvector using power iteration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mat
|
ndarray
|
Input matrix. |
required |
vec
|
ndarray
|
Initial vector. |
required |
Iteration
|
int
|
Number of iterations. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple[float, ndarray]
|
Eigenvalue and eigenvector. |
Source code in openum/NumEigenv.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
Eigenvalues(mat, vec, Iteration)
Compute eigenvalues and eigenvectors of a matrix and its inverse.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mat
|
ndarray
|
Input matrix. |
required |
vec
|
ndarray
|
Initial vector. |
required |
Iteration
|
int
|
Number of iterations. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple[list[float], list[ndarray]]
|
List of eigenvalues and eigenvectors. |
Source code in openum/NumEigenv.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
Eigenvalues_Aitken(mat, vec, Iteration)
Compute eigenvalues and eigenvectors using Aitken's method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mat
|
ndarray
|
Input matrix. |
required |
vec
|
ndarray
|
Initial vector. |
required |
Iteration
|
int
|
Number of iterations. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple[list[float], list[ndarray]]
|
List of eigenvalues and eigenvectors. |
Source code in openum/NumEigenv.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
eigenvalue_calc_aitken(mat, vec, Iteration)
Compute an eigenvalue and eigenvector using Aitken's method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mat
|
ndarray
|
Input matrix. |
required |
vec
|
ndarray
|
Initial vector. |
required |
Iteration
|
int
|
Number of iterations. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
tuple[float, ndarray]
|
Eigenvalue and eigenvector. |
Source code in openum/NumEigenv.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | |
matrix_vector(N, Matrix, Vector)
Multiply a matrix by a vector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
int
|
Size of the matrix and vector. |
required |
Matrix
|
ndarray
|
Input matrix. |
required |
Vector
|
ndarray
|
Input vector. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ndarray |
ndarray
|
Resulting vector after multiplication. |
Source code in openum/NumEigenv.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |