Mercurial > octave
diff libinterp/corefcn/lsode.cc @ 21966:112b20240c87
move docstrings in C++ files out of C strings and into comments
* __contourc__.cc, __dispatch__.cc, __dsearchn__.cc, __ichol__.cc,
__ilu__.cc, __lin_interpn__.cc, __luinc__.cc, __magick_read__.cc,
__pchip_deriv__.cc, __qp__.cc, balance.cc, besselj.cc, betainc.cc,
bitfcns.cc, bsxfun.cc, cellfun.cc, colloc.cc, conv2.cc, daspk.cc,
dasrt.cc, dassl.cc, data.cc, debug.cc, defaults.cc, det.cc, dirfns.cc,
dlmread.cc, dot.cc, eig.cc, ellipj.cc, error.cc, fft.cc, fft2.cc,
fftn.cc, file-io.cc, filter.cc, find.cc, gammainc.cc, gcd.cc,
getgrent.cc, getpwent.cc, getrusage.cc, givens.cc, graphics.cc,
hash.cc, help.cc, hess.cc, hex2num.cc, input.cc, inv.cc, kron.cc,
load-path.cc, load-save.cc, lookup.cc, ls-oct-text.cc, lsode.cc,
lu.cc, mappers.cc, matrix_type.cc, max.cc, mgorth.cc, nproc.cc,
oct-hist.cc, octave-link.cc, ordschur.cc, pager.cc, pinv.cc,
pr-output.cc, profiler.cc, psi.cc, pt-jit.cc, quad.cc, quadcc.cc,
qz.cc, rand.cc, rcond.cc, regexp.cc, schur.cc, sighandlers.cc,
sparse.cc, spparms.cc, sqrtm.cc, str2double.cc, strfind.cc, strfns.cc,
sub2ind.cc, svd.cc, sylvester.cc, symtab.cc, syscalls.cc, sysdep.cc,
time.cc, toplev.cc, tril.cc, tsearch.cc, typecast.cc, urlwrite.cc,
utils.cc, variables.cc, __delaunayn__.cc, __eigs__.cc,
__fltk_uigetfile__.cc, __glpk__.cc, __init_fltk__.cc,
__init_gnuplot__.cc, __osmesa_print__.cc, __voronoi__.cc, amd.cc,
audiodevinfo.cc, audioread.cc, ccolamd.cc, chol.cc, colamd.cc,
convhulln.cc, dmperm.cc, fftw.cc, qr.cc, symbfact.cc, symrcm.cc,
ov-base.cc, ov-bool-mat.cc, ov-cell.cc, ov-class.cc, ov-classdef.cc,
ov-fcn-handle.cc, ov-fcn-inline.cc, ov-flt-re-mat.cc, ov-int16.cc,
ov-int32.cc, ov-int64.cc, ov-int8.cc, ov-java.cc, ov-null-mat.cc,
ov-oncleanup.cc, ov-range.cc, ov-re-mat.cc, ov-struct.cc,
ov-typeinfo.cc, ov-uint16.cc, ov-uint32.cc, ov-uint64.cc, ov-uint8.cc,
ov-usr-fcn.cc, ov.cc, octave.cc, pt-arg-list.cc, pt-binop.cc,
pt-eval.cc, pt-mat.cc, lex.ll, oct-parse.in.yy:
Docstrings are now comments instead of C strings.
* build-aux/mk-opts.pl: Emit docstrings as comments instead of C
strings.
* DASPK-opts.in, LSODE-opts.in: Don't quote " in docstring fragments.
* builtins.h: Include builtin-defun-decls.h unconditionally.
* defun.h (DEFUN, DEFUNX, DEFCONSTFUN): Simply emit declaration.
(DEFALIAS): Always expand to nothing.
* defun-dld.h: No special macro expansions for MAKE_BUILTINS.
(DEFUN_DLD): Use FORWARD_DECLARE_FUN.
(DEFUNX_DLD): Use FORWARD_DECLARE_FUNX.
* defun-int.h: No special macro expansions for MAKE_BUILTINS.
(FORWARD_DECLARE_FUN, FORWARD_DECLARE_FUNX): New macros.
(DEFINE_FUN_INSTALLER_FUN): If compiling an Octave source file, pass
"external-doc" to DEFINE_FUNX_INSTALLER_FUN.
(DEFUN_INTERNAL, DEFCONSTFUN_INTERNAL, DEFUNX_INTERNAL,
DEFALIAS_INTERNAL): Delete.
* common.mk (move_if_change_rule): New macro.
(simple_move_if_change_rule): Define using move_if_change_rule.
* find-defun-files.sh (DEFUN_PATTERN): Update. Don't transform file
name extension to ".df".
* libinterp/mk-pkg-add, gendoc.pl: Operate directly on source files.
* mkbuiltins: New argument, SRCDIR. Operate directly on source files.
* mkdefs: Delete.
* libinterp/module.mk (BUILT_SOURCES): Update list to contain only
files included in other source files.
(GENERATED_MAKE_BUILTINS_INCS, DEF_FILES): Delete.
(LIBINTERP_BUILT_DISTFILES): Include $(OPT_HANDLERS) here.
(LIBINTERP_BUILT_NODISTFILES): Not here. Remove $(ALL_DEF_FILES from
the list.
(libinterp_EXTRA_DIST): Remove mkdefs from the list.
(FOUND_DEFUN_FILES): Rename from SRC_DEF_FILES.
(DLDFCN_DEFUN_FILES): Rename from DLDFCN_DEF_FILES.
(SRC_DEFUN_FILES): Rename from SRC_DEF_FILES.
(ALL_DEFUN_FILES): Rename from ALL_DEF_FILES.
(%.df: %.cc): Delete pattern rule.
(libinterp/build-env-features.cc, libinterp/builtins.cc,
libinterp/dldfcn/PKG_ADD): Use mv instead of move-if-change.
(libinterp/builtins.cc, libinterp/builtin-defun-decls.h):
Update mkbuiltins command.
($(srcdir)/libinterp/DOCSTRINGS): Update gendoc.pl command.
* liboctave/module.mk (BUILT_SOURCES): Don't include
liboctave-build-info.cc in the list.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 21 Jun 2016 16:07:51 -0400 |
parents | 0806871e3e1e |
children | bac0d6f07a3e |
line wrap: on
line diff
--- a/libinterp/corefcn/lsode.cc Tue Jun 21 13:08:25 2016 -0700 +++ b/libinterp/corefcn/lsode.cc Tue Jun 21 16:07:51 2016 -0400 @@ -140,122 +140,122 @@ } DEFUN (lsode, args, nargout, - "-*- texinfo -*-\n\ -@deftypefn {} {[@var{x}, @var{istate}, @var{msg}] =} lsode (@var{fcn}, @var{x_0}, @var{t})\n\ -@deftypefnx {} {[@var{x}, @var{istate}, @var{msg}] =} lsode (@var{fcn}, @var{x_0}, @var{t}, @var{t_crit})\n\ -Ordinary Differential Equation (ODE) solver.\n\ -\n\ -The set of differential equations to solve is\n\ -@tex\n\ -$$ {dx \\over dt} = f (x, t) $$\n\ -with\n\ -$$ x(t_0) = x_0 $$\n\ -@end tex\n\ -@ifnottex\n\ -\n\ -@example\n\ -@group\n\ -dx\n\ --- = f (x, t)\n\ -dt\n\ -@end group\n\ -@end example\n\ -\n\ -@noindent\n\ -with\n\ -\n\ -@example\n\ -x(t_0) = x_0\n\ -@end example\n\ -\n\ -@end ifnottex\n\ -The solution is returned in the matrix @var{x}, with each row\n\ -corresponding to an element of the vector @var{t}. The first element\n\ -of @var{t} should be @math{t_0} and should correspond to the initial\n\ -state of the system @var{x_0}, so that the first row of the output\n\ -is @var{x_0}.\n\ -\n\ -The first argument, @var{fcn}, is a string, inline, or function handle\n\ -that names the function @math{f} to call to compute the vector of right\n\ -hand sides for the set of equations. The function must have the form\n\ -\n\ -@example\n\ -@var{xdot} = f (@var{x}, @var{t})\n\ -@end example\n\ -\n\ -@noindent\n\ -in which @var{xdot} and @var{x} are vectors and @var{t} is a scalar.\n\ -\n\ -If @var{fcn} is a two-element string array or a two-element cell array\n\ -of strings, inline functions, or function handles, the first element names\n\ -the function @math{f} described above, and the second element names a\n\ -function to compute the Jacobian of @math{f}. The Jacobian function\n\ -must have the form\n\ -\n\ -@example\n\ -@var{jac} = j (@var{x}, @var{t})\n\ -@end example\n\ -\n\ -@noindent\n\ -in which @var{jac} is the matrix of partial derivatives\n\ -@tex\n\ -$$ J = {\\partial f_i \\over \\partial x_j} = \\left[\\matrix{\n\ -{\\partial f_1 \\over \\partial x_1}\n\ - & {\\partial f_1 \\over \\partial x_2}\n\ - & \\cdots\n\ - & {\\partial f_1 \\over \\partial x_N} \\cr\n\ -{\\partial f_2 \\over \\partial x_1}\n\ - & {\\partial f_2 \\over \\partial x_2}\n\ - & \\cdots\n\ - & {\\partial f_2 \\over \\partial x_N} \\cr\n\ - \\vdots & \\vdots & \\ddots & \\vdots \\cr\n\ -{\\partial f_3 \\over \\partial x_1}\n\ - & {\\partial f_3 \\over \\partial x_2}\n\ - & \\cdots\n\ - & {\\partial f_3 \\over \\partial x_N} \\cr}\\right]$$\n\ -@end tex\n\ -@ifnottex\n\ -\n\ -@example\n\ -@group\n\ - | df_1 df_1 df_1 |\n\ - | ---- ---- ... ---- |\n\ - | dx_1 dx_2 dx_N |\n\ - | |\n\ - | df_2 df_2 df_2 |\n\ - | ---- ---- ... ---- |\n\ - df_i | dx_1 dx_2 dx_N |\n\ -jac = ---- = | |\n\ - dx_j | . . . . |\n\ - | . . . . |\n\ - | . . . . |\n\ - | |\n\ - | df_N df_N df_N |\n\ - | ---- ---- ... ---- |\n\ - | dx_1 dx_2 dx_N |\n\ -@end group\n\ -@end example\n\ -\n\ -@end ifnottex\n\ -\n\ -The second and third arguments specify the initial state of the system,\n\ -@math{x_0}, and the initial value of the independent variable @math{t_0}.\n\ -\n\ -The fourth argument is optional, and may be used to specify a set of\n\ -times that the ODE solver should not integrate past. It is useful for\n\ -avoiding difficulties with singularities and points where there is a\n\ -discontinuity in the derivative.\n\ -\n\ -After a successful computation, the value of @var{istate} will be 2\n\ -(consistent with the Fortran version of @sc{lsode}).\n\ -\n\ -If the computation is not successful, @var{istate} will be something\n\ -other than 2 and @var{msg} will contain additional information.\n\ -\n\ -You can use the function @code{lsode_options} to set optional\n\ -parameters for @code{lsode}.\n\ -@seealso{daspk, dassl, dasrt}\n\ -@end deftypefn") + doc: /* -*- texinfo -*- +@deftypefn {} {[@var{x}, @var{istate}, @var{msg}] =} lsode (@var{fcn}, @var{x_0}, @var{t}) +@deftypefnx {} {[@var{x}, @var{istate}, @var{msg}] =} lsode (@var{fcn}, @var{x_0}, @var{t}, @var{t_crit}) +Ordinary Differential Equation (ODE) solver. + +The set of differential equations to solve is +@tex +$$ {dx \over dt} = f (x, t) $$ +with +$$ x(t_0) = x_0 $$ +@end tex +@ifnottex + +@example +@group +dx +-- = f (x, t) +dt +@end group +@end example + +@noindent +with + +@example +x(t_0) = x_0 +@end example + +@end ifnottex +The solution is returned in the matrix @var{x}, with each row +corresponding to an element of the vector @var{t}. The first element +of @var{t} should be @math{t_0} and should correspond to the initial +state of the system @var{x_0}, so that the first row of the output +is @var{x_0}. + +The first argument, @var{fcn}, is a string, inline, or function handle +that names the function @math{f} to call to compute the vector of right +hand sides for the set of equations. The function must have the form + +@example +@var{xdot} = f (@var{x}, @var{t}) +@end example + +@noindent +in which @var{xdot} and @var{x} are vectors and @var{t} is a scalar. + +If @var{fcn} is a two-element string array or a two-element cell array +of strings, inline functions, or function handles, the first element names +the function @math{f} described above, and the second element names a +function to compute the Jacobian of @math{f}. The Jacobian function +must have the form + +@example +@var{jac} = j (@var{x}, @var{t}) +@end example + +@noindent +in which @var{jac} is the matrix of partial derivatives +@tex +$$ J = {\partial f_i \over \partial x_j} = \left[\matrix{ +{\partial f_1 \over \partial x_1} + & {\partial f_1 \over \partial x_2} + & \cdots + & {\partial f_1 \over \partial x_N} \cr +{\partial f_2 \over \partial x_1} + & {\partial f_2 \over \partial x_2} + & \cdots + & {\partial f_2 \over \partial x_N} \cr + \vdots & \vdots & \ddots & \vdots \cr +{\partial f_3 \over \partial x_1} + & {\partial f_3 \over \partial x_2} + & \cdots + & {\partial f_3 \over \partial x_N} \cr}\right]$$ +@end tex +@ifnottex + +@example +@group + | df_1 df_1 df_1 | + | ---- ---- ... ---- | + | dx_1 dx_2 dx_N | + | | + | df_2 df_2 df_2 | + | ---- ---- ... ---- | + df_i | dx_1 dx_2 dx_N | +jac = ---- = | | + dx_j | . . . . | + | . . . . | + | . . . . | + | | + | df_N df_N df_N | + | ---- ---- ... ---- | + | dx_1 dx_2 dx_N | +@end group +@end example + +@end ifnottex + +The second and third arguments specify the initial state of the system, +@math{x_0}, and the initial value of the independent variable @math{t_0}. + +The fourth argument is optional, and may be used to specify a set of +times that the ODE solver should not integrate past. It is useful for +avoiding difficulties with singularities and points where there is a +discontinuity in the derivative. + +After a successful computation, the value of @var{istate} will be 2 +(consistent with the Fortran version of @sc{lsode}). + +If the computation is not successful, @var{istate} will be something +other than 2 and @var{msg} will contain additional information. + +You can use the function @code{lsode_options} to set optional +parameters for @code{lsode}. +@seealso{daspk, dassl, dasrt} +@end deftypefn */) { int nargin = args.length ();