comparison src/DLD-FUNCTIONS/lu.cc @ 9064:7c02ec148a3c

Check grammar on all .cc files Same check as previously done on .m files Attempt to enforce some conformity in documentation text for rules such as two spaces after a period, commas around latin abbreviations, etc.
author Rik <rdrider0-list@yahoo.com>
date Sat, 28 Mar 2009 13:57:22 -0700
parents 3ecbc236e2e0
children 8207b833557f
comparison
equal deleted inserted replaced
9063:a6cf0ad87eee 9064:7c02ec148a3c
70 @deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{p}, @var{q}, @var{r}] =} lu (@var{s})\n\ 70 @deftypefnx {Loadable Function} {[@var{l}, @var{u}, @var{p}, @var{q}, @var{r}] =} lu (@var{s})\n\
71 @deftypefnx {Loadable Function} {[@dots{}] =} lu (@var{s}, @var{thres})\n\ 71 @deftypefnx {Loadable Function} {[@dots{}] =} lu (@var{s}, @var{thres})\n\
72 @deftypefnx {Loadable Function} {@var{y} =} lu (@dots{})\n\ 72 @deftypefnx {Loadable Function} {@var{y} =} lu (@dots{})\n\
73 @deftypefnx {Loadable Function} {[@dots{}] =} lu (@dots{}, 'vector')\n\ 73 @deftypefnx {Loadable Function} {[@dots{}] =} lu (@dots{}, 'vector')\n\
74 @cindex LU decomposition\n\ 74 @cindex LU decomposition\n\
75 Compute the LU decomposition of @var{a}. If @var{a} is full subroutines from\n\ 75 Compute the LU decomposition of @var{a}. If @var{a} is full subroutines from\n\
76 @sc{Lapack} are used and if @var{a} is sparse then UMFPACK is used. The\n\ 76 @sc{Lapack} are used and if @var{a} is sparse then UMFPACK is used. The\n\
77 result is returned in a permuted form, according to the optional return\n\ 77 result is returned in a permuted form, according to the optional return\n\
78 value @var{p}. For example, given the matrix @code{a = [1, 2; 3, 4]},\n\ 78 value @var{p}. For example, given the matrix @code{a = [1, 2; 3, 4]},\n\
79 \n\ 79 \n\
80 @example\n\ 80 @example\n\
83 \n\ 83 \n\
84 @noindent\n\ 84 @noindent\n\
85 returns\n\ 85 returns\n\
86 \n\ 86 \n\
87 @example\n\ 87 @example\n\
88 @group\n\
88 l =\n\ 89 l =\n\
89 \n\ 90 \n\
90 1.00000 0.00000\n\ 91 1.00000 0.00000\n\
91 0.33333 1.00000\n\ 92 0.33333 1.00000\n\
92 \n\ 93 \n\
97 \n\ 98 \n\
98 p =\n\ 99 p =\n\
99 \n\ 100 \n\
100 0 1\n\ 101 0 1\n\
101 1 0\n\ 102 1 0\n\
103 @end group\n\
102 @end example\n\ 104 @end example\n\
103 \n\ 105 \n\
104 The matrix is not required to be square.\n\ 106 The matrix is not required to be square.\n\
105 \n\ 107 \n\
106 Called with two or three output arguments and a spare input matrix,\n\ 108 Called with two or three output arguments and a spare input matrix,\n\
107 then @dfn{lu} does not attempt to perform sparsity preserving column\n\ 109 then @dfn{lu} does not attempt to perform sparsity preserving column\n\
108 permutations. Called with a fourth output argument, the sparsity\n\ 110 permutations. Called with a fourth output argument, the sparsity\n\
109 preserving column transformation @var{Q} is returned, such that\n\ 111 preserving column transformation @var{Q} is returned, such that\n\
110 @code{@var{p} * @var{a} * @var{q} = @var{l} * @var{u}}.\n\ 112 @code{@var{p} * @var{a} * @var{q} = @var{l} * @var{u}}.\n\
111 \n\ 113 \n\
112 Called with a fifth output argument and a sparse input matrix, then\n\ 114 Called with a fifth output argument and a sparse input matrix, then\n\
113 @dfn{lu} attempts to use a scaling factor @var{r} on the input matrix\n\ 115 @dfn{lu} attempts to use a scaling factor @var{r} on the input matrix\n\
114 such that @code{@var{p} * (@var{r} \\ @var{a}) * @var{q} = @var{l} * @var{u}}.\n\ 116 such that @code{@var{p} * (@var{r} \\ @var{a}) * @var{q} = @var{l} * @var{u}}.\n\
115 This typically leads to a sparser and more stable factorsation.\n\ 117 This typically leads to a sparser and more stable factorsation.\n\
116 \n\ 118 \n\
117 An additional input argument @var{thres}, that defines the pivoting\n\ 119 An additional input argument @var{thres}, that defines the pivoting\n\
118 threshold can be given. @var{thres} can be a scalar, in which case\n\ 120 threshold can be given. @var{thres} can be a scalar, in which case\n\
119 it defines UMFPACK pivoting tolerance for both symmetric and unsymmetric\n\ 121 it defines UMFPACK pivoting tolerance for both symmetric and unsymmetric\n\
120 cases. If @var{thres} is a two element vector, then the first element\n\ 122 cases. If @var{thres} is a two element vector, then the first element\n\
121 defines the pivoting tolerance for the unsymmetric UMFPACK pivoting\n\ 123 defines the pivoting tolerance for the unsymmetric UMFPACK pivoting\n\
122 strategy and the second the symmetric strategy. By default, the values\n\ 124 strategy and the second the symmetric strategy. By default, the values\n\
123 defined by @code{spparms} are used and are by default @code{[0.1, 0.001]}.\n\ 125 defined by @code{spparms} are used and are by default @code{[0.1, 0.001]}.\n\
124 \n\ 126 \n\
125 Given the string argument 'vector', @dfn{lu} returns the values of @var{p}\n\ 127 Given the string argument 'vector', @dfn{lu} returns the values of @var{p}\n\
126 @var{q} as vector values, such that for full matrix, @code{@var{a}\n\ 128 @var{q} as vector values, such that for full matrix, @code{@var{a}\n\
127 (@var{p},:) = @var{l} * @var{u}}, and @code{@var{r}(@var{p},:) * @var{a}\n\ 129 (@var{p},:) = @var{l} * @var{u}}, and @code{@var{r}(@var{p},:) * @var{a}\n\
128 (:, @var{q}) = @var{l} * @var{u}}.\n\ 130 (:, @var{q}) = @var{l} * @var{u}}.\n\
129 \n\ 131 \n\
130 With two output arguments, returns the permuted forms of the upper and\n\ 132 With two output arguments, returns the permuted forms of the upper and\n\
131 lower triangular matrices, such that @code{@var{a} = @var{l} * @var{u}}.\n\ 133 lower triangular matrices, such that @code{@var{a} = @var{l} * @var{u}}.\n\
132 With one output argument @var{y}, then the matrix returned by the @sc{Lapack}\n\ 134 With one output argument @var{y}, then the matrix returned by the @sc{Lapack}\n\
133 routines is returned. If the input matrix is sparse then the matrix @var{l}\n\ 135 routines is returned. If the input matrix is sparse then the matrix @var{l}\n\
134 is embedded into @var{u} to give a return value similar to the full case.\n\ 136 is embedded into @var{u} to give a return value similar to the full case.\n\
135 For both full and sparse matrices, @dfn{lu} looses the permutation\n\ 137 For both full and sparse matrices, @dfn{lu} looses the permutation\n\
136 information.\n\ 138 information.\n\
137 @end deftypefn") 139 @end deftypefn")
138 { 140 {