﻿ILMath.linsolve Method (InArray(Single), InArray(Single))

ILMathAddLanguageSpecificTextSet("LST48A37B65_0?cpp=::|nu=.");linsolve Method (InArrayAddLanguageSpecificTextSet("LST48A37B65_1?cs=&lt;|vb=(Of |cpp=&lt;|fs=&lt;'|nu=(");SingleAddLanguageSpecificTextSet("LST48A37B65_2?cs=&gt;|vb=)|cpp=&gt;|fs=&gt;|nu=)");, InArrayAddLanguageSpecificTextSet("LST48A37B65_3?cs=&lt;|vb=(Of |cpp=&lt;|fs=&lt;'|nu=(");SingleAddLanguageSpecificTextSet("LST48A37B65_4?cs=&gt;|vb=)|cpp=&gt;|fs=&gt;|nu=)");)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Solves a system of linear equations, B = A x.

[ILNumerics Computing Engine]

Namespace:  ILNumerics
Assembly:  ILNumerics.Computing (in ILNumerics.Computing.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public static RetArray<float> linsolve(
InArray<float> A,
InArray<float> B
)

Parameters

A
Type: ILNumericsInArraySingle
Input matrix A. Size [n, q].
B
Type: ILNumericsInArraySingle
Right hand side B. Size [n, m].

Return Value

Type: RetArraySingle
Solution x solving the equation multiply(A, x) = B. Size [q, m].
Remarks

Depending on the structure and properties of A the equation system is solved with different approaches:

• If A is square (q == n) and an upper or lower triangular matrix, the system is solved via backward- or forward substitution and the LAPACK function ?trtrs.
Examples

Array<float> A = randn<float>(4,4); // construct 4 x 4 matrix
Array<float> B = vector<float>(1.0,2.0,3.0);
Array<float> x = linsolve(A,B);
• if A is square, symmetric /hermitian and positive definite A is decomposed into a triangular equation system using cholesky factorization and solved via back-/ forward substitution.

• otherwise, if A is only square it will be decomposed into upper and lower triangular matrices using LU decomposition and the system than solved with the result.
• otherwise, if A is [n, q] with q != n, the system is solved using qr(InArraySingle) decomposition. Note that A can be rank deficient.

The internal storage order of A and/or B may be silently changed when this function returns. The reason is that most functionality is performed in native LAPACK routines which require a certain storage layout (mostly ColumnMajor).

[ILNumerics Computing Engine]

See Also

Reference

MathInternal.linsolve(InArraySingle, InArraySingle, MatrixProperties, Boolean)
MathInternal.lu(InArraySingle)
MathInternal.qr(InArraySingle)
MathInternal.pinv(InArraySingle, NullableSingle)
MathInternal.svd(InArraySingle, OutArraySingle, Boolean)