svd_matrixT_svd_matrixSvdMatrixSvdMatrixsvd_matrix (Operator)

Name

svd_matrixT_svd_matrixSvdMatrixSvdMatrixsvd_matrix — Berechnet die Singulärwertzerlegung einer Matrix.

Signatur

svd_matrix( : : MatrixID, SVDType, ComputeSingularVectors : MatrixUID, MatrixSID, MatrixVID)

Herror T_svd_matrix(const Htuple MatrixID, const Htuple SVDType, const Htuple ComputeSingularVectors, Htuple* MatrixUID, Htuple* MatrixSID, Htuple* MatrixVID)

void SvdMatrix(const HTuple& MatrixID, const HTuple& SVDType, const HTuple& ComputeSingularVectors, HTuple* MatrixUID, HTuple* MatrixSID, HTuple* MatrixVID)

HMatrix HMatrix::SvdMatrix(const HString& SVDType, const HString& ComputeSingularVectors, HMatrix* MatrixSID, HMatrix* MatrixVID) const

HMatrix HMatrix::SvdMatrix(const char* SVDType, const char* ComputeSingularVectors, HMatrix* MatrixSID, HMatrix* MatrixVID) const

HMatrix HMatrix::SvdMatrix(const wchar_t* SVDType, const wchar_t* ComputeSingularVectors, HMatrix* MatrixSID, HMatrix* MatrixVID) const   (Nur Windows)

static void HOperatorSet.SvdMatrix(HTuple matrixID, HTuple SVDType, HTuple computeSingularVectors, out HTuple matrixUID, out HTuple matrixSID, out HTuple matrixVID)

HMatrix HMatrix.SvdMatrix(string SVDType, string computeSingularVectors, out HMatrix matrixSID, out HMatrix matrixVID)

def svd_matrix(matrix_id: HHandle, svdtype: str, compute_singular_vectors: str) -> Tuple[HHandle, HHandle, HHandle]

Beschreibung

Der Operator svd_matrixsvd_matrixSvdMatrixSvdMatrixSvdMatrixsvd_matrix berechnet die volle oder reduzierte Singulärwertzerlegung (SVD) der Matrix MatrixMatrixMatrixMatrixmatrixmatrix, die durch das Matrix Handle MatrixIDMatrixIDMatrixIDMatrixIDmatrixIDmatrix_id gegeben ist. Der Operator gibt das Matrix Handle MatrixSIDMatrixSIDMatrixSIDMatrixSIDmatrixSIDmatrix_sid der Matrix MatrixSMatrixSMatrixSMatrixSmatrixSmatrix_s mit den Singulärwerten in absteigender Reihenfolge zurück. Optional werden die Matrizen MatrixUMatrixUMatrixUMatrixUmatrixUmatrix_u mit den linken und MatrixVMatrixVMatrixVMatrixVmatrixVmatrix_v mit den rechten Singulärvektoren ebenfalls berechnet und deren Matrix Handles MatrixUIDMatrixUIDMatrixUIDMatrixUIDmatrixUIDmatrix_uid und MatrixVIDMatrixVIDMatrixVIDMatrixVIDmatrixVIDmatrix_vid zurückgegeben. Zugriff auf die Elemente der Matrix ist z.B. mit dem Operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix möglich. Die SVD hat die Form

Ist SVDTypeSVDTypeSVDTypeSVDTypeSVDTypesvdtype = 'full'"full""full""full""full""full" gesetzt, wird eine volle SVD berechnet.

Ist SVDTypeSVDTypeSVDTypeSVDTypeSVDTypesvdtype = 'reduced'"reduced""reduced""reduced""reduced""reduced" gesetzt, wird eine reduzierte SVD berechnet.

Die Matrix MatrixUMatrixUMatrixUMatrixUmatrixUmatrix_u mit den linken Singulärvektoren wird berechnet, wenn ComputeSingularVectorsComputeSingularVectorsComputeSingularVectorsComputeSingularVectorscomputeSingularVectorscompute_singular_vectors = 'left'"left""left""left""left""left" gesetzt ist. Die Matrix MatrixVMatrixVMatrixVMatrixVmatrixVmatrix_v mit den rechten Singulärvektoren wird berechnet, wenn ComputeSingularVectorsComputeSingularVectorsComputeSingularVectorsComputeSingularVectorscomputeSingularVectorscompute_singular_vectors = 'right'"right""right""right""right""right" gesetzt ist. Die Matrizen mit den linken und rechten Singulärvektoren werden berechnet, wenn ComputeSingularVectorsComputeSingularVectorsComputeSingularVectorsComputeSingularVectorscomputeSingularVectorscompute_singular_vectors = 'both'"both""both""both""both""both" gesetzt ist.

Wenn ComputeSingularVectorsComputeSingularVectorsComputeSingularVectorsComputeSingularVectorscomputeSingularVectorscompute_singular_vectors = 'none'"none""none""none""none""none" gesetzt ist, werden keine Matrizen mit den Singulärvektoren berechnet. Die Matrix MatrixSMatrixSMatrixSMatrixSmatrixSmatrix_s ist eine Matrix mit n Zeilen und einer Spalte, wobei n = min(Anzahl der Zeilen der Eingabematrix MatrixMatrixMatrixMatrixmatrixmatrix, Anzahl der Spalten der Eingabematrix MatrixMatrixMatrixMatrixmatrixmatrix).

Es ist zu beachten, dass in den Beispielen Unterschiede in der Bedeutung der Werte in den Ausgabematrizen zu finden sind: Wenn ein Wert als ganze Zahl dargestellt ist, z.B. 0 oder 1, ist der Wert dieses Elements per Definition dieser bestimmte Wert. Wenn der Wert als Gleitpunktzahl dargestellt ist, z.B. 0.0 oder 1.0, ist der Wert von dem Operator berechnet worden.

Ausführungsinformationen

Parameter

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

Matrix Handle der Eingabematrix.

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

Berechnungstyp.

Defaultwert: 'full' "full" "full" "full" "full" "full"

Werteliste: 'full'"full""full""full""full""full", 'reduced'"reduced""reduced""reduced""reduced""reduced"

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

Berechnung der Singulärwerte.

Defaultwert: 'both' "both" "both" "both" "both" "both"

Werteliste: 'both'"both""both""both""both""both", 'left'"left""left""left""left""left", 'none'"none""none""none""none""none", 'right'"right""right""right""right""right"

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

Matrix Handle mit den linken Singulärvektoren.

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

Matrix Handle mit den Singulärwerten.

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

Matrix Handle mit den rechten Singulärvektoren.

Ergebnis

Sind die Parameterwerte korrekt, dann liefert svd_matrixsvd_matrixSvdMatrixSvdMatrixSvdMatrixsvd_matrix den Wert TRUE. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

create_matrixcreate_matrixCreateMatrixCreateMatrixCreateMatrixcreate_matrix

Nachfolger

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixGetValueMatrixget_value_matrix

Literatur

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.

Modul

Foundation