diff scripts/sparse/pcr.m @ 20164:df437a52bcaf stable

doc: Update more docstrings to have one sentence summary as first line. Reviewed miscellaneous, sparse, strings in scripts directory. * scripts/miscellaneous/bzip2.m, scripts/miscellaneous/citation.m, scripts/miscellaneous/compare_versions.m, scripts/miscellaneous/computer.m, scripts/miscellaneous/debug.m, scripts/miscellaneous/dir.m, scripts/miscellaneous/edit.m, scripts/miscellaneous/error_ids.m, scripts/miscellaneous/fileattrib.m, scripts/miscellaneous/fullfile.m, scripts/miscellaneous/genvarname.m, scripts/miscellaneous/gzip.m, scripts/miscellaneous/mkoctfile.m, scripts/miscellaneous/news.m, scripts/miscellaneous/open.m, scripts/miscellaneous/parseparams.m, scripts/miscellaneous/recycle.m, scripts/miscellaneous/run.m, scripts/miscellaneous/swapbytes.m, scripts/miscellaneous/tar.m, scripts/miscellaneous/tmpnam.m, scripts/miscellaneous/unpack.m, scripts/miscellaneous/what.m, scripts/sparse/bicg.m, scripts/sparse/bicgstab.m, scripts/sparse/cgs.m, scripts/sparse/colperm.m, scripts/sparse/eigs.m, scripts/sparse/etreeplot.m, scripts/sparse/gmres.m, scripts/sparse/gplot.m, scripts/sparse/ichol.m, scripts/sparse/ilu.m, scripts/sparse/pcg.m, scripts/sparse/pcr.m, scripts/sparse/qmr.m, scripts/sparse/spaugment.m, scripts/sparse/spconvert.m, scripts/sparse/spdiags.m, scripts/sparse/spfun.m, scripts/sparse/spones.m, scripts/sparse/sprandsym.m, scripts/sparse/spstats.m, scripts/sparse/spy.m, scripts/sparse/svds.m, scripts/sparse/treelayout.m, scripts/sparse/treeplot.m, scripts/strings/base2dec.m, scripts/strings/bin2dec.m, scripts/strings/blanks.m, scripts/strings/cstrcat.m, scripts/strings/deblank.m, scripts/strings/dec2base.m, scripts/strings/dec2bin.m, scripts/strings/dec2hex.m, scripts/strings/findstr.m, scripts/strings/hex2dec.m, scripts/strings/index.m, scripts/strings/isletter.m, scripts/strings/isstrprop.m, scripts/strings/mat2str.m, scripts/strings/ostrsplit.m, scripts/strings/regexptranslate.m, scripts/strings/rindex.m, scripts/strings/str2num.m, scripts/strings/strcat.m, scripts/strings/strchr.m, scripts/strings/strjoin.m, scripts/strings/strjust.m, scripts/strings/strmatch.m, scripts/strings/strsplit.m, scripts/strings/strtok.m, scripts/strings/strtrim.m, scripts/strings/strtrunc.m, scripts/strings/substr.m, scripts/strings/untabify.m, scripts/time/datenum.m: Update more docstrings to have one sentence summary as first line.
author Rik <rik@octave.org>
date Mon, 04 May 2015 14:22:02 -0700
parents 4197fc428c7d
children
line wrap: on
line diff
--- a/scripts/sparse/pcr.m	Sun May 03 21:52:42 2015 -0700
+++ b/scripts/sparse/pcr.m	Mon May 04 14:22:02 2015 -0700
@@ -20,18 +20,19 @@
 ## @deftypefn  {Function File} {@var{x} =} pcr (@var{A}, @var{b}, @var{tol}, @var{maxit}, @var{m}, @var{x0}, @dots{})
 ## @deftypefnx {Function File} {[@var{x}, @var{flag}, @var{relres}, @var{iter}, @var{resvec}] =} pcr (@dots{})
 ##
-## Solve the linear system of equations @code{@var{A} * @var{x} = @var{b}}
-## by means of the Preconditioned Conjugate Residuals iterative
-## method.  The input arguments are
+## Solve the linear system of equations @code{@var{A} * @var{x} = @var{b}} by
+## means of the Preconditioned Conjugate Residuals iterative method.
+##
+## The input arguments are
 ##
 ## @itemize
 ## @item
