Mercurial > octave-antonio
comparison scripts/deprecated/luinc.m @ 19148:e278c939a419
Deprecate luinc.
* NEWS: Announce deprecation
* luinc.cc (F__luinc__): Rename luinc to internal function __luinc__.
* scripts/deprecated/luinc.m: New m-file to issue deprecation warning.
* scripts/deprecated/module.mk: Add luinc.m to build system.
* sparse.txi: Remove function from manual.
* pcg.m: Replace luinc example in docstring with ilu.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 22 Sep 2014 20:19:01 -0700 |
parents | |
children | 71da5cce37d6 |
comparison
equal
deleted
inserted
replaced
19147:8b2a919d24bc | 19148:e278c939a419 |
---|---|
1 ## Copyright (C) 2014 John W. Eaton | |
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 | |
19 ## @deftypefn {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, '0') | |
20 ## @deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, @var{droptol}) | |
21 ## @deftypefnx {Built-in Function} {[@var{L}, @var{U}, @var{P}, @var{Q}] =} luinc (@var{A}, @var{opts}) | |
22 ## | |
23 ## @code{luinc} is deprecated and will be removed in Octave version 4.6. | |
24 ## Please use @code{ilu} or @code{ichol} in all new code. | |
25 ## | |
26 ## Produce the incomplete LU@tie{}factorization of the sparse matrix @var{A}. | |
27 ## Two types of incomplete factorization are possible, and the type | |
28 ## is determined by the second argument to @code{luinc}. | |
29 ## | |
30 ## Called with a second argument of @qcode{'0'}, the zero-level incomplete | |
31 ## LU@tie{}factorization is produced. This creates a factorization of @var{A} | |
32 ## where the position of the nonzero arguments correspond to the same | |
33 ## positions as in the matrix @var{A}. | |
34 ## | |
35 ## Alternatively, the fill-in of the incomplete LU@tie{}factorization can | |
36 ## be controlled through the variable @var{droptol} or the structure | |
37 ## @var{opts}. The @sc{umfpack} multifrontal factorization code by Tim A. | |
38 ## Davis is used for the incomplete LU@tie{}factorization, (availability | |
39 ## @url{http://www.cise.ufl.edu/research/sparse/umfpack/}) | |
40 ## | |
41 ## @var{droptol} determines the values below which the values in the | |
42 ## LU@tie{} factorization are dropped and replaced by zero. It must be a | |
43 ## positive scalar, and any values in the factorization whose absolute value | |
44 ## are less than this value are dropped, expect if leaving them increase the | |
45 ## sparsity of the matrix. Setting @var{droptol} to zero results in a complete | |
46 ## LU@tie{}factorization which is the default. | |
47 ## | |
48 ## @var{opts} is a structure containing one or more of the fields | |
49 ## | |
50 ## @table @code | |
51 ## @item droptol | |
52 ## The drop tolerance as above. If @var{opts} only contains @code{droptol} | |
53 ## then this is equivalent to using the variable @var{droptol}. | |
54 ## | |
55 ## @item milu | |
56 ## A logical variable flagging whether to use the modified incomplete | |
57 ## LU@tie{} factorization. In the case that @code{milu} is true, the dropped | |
58 ## values are subtracted from the diagonal of the matrix @var{U} of the | |
59 ## factorization. The default is @code{false}. | |
60 ## | |
61 ## @item udiag | |
62 ## A logical variable that flags whether zero elements on the diagonal of | |
63 ## @var{U} should be replaced with @var{droptol} to attempt to avoid singular | |
64 ## factors. The default is @code{false}. | |
65 ## | |
66 ## @item thresh | |
67 ## Defines the pivot threshold in the interval [0,1]. Values outside that | |
68 ## range are ignored. | |
69 ## @end table | |
70 ## | |
71 ## All other fields in @var{opts} are ignored. The outputs from @code{luinc} | |
72 ## are the same as for @code{lu}. | |
73 ## | |
74 ## Given the string argument @qcode{\"vector\"}, @code{luinc} returns the | |
75 ## values of @var{p} @var{q} as vector values. | |
76 ## @seealso{ilu, ichol, lu, sparse} | |
77 ## @end deftypefn | |
78 | |
79 ## Deprecated in version 4.2 | |
80 | |
81 function retval = usage (varargin) | |
82 | |
83 persistent warned = false; | |
84 if (! warned) | |
85 warned = true; | |
86 warning ("Octave:deprecated-function", | |
87 "luinc is obsolete and will be removed from a future version of Octave, please use ilu or ichol instead"); | |
88 endif | |
89 | |
90 retval = __luinc__ (varargin{:}); | |
91 | |
92 endfunction | |
93 |