annotate scripts/deprecated/luinc.m @ 20516:fb6fe9b45c41

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