cagpjax.linalg.orthogonalize
Orthogonalization methods.
OrthogonalizationMethod
Bases: Enum
Methods for orthogonalizing a matrix.
Source code in src/cagpjax/linalg/orthogonalize.py
CGS = 'cgs'
class-attribute
instance-attribute
Classical Gram–Schmidt orthogonalization
MGS = 'mgs'
class-attribute
instance-attribute
Modified Gram–Schmidt orthogonalization
QR = 'qr'
class-attribute
instance-attribute
Householder QR decomposition
orthogonalize(A, /, method=OrthogonalizationMethod.QR, n_reortho=0)
Orthogonalize the operator using the specified method.
The columns of the resulting matrix should span a (super-)space of the columns of the input matrix and be mutually orthogonal. For column-rank-deficient matrices, some methods (e.g. Gram-Schmidt variants) may include columns of norm 0.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
A
|
Float[Array, 'm n'] | LinearOperator
|
The operator to orthogonalize. |
required |
method
|
OrthogonalizationMethod
|
The method to use for orthogonalization. |
QR
|
n_reortho
|
int
|
The number of times to re-orthogonalize each column. Reorthogonalizing once is generally sufficient to improve orthogonality for Gram-Schmidt variants (see e.g. 10.1007/s00211-005-0615-4). |
0
|
Returns:
Type | Description |
---|---|
Float[Array, 'm n'] | LinearOperator
|
The orthogonalized operator. If the input is a LinearOperator, then so is the output. |