orthogonal_decompose_matrixT_orthogonal_decompose_matrixOrthogonalDecomposeMatrixOrthogonalDecomposeMatrixorthogonal_decompose_matrix (Operator)

Name

orthogonal_decompose_matrixT_orthogonal_decompose_matrixOrthogonalDecomposeMatrixOrthogonalDecomposeMatrixorthogonal_decompose_matrix — Perform an orthogonal decomposition of a matrix.

Signature

orthogonal_decompose_matrix( : : MatrixID, DecompositionType, OutputMatricesType, ComputeOrthogonal : MatrixOrthogonalID, MatrixTriangularID)

Herror T_orthogonal_decompose_matrix(const Htuple MatrixID, const Htuple DecompositionType, const Htuple OutputMatricesType, const Htuple ComputeOrthogonal, Htuple* MatrixOrthogonalID, Htuple* MatrixTriangularID)

void OrthogonalDecomposeMatrix(const HTuple& MatrixID, const HTuple& DecompositionType, const HTuple& OutputMatricesType, const HTuple& ComputeOrthogonal, HTuple* MatrixOrthogonalID, HTuple* MatrixTriangularID)

HMatrix HMatrix::OrthogonalDecomposeMatrix(const HString& DecompositionType, const HString& OutputMatricesType, const HString& ComputeOrthogonal, HMatrix* MatrixTriangularID) const

HMatrix HMatrix::OrthogonalDecomposeMatrix(const char* DecompositionType, const char* OutputMatricesType, const char* ComputeOrthogonal, HMatrix* MatrixTriangularID) const

HMatrix HMatrix::OrthogonalDecomposeMatrix(const wchar_t* DecompositionType, const wchar_t* OutputMatricesType, const wchar_t* ComputeOrthogonal, HMatrix* MatrixTriangularID) const   (Windows only)

static void HOperatorSet.OrthogonalDecomposeMatrix(HTuple matrixID, HTuple decompositionType, HTuple outputMatricesType, HTuple computeOrthogonal, out HTuple matrixOrthogonalID, out HTuple matrixTriangularID)

HMatrix HMatrix.OrthogonalDecomposeMatrix(string decompositionType, string outputMatricesType, string computeOrthogonal, out HMatrix matrixTriangularID)

def orthogonal_decompose_matrix(matrix_id: HHandle, decomposition_type: str, output_matrices_type: str, compute_orthogonal: str) -> Tuple[HHandle, HHandle]

Description

The operator orthogonal_decompose_matrixorthogonal_decompose_matrixOrthogonalDecomposeMatrixOrthogonalDecomposeMatrixOrthogonalDecomposeMatrixorthogonal_decompose_matrix decomposes the MatrixMatrixMatrixMatrixmatrixmatrix defined by the matrix handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id. The results are stored in the two generated matrices MatrixOrthogonalMatrixOrthogonalMatrixOrthogonalMatrixOrthogonalmatrixOrthogonalmatrix_orthogonal and MatrixTriangularMatrixTriangularMatrixTriangularMatrixTriangularmatrixTriangularmatrix_triangular. The operator returns the matrix handles MatrixOrthogonalIDMatrixOrthogonalIDMatrixOrthogonalIDMatrixOrthogonalIDmatrixOrthogonalIDmatrix_orthogonal_id and MatrixTriangularIDMatrixTriangularIDMatrixTriangularIDMatrixTriangularIDmatrixTriangularIDmatrix_triangular_id of these two matrices. Access to the elements of the matrices is possible e.g. with the operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix.

For OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'full'"full""full""full""full""full" all results of the decomposition are stored in the matrices MatrixOrthogonalMatrixOrthogonalMatrixOrthogonalMatrixOrthogonalmatrixOrthogonalmatrix_orthogonal and MatrixTriangularMatrixTriangularMatrixTriangularMatrixTriangularmatrixTriangularmatrix_triangular. For OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'reduced'"reduced""reduced""reduced""reduced""reduced" only a part of result elements of the matrices MatrixOrthogonalMatrixOrthogonalMatrixOrthogonalMatrixOrthogonalmatrixOrthogonalmatrix_orthogonal and MatrixTriangularMatrixTriangularMatrixTriangularMatrixTriangularmatrixTriangularmatrix_triangular are stored. Therefore the sizes of these matrices are smaller than for OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'full'"full""full""full""full""full".

For the parameter ComputeOrthogonalComputeOrthogonalComputeOrthogonalComputeOrthogonalcomputeOrthogonalcompute_orthogonal = 'true'"true""true""true""true""true" both output matrices are computed. For the ComputeOrthogonalComputeOrthogonalComputeOrthogonalComputeOrthogonalcomputeOrthogonalcompute_orthogonal = 'false'"false""false""false""false""false" only the matrix MatrixTriangularMatrixTriangularMatrixTriangularMatrixTriangularmatrixTriangularmatrix_triangular is computed. Thus, the runtime of the operation takes fewer time.

