# HG changeset patch # User Rik # Date 1292819237 28800 # Node ID 7b563cf94d8d004a8efad4785c843c4040c75743 # Parent 0754a4e271f407c030bd5f86d4a58fe893b739dc Remove documentation on deprecated function dispatch diff --git a/doc/ChangeLog b/doc/ChangeLog --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2010-12-19 Rik + + * interpreter/func.txi, interpreter/sparse.txi: Remove documentation + on deprecated function dispatch. + 2010-12-19 Rik * interpreter/Makefile.am: Update mk_undocumented_list target to use diff --git a/doc/interpreter/func.txi b/doc/interpreter/func.txi --- 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. diff --git a/doc/interpreter/sparse.txi b/doc/interpreter/sparse.txi --- 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