-## @var{A} can be either a square (preferably sparse) matrix or a
-## function handle, inline function or string containing the name
-## of a function which computes @code{@var{A} * @var{x}}.  In principle
-## @var{A} should be symmetric and non-singular; if @code{pcr}
-## finds @var{A} to be numerically singular, you will get a warning
-## message and the @var{flag} output parameter will be set.
+## @var{A} can be either a square (preferably sparse) matrix or a function
+## handle, inline function or string containing the name of a function which
+## computes @code{@var{A} * @var{x}}.  In principle @var{A} should be
+## symmetric and non-singular; if @code{pcr} finds @var{A} to be numerically
+## singular, you will get a warning message and the @var{flag} output
+## parameter will be set.
 ##
 ## @item
 ## @var{b} is the right hand side vector.
@@ -45,30 +46,32 @@
 ## @code{@var{tol} = 1e-6} by default.
 ##
 ## @item
-## @var{maxit} is the maximum allowable number of iterations; if
-## @code{[]} is supplied for @code{maxit}, or @code{pcr} has less
-## arguments, a default value equal to 20 is used.
+## @var{maxit} is the maximum allowable number of iterations; if @code{[]} is
+## supplied for @code{maxit}, or @code{pcr} has less arguments, a default
+## value equal to 20 is used.
 ##
 ## @item
 ## @var{m} is the (left) preconditioning matrix, so that the iteration is
-## (theoretically) equivalent to solving by @code{pcr} @code{@var{P} *
-## @var{x} = @var{m} \ @var{b}}, with @code{@var{P} = @var{m} \ @var{A}}.
-## Note that a proper choice of the preconditioner may dramatically
-## improve the overall performance of the method.  Instead of matrix
-## @var{m}, the user may pass a function which returns the results of
-## applying the inverse of @var{m} to a vector (usually this is the
-## preferred way of using the preconditioner).  If @code{[]} is supplied
-## for @var{m}, or @var{m} is omitted, no preconditioning is applied.
+## (theoretically) equivalent to solving by
+## @code{pcr} @code{@var{P} * @var{x} = @var{m} \ @var{b}}, with
+## @code{@var{P} = @var{m} \ @var{A}}.  Note that a proper choice of the
+## preconditioner may dramatically improve the overall performance of the
+## method.  Instead of matrix @var{m}, the user may pass a function which
+## returns the results of applying the inverse of @var{m} to a vector
+## (usually this is the preferred way of using the preconditioner).  If
+## @code{[]} is supplied for @var{m}, or @var{m} is omitted, no
+## preconditioning is applied.
 ##
 ## @item
 ## @var{x0} is the initial guess.  If @var{x0} is empty or omitted, the
 ## function sets @var{x0} to a zero vector by default.
 ## @end itemize
 ##
-## The arguments which follow @var{x0} are treated as parameters, and
-## passed in a proper way to any of the functions (@var{A} or @var{m})
-## which are passed to @code{pcr}.  See the examples below for further
-## details.  The output arguments are
+## The arguments which follow @var{x0} are treated as parameters, and passed
+## in a proper way to any of the functions (@var{A} or @var{m}) which are
+## passed to @code{pcr}.  See the examples below for further details.
+##
+## The output arguments are
 ##
 ## @itemize
 ## @item
@@ -76,11 +79,11 @@
 ## @code{@var{A} * @var{x} = @var{b}}.
 ##
 ## @item
-## @var{flag} reports on the convergence.  @code{@var{flag} = 0} means
-## the solution converged and the tolerance criterion given by @var{tol}
-## is satisfied.  @code{@var{flag} = 1} means that the @var{maxit} limit
-## for the iteration count was reached.  @code{@var{flag} = 3} reports t
-## @code{pcr} breakdown, see [1] for details.
+## @var{flag} reports on the convergence.  @code{@var{flag} = 0} means the
+## solution converged and the tolerance criterion given by @var{tol} is
+## satisfied.  @code{@var{flag} = 1} means that the @var{maxit} limit for the
+## iteration count was reached.  @code{@var{flag} = 3} reports a @code{pcr}
+## breakdown, see [1] for details.
 ##
 ## @item
 ## @var{relres} is the ratio of the final residual to its initial value,
@@ -90,10 +93,9 @@
 ## @var{iter} is the actual number of iterations performed.
 ##
 ## @item
-## @var{resvec} describes the convergence history of the method,
-## so that @code{@var{resvec} (i)} contains the Euclidean norms of the
-## residual after the (@var{i}-1)-th iteration, @code{@var{i} =
-## 1,2, @dots{}, @var{iter}+1}.
+## @var{resvec} describes the convergence history of the method, so that
+## @code{@var{resvec} (i)} contains the Euclidean norms of the residual after
+## the (@var{i}-1)-th iteration, @code{@var{i} = 1,2, @dots{}, @var{iter}+1}.
 ## @end itemize
 ##
 ## Let us consider a trivial problem with a diagonal matrix (we exploit the