File: Techniques-Used-for-Linear-Algebra.html

package info (click to toggle)
octave 10.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 145,388 kB
  • sloc: cpp: 335,976; ansic: 82,241; fortran: 20,963; objc: 9,402; sh: 8,756; yacc: 4,392; lex: 4,333; perl: 1,544; java: 1,366; awk: 1,259; makefile: 660; xml: 192
file content (90 lines) | stat: -rw-r--r-- 4,324 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Techniques Used for Linear Algebra (GNU Octave (version 10.3.0))</title>

<meta name="description" content="Techniques Used for Linear Algebra (GNU Octave (version 10.3.0))">
<meta name="keywords" content="Techniques Used for Linear Algebra (GNU Octave (version 10.3.0))">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Linear-Algebra.html" rel="up" title="Linear Algebra">
<link href="Basic-Matrix-Functions.html" rel="next" title="Basic Matrix Functions">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">


</head>

<body lang="en">
<div class="section-level-extent" id="Techniques-Used-for-Linear-Algebra">
<div class="nav-panel">
<p>
Next: <a href="Basic-Matrix-Functions.html" accesskey="n" rel="next">Basic Matrix Functions</a>, Up: <a href="Linear-Algebra.html" accesskey="u" rel="up">Linear Algebra</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="Techniques-Used-for-Linear-Algebra-1"><span>18.1 Techniques Used for Linear Algebra<a class="copiable-link" href="#Techniques-Used-for-Linear-Algebra-1"> &para;</a></span></h3>
<a class="index-entry-id" id="index-linear-algebra_002c-techniques"></a>

<p>Octave includes a polymorphic solver that selects an appropriate matrix
factorization depending on the properties of the matrix itself.
Generally, the cost of determining the matrix type is small relative to
the cost of factorizing the matrix itself.  In any case the matrix type
is cached once it is calculated so that it is not re-determined each
time it is used in a linear equation.
</p>
<p>The selection tree for how the linear equation is solved or a matrix
inverse is formed is given by:
</p>
<ol class="enumerate">
<li> If the matrix is upper or lower triangular sparse use a forward or
backward substitution using the <small class="sc">LAPACK</small> xTRTRS function, and goto 4.


</li><li> If the matrix is square, Hermitian with a real positive diagonal,
attempt Cholesky&nbsp;factorization using the <small class="sc">LAPACK</small> xPOTRF function.

</li><li> If the Cholesky&nbsp;factorization failed or the matrix is not
Hermitian with a real positive diagonal, and the matrix is square, factorize
using the <small class="sc">LAPACK</small> xGETRF function.

</li><li> If the matrix is not square, or any of the previous solvers flags
a singular or near singular matrix, find a least squares solution using
the <small class="sc">LAPACK</small> xGELSD function.
</li></ol>

<p>The user can force the type of the matrix with the <code class="code">matrix_type</code>
function.  This overcomes the cost of discovering the type of the matrix.
However, it should be noted that identifying the type of the matrix incorrectly
will lead to unpredictable results, and so <code class="code">matrix_type</code> should be
used with care.
</p>
<p>It should be noted that the test for whether a matrix is a candidate for
Cholesky&nbsp;factorization, performed above, and by the <code class="code">matrix_type</code>
function, does not make certain that the matrix is
Hermitian.  However, the attempt to factorize the matrix will quickly
detect a non-Hermitian matrix.
</p>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Basic-Matrix-Functions.html">Basic Matrix Functions</a>, Up: <a href="Linear-Algebra.html">Linear Algebra</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>