Mercurial > hg > octave-terminal
changeset 11396:7b563cf94d8d
Remove documentation on deprecated function dispatch
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 19 Dec 2010 20:27:17 -0800 |
parents | 0754a4e271f4 |
children | 57868a21170e |
files | doc/ChangeLog doc/interpreter/func.txi doc/interpreter/sparse.txi |
diffstat | 3 files changed, 22 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2010-12-19 Rik <octave@nomad.inbox5.com> + + * interpreter/func.txi, interpreter/sparse.txi: Remove documentation + on deprecated function dispatch. + 2010-12-19 Rik <octave@nomad.inbox5.com> * interpreter/Makefile.am: Update mk_undocumented_list target to use
--- a/doc/interpreter/func.txi +++ b/doc/interpreter/func.txi @@ -782,31 +782,13 @@ @node Overloading and Autoloading @subsection Overloading and Autoloading -The @code{dispatch} function can be used to alias one function name to -another. It can be used to alias all calls to a particular function name -to another function, or the alias can be limited to only a particular -variable type. Consider the example, - -@example -@group -function y = spsin (x) - printf ("Calling spsin\n"); - fflush(stdout); - y = spfun ("sin", x); -endfunction - -dispatch ("sin", "spsin", "sparse matrix"); -y0 = sin(eye(3)); -y1 = sin(speye(3)); -@end group -@end example - -@noindent -which aliases the user-defined function @code{spsin} to @code{sin}, but only for -real sparse matrices. Note that the builtin @code{sin} already correctly treats -sparse matrices and so this example is only illustrative. - -@DOCSTRING(dispatch) +Functions can be overloaded to work with different input arguments. For +example, the operator '+' has been overloaded in Octave to work with single, +double, uint8, int32, and many other arguments. The preferred way to overload +functions is through classes and object oriented programming +(@pxref{Function Overloading}). Occasionally, however, one needs to undo +user overloading and call the default function associated with a specific +type. The @code{builtin} function exists for this purpose. @DOCSTRING(builtin) @@ -930,7 +912,7 @@ @ref{Object Oriented Programming}. @item Legacy Dispatch -An overloaded function as defined by @xref{doc-dispatch}. +An overloaded function as defined by @code{dispatch}. @item Command-line Function A function that has been defined on the command-line.
--- a/doc/interpreter/sparse.txi +++ b/doc/interpreter/sparse.txi @@ -451,21 +451,16 @@ @node Sparse Functions @subsubsection Sparse Functions -An important consideration in the use of the sparse functions of -Octave is that many of the internal functions of Octave, such as -@dfn{diag}, cannot accept sparse matrices as an input. The sparse -implementation in Octave therefore uses the @dfn{dispatch} -function to overload the normal Octave functions with equivalent -functions that work with sparse matrices. However, at any time the -sparse matrix specific version of the function can be used by -explicitly calling its function name. +Many Octave functions have been overloaded to work with either sparse or full +matrices. There is no difference in calling convention when using an +overloaded function with a sparse matrix, however, there is also no access to +potentially sparse-specific features. At any time the sparse matrix specific +version of a function can be used by explicitly calling its function name. -The table below lists all of the sparse functions of Octave. Note that -the names of the -specific sparse forms of the functions are typically the same as -the general versions with a @dfn{sp} prefix. In the table below, and the -rest of this article the specific sparse versions of the functions are -used. +The table below lists all of the sparse functions of Octave. Note that the +names of the specific sparse forms of the functions are typically the same as +the general versions with a @dfn{sp} prefix. In the table below, and in the +rest of this article, the specific sparse versions of functions are used. @c Table includes in comments the missing sparse functions