Mercurial > hg > octave-nkf
annotate scripts/deprecated/luinc.m @ 20720:315b7d51d6c8
randi.m: Display warnings in case of range exceedings.
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Wed, 23 Sep 2015 15:31:34 +0200 |
parents | fb6fe9b45c41 |
children |
rev | line source |
---|---|
19898
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19842
diff
changeset
|
1 ## Copyright (C) 2014-2015 John W. Eaton |
19340 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
20691
fb6fe9b45c41
luinc.m: Add texinfo marker to docstring so it is interpreted correctly.
Rik <rik@octave.org>
parents:
19898
diff
changeset
|
19 ## -*- texinfo -*- |
19340 | 20 ## @deftypefn {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, '0') |
21 ## @deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, @var{droptol}) | |
22 ## @deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, @var{opts}) | |
23 ## | |
19842
ebd27d8c63fd
update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
19794
diff
changeset
|
24 ## @code{luinc} is deprecated and will be removed in Octave version 4.4. |
19340 | 25 ## Please use @code{ilu} or @code{ichol} in all new code. |
26 ## | |
27 ## Produce the incomplete LU@tie{}factorization of the sparse matrix @var{A}. | |
28 ## Two types of incomplete factorization are possible, and the type | |
29 ## is determined by the second argument to @code{luinc}. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
30 ## |
19340 | 31 ## Called with a second argument of @qcode{'0'}, the zero-level incomplete |
32 ## LU@tie{}factorization is produced. This creates a factorization of @var{A} | |
33 ## where the position of the nonzero arguments correspond to the same | |
34 ## positions as in the matrix @var{A}. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
35 ## |
19340 | 36 ## Alternatively, the fill-in of the incomplete LU@tie{}factorization can |
37 ## be controlled through the variable @var{droptol} or the structure | |
38 ## @var{opts}. The @sc{umfpack} multifrontal factorization code by Tim A. | |
39 ## Davis is used for the incomplete LU@tie{}factorization, (availability | |
40 ## @url{http://www.cise.ufl.edu/research/sparse/umfpack/}) | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
41 ## |
19340 | 42 ## @var{droptol} determines the values below which the values in the |
43 ## LU@tie{} factorization are dropped and replaced by zero. It must be a | |
44 ## positive scalar, and any values in the factorization whose absolute value | |
45 ## are less than this value are dropped, expect if leaving them increase the | |
46 ## sparsity of the matrix. Setting @var{droptol} to zero results in a complete | |
47 ## LU@tie{}factorization which is the default. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
48 ## |
19340 | 49 ## @var{opts} is a structure containing one or more of the fields |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
50 ## |
19340 | 51 ## @table @code |
52 ## @item droptol | |
53 ## The drop tolerance as above. If @var{opts} only contains @code{droptol} | |
54 ## then this is equivalent to using the variable @var{droptol}. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
55 ## |
19340 | 56 ## @item milu |
57 ## A logical variable flagging whether to use the modified incomplete | |
58 ## LU@tie{} factorization. In the case that @code{milu} is true, the dropped | |
59 ## values are subtracted from the diagonal of the matrix @var{U} of the | |
60 ## factorization. The default is @code{false}. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
61 ## |
19340 | 62 ## @item udiag |
63 ## A logical variable that flags whether zero elements on the diagonal of | |
64 ## @var{U} should be replaced with @var{droptol} to attempt to avoid singular | |
65 ## factors. The default is @code{false}. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
66 ## |
19340 | 67 ## @item thresh |
68 ## Defines the pivot threshold in the interval [0,1]. Values outside that | |
69 ## range are ignored. | |
70 ## @end table | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
71 ## |
19340 | 72 ## All other fields in @var{opts} are ignored. The outputs from @code{luinc} |
73 ## are the same as for @code{lu}. | |
19794
db92e7e28e1f
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
19355
diff
changeset
|
74 ## |
19340 | 75 ## Given the string argument @qcode{\"vector\"}, @code{luinc} returns the |
76 ## values of @var{p} @var{q} as vector values. | |
77 ## @seealso{ilu, ichol, lu, sparse} | |
78 ## @end deftypefn | |
79 | |
19842
ebd27d8c63fd
update default branch to release as 4.0
John W. Eaton <jwe@octave.org>
parents:
19794
diff
changeset
|
80 ## Deprecated in version 4.0 |
19340 | 81 |
19355
71da5cce37d6
luinc.m: Fix number of output args in deprecation cset e278c939a419.
Rik <rik@octave.org>
parents:
19340
diff
changeset
|
82 function [L, U, P, Q] = luinc (varargin) |
19340 | 83 |
84 persistent warned = false; | |
85 if (! warned) | |
86 warned = true; | |
87 warning ("Octave:deprecated-function", | |
88 "luinc is obsolete and will be removed from a future version of Octave, please use ilu or ichol instead"); | |
89 endif | |
90 | |
19355
71da5cce37d6
luinc.m: Fix number of output args in deprecation cset e278c939a419.
Rik <rik@octave.org>
parents:
19340
diff
changeset
|
91 [L, U, P, Q] = __luinc__ (varargin{:}); |
19340 | 92 |
93 endfunction | |
94 |