The type of the MatrixMatrixMatrixMatrixmatrixmatrix can be selected via the parameter DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type. For DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'qr'"qr""qr""qr""qr""qr" a QR decomposition (Quadratic/Right) or for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'ql'"ql""ql""ql""ql""ql" a QL decomposition (Quadratic/Left) is computed. The decomposition is written as MatrixMatrixMatrixMatrixmatrixmatrix = MatrixOrthogonalMatrixOrthogonalMatrixOrthogonalMatrixOrthogonalmatrixOrthogonalmatrix_orthogonal * MatrixTriangularMatrixTriangularMatrixTriangularMatrixTriangularmatrixTriangularmatrix_triangular.

Example for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'qr'"qr""qr""qr""qr""qr" and OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'full'"full""full""full""full""full":

Example for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'qr'"qr""qr""qr""qr""qr" and OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'reduced'"reduced""reduced""reduced""reduced""reduced":

Example for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'ql'"ql""ql""ql""ql""ql" and OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'full'"full""full""full""full""full":

Example for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'ql'"ql""ql""ql""ql""ql" and OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'reduced'"reduced""reduced""reduced""reduced""reduced":

For DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'rq'"rq""rq""rq""rq""rq" a RQ decomposition (Right/Quadratic) or for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'lq'"lq""lq""lq""lq""lq" a LQ decomposition (Left/Quadratic) is computed. The decomposition is written as MatrixMatrixMatrixMatrixmatrixmatrix = MatrixTriangularMatrixTriangularMatrixTriangularMatrixTriangularmatrixTriangularmatrix_triangular * MatrixOrthogonalMatrixOrthogonalMatrixOrthogonalMatrixOrthogonalmatrixOrthogonalmatrix_orthogonal.

Example for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'rq'"rq""rq""rq""rq""rq" and OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'full'"full""full""full""full""full":

Example for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'rq'"rq""rq""rq""rq""rq" and OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'reduced'"reduced""reduced""reduced""reduced""reduced":

Example for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'lq'"lq""lq""lq""lq""lq" and OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'full'"full""full""full""full""full":

Example for DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type = 'lq'"lq""lq""lq""lq""lq" and OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type = 'reduced'"reduced""reduced""reduced""reduced""reduced":

It should be noted that in the examples there are differences in the meaning of the numbers of the output matrices: The results of the elements are per definition a certain value if the number of this value is shown as an integer number, e.g., 0 or 1. If the number is shown as a floating point number, e.g., 0.0 or 1.0, the value is computed.

Execution Information

Parameters

MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id (input_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix.

DecompositionTypeDecompositionTypeDecompositionTypeDecompositionTypedecompositionTypedecomposition_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Method of decomposition.

Default value: 'qr' "qr" "qr" "qr" "qr" "qr"

List of values: 'lq'"lq""lq""lq""lq""lq", 'ql'"ql""ql""ql""ql""ql", 'qr'"qr""qr""qr""qr""qr", 'rq'"rq""rq""rq""rq""rq"

OutputMatricesTypeOutputMatricesTypeOutputMatricesTypeOutputMatricesTypeoutputMatricesTypeoutput_matrices_type (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of output matrices.

Default value: 'full' "full" "full" "full" "full" "full"

List of values: 'full'"full""full""full""full""full", 'reduced'"reduced""reduced""reduced""reduced""reduced"

ComputeOrthogonalComputeOrthogonalComputeOrthogonalComputeOrthogonalcomputeOrthogonalcompute_orthogonal (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Computation of the orthogonal matrix.

Default value: 'true' "true" "true" "true" "true" "true"

List of values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

MatrixOrthogonalIDMatrixOrthogonalIDMatrixOrthogonalIDMatrixOrthogonalIDmatrixOrthogonalIDmatrix_orthogonal_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle with the orthogonal part of the decomposed input matrix.

MatrixTriangularIDMatrixTriangularIDMatrixTriangularIDMatrixTriangularIDmatrixTriangularIDmatrix_triangular_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle with the triangular part of the decomposed input matrix.

Result

If the parameters are valid, the operator orthogonal_decompose_matrixorthogonal_decompose_matrixOrthogonalDecomposeMatrixOrthogonalDecomposeMatrixOrthogonalDecomposeMatrixorthogonal_decompose_matrix returns the value TRUE. If necessary, an exception is raised.

Possible Predecessors

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

See also

decompose_matrixdecompose_matrixDecomposeMatrixDecomposeMatrixDecomposeMatrixdecompose_matrix, solve_matrixsolve_matrixSolveMatrixSolveMatrixSolveMatrixsolve_matrix

References

David Poole: “Linear Algebra: A Modern Introduction”; Thomson; Belmont; 2006.
Gene H. Golub, Charles F. van Loan: “Matrix Computations”; The Johns Hopkins University Press; Baltimore and London; 1996.

Module

Foundation