Navigation

Operators and Keywords

Function List:

C++ API

data.cc File Reference

#include "systime.h"
#include <cfloat>
#include <string>
#include "lo-ieee.h"
#include "lo-math.h"
#include "str-vec.h"
#include "quit.h"
#include "mx-base.h"
#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "oct-map.h"
#include "oct-obj.h"
#include "ov.h"
#include "ov-float.h"
#include "ov-complex.h"
#include "ov-flt-complex.h"
#include "ov-cx-mat.h"
#include "ov-flt-cx-mat.h"
#include "ov-cx-sparse.h"
#include "parse.h"
#include "pt-mat.h"
#include "utils.h"
#include "variables.h"
#include "pager.h"
#include "xnorm.h"

Include dependency graph for data.cc:


Defines

#define ANY_ALL(FCN)
#define NATIVE_REDUCTION_1(FCN, TYPE, DIM)
#define NATIVE_REDUCTION(FCN, BOOL_FCN)
#define DATA_REDUCTION(FCN)
#define MAKE_INT_BRANCH(X)
#define SINGLE_TYPE_CONCAT(TYPE, EXTRACTOR)
#define DO_SINGLE_TYPE_CONCAT(TYPE, EXTRACTOR)
#define MAKE_INT_BRANCH(X)
#define INSTANTIATE_EYE(T)   template octave_value identity_matrix<T> (int, int)
#define MAKE_INT_BRANCH(X)
#define MAKE_INT_BRANCH(INTX)

Typedefs

typedef double(* d_dd_fcn )(double, double)
typedef float(* f_ff_fcn )(float, float)

Functions

 DEFUN (all, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} all (@var{x}, @var{dim})\n\ The function @code{all} behaves like the function @code{any}, except\n\ that it returns true only if all the elements of a vector, or all the\n\ elements along dimension @var{dim} of a matrix, are nonzero.\n\ @end deftypefn")
 DEFUN (any, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} any (@var{x}, @var{dim})\n\ For a vector argument, return 1 if any element of the vector is\n\ nonzero.\n\ \n\ For a matrix argument, return a row vector of ones and\n\ zeros with each element indicating whether any of the elements of the\n\ corresponding column of the matrix are nonzero. For example,\n\ \n\ @example\n\ @group\n\ any (eye (2, 4))\n\ @result{} [ 1, 1, 0, 0 ]\n\ @end group\n\ @end example\n\ \n\ If the optional argument @var{dim} is supplied, work along dimension\n\ @var{dim}. For example,\n\ \n\ @example\n\ @group\n\ any (eye (2, 4), 2)\n\ @result{} [ 1; 1 ]\n\ @end group\n\ @end example\n\ @end deftypefn")
 DEFUN (atan2, args,,"-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} atan2 (@var{y}, @var{x})\n\ Compute atan (@var{y} / @var{x}) for corresponding elements of @var{y}\n\ and @var{x}. Signal an error if @var{y} and @var{x} do not match in size\n\ and orientation.\n\ @end deftypefn")
 DEFUN (hypot, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} hypot (@var{x}, @var{y})\n\ Compute the element-by-element square root of the sum of the squares of\n\ @var{x} and @var{y}. This is equivalent to\n\ @code{sqrt (@var{x}.^2 + @var{y}.^2)}, but calculated in a manner that\n\ avoids overflows for large values of @var{x} or @var{y}.\n\ @end deftypefn")
template<typename T , typename ET >
void map_2_xlog2 (const Array< T > &x, Array< T > &f, Array< ET > &e)
 DEFUN (log2, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} log2 (@var{x})\n\ @deftypefnx {Mapping Function} {[@var{f}, @var{e}] =} log2 (@var{x})\n\ Compute the base-2 logarithm of each element of @var{x}.\n\ \n\ If called with two output arguments, split @var{x} into\n\ binary mantissa and exponent so that\n\ @tex\n\ ${1 \\over 2} \\le \\left| f \\right| < 1$\n\ @end tex\n\ @ifnottex\n\ @code{1/2 <= abs(f) < 1}\n\ @end ifnottex\n\ and @var{e} is an integer. If\n\ @tex\n\ $x = 0$, $f = e = 0$.\n\ @end tex\n\ @ifnottex\n\ @code{x = 0}, @code{f = e = 0}.\n\ @end ifnottex\n\ @seealso{pow2, log, log10, exp}\n\ @end deftypefn")
 DEFUN (fmod, args,,"-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} fmod (@var{x}, @var{y})\n\ Compute the floating point remainder of dividing @var{x} by @var{y}\n\ using the C library function @code{fmod}. The result has the same\n\ sign as @var{x}. If @var{y} is zero, the result is implementation-dependent.\n\ @seealso{mod, rem}\n\ @end deftypefn")
 DEFUN (cumprod, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} cumprod (@var{x})\n\ @deftypefnx {Built-in Function} {} cumprod (@var{x}, @var{dim})\n\ Cumulative product of elements along dimension @var{dim}. If\n\ @var{dim} is omitted, it defaults to the first non-singleton dimension.\n\ \n\ @seealso{prod, cumsum}\n\ @end deftypefn")
 DEFUN (cumsum, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} cumsum (@var{x})\n\ @deftypefnx {Built-in Function} {} cumsum (@var{x}, @var{dim})\n\ @deftypefnx {Built-in Function} {} cumsum (@dots{}, 'native')\n\ Cumulative sum of elements along dimension @var{dim}. If @var{dim}\n\ is omitted, it defaults to the first non-singleton dimension.\n\ \n\ The \"native\" argument implies the summation is performed in native type.\n\ See @code{sum} for a complete description and example of the use of\n\ \"native\".\n\ @seealso{sum, cumprod}\n\ @end deftypefn")
 DEFUN (diag, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} diag (@var{v}, @var{k})\n\ Return a diagonal matrix with vector @var{v} on diagonal @var{k}. The\n\ second argument is optional. If it is positive, the vector is placed on\n\ the @var{k}-th super-diagonal. If it is negative, it is placed on the\n\ @var{-k}-th sub-diagonal. The default value of @var{k} is 0, and the\n\ vector is placed on the main diagonal. For example,\n\ \n\ @example\n\ @group\n\ diag ([1, 2, 3], 1)\n\ @result{} 0 1 0 0\n\ 0 0 2 0\n\ 0 0 0 3\n\ 0 0 0 0\n\ @end group\n\ @end example\n\ \n\ @noindent\n\ Given a matrix argument, instead of a vector, @code{diag} extracts the\n\ @var{k}-th diagonal of the matrix.\n\ @end deftypefn")
 DEFUN (prod, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} prod (@var{x})\n\ @deftypefnx {Built-in Function} {} prod (@var{x}, @var{dim})\n\ Product of elements along dimension @var{dim}. If @var{dim} is\n\ omitted, it defaults to the first non-singleton dimension.\n\ @seealso{cumprod, sum}\n\ @end deftypefn")
 DEFUN (horzcat, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} horzcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN})\n\ Return the horizontal concatenation of N-d array objects, @var{array1},\n\ @var{array2}, @dots{}, @var{arrayN} along dimension 2.\n\ @seealso{cat, vertcat}\n\ @end deftypefn")
 DEFUN (vertcat, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} vertcat (@var{array1}, @var{array2}, @dots{}, @var{arrayN})\n\ Return the vertical concatenation of N-d array objects, @var{array1},\n\ @var{array2}, @dots{}, @var{arrayN} along dimension 1.\n\ @seealso{cat, horzcat}\n\ @end deftypefn")
 DEFUN (cat, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} cat (@var{dim}, @var{array1}, @var{array2}, @dots{}, @var{arrayN})\n\ Return the concatenation of N-d array objects, @var{array1},\n\ @var{array2}, @dots{}, @var{arrayN} along dimension @var{dim}.\n\ \n\ @example\n\ @group\n\ A = ones (2, 2);\n\ B = zeros (2, 2);\n\ cat (2, A, B)\n\ @result{} ans =\n\ \n\ 1 1 0 0\n\ 1 1 0 0\n\ @end group\n\ @end example\n\ \n\ Alternatively, we can concatenate @var{A} and @var{B} along the\n\ second dimension the following way:\n\ \n\ @example\n\ @group\n\ [A, B].\n\ @end group\n\ @end example\n\ \n\ @var{dim} can be larger than the dimensions of the N-d array objects\n\ and the result will thus have @var{dim} dimensions as the\n\ following example shows:\n\ @example\n\ @group\n\ cat (4, ones(2, 2), zeros (2, 2))\n\ @result{} ans =\n\ \n\ ans(:,:,1,1) =\n\ \n\ 1 1\n\ 1 1\n\ \n\ ans(:,:,1,2) =\n\ 0 0\n\ 0 0\n\ @end group\n\ @end example\n\ @seealso{horzcat, vertcat}\n\ @end deftypefn")
 DEFUN (permute, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} permute (@var{a}, @var{perm})\n\ Return the generalized transpose for an N-d array object @var{a}.\n\ The permutation vector @var{perm} must contain the elements\n\ @code{1:ndims(a)} (in any order, but each element must appear just once).\n\ @seealso{ipermute}\n\ @end deftypefn")
 DEFUN (ipermute, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ipermute (@var{a}, @var{iperm})\n\ The inverse of the @code{permute} function. The expression\n\ \n\ @example\n\ ipermute (permute (a, perm), perm)\n\ @end example\n\ returns the original array @var{a}.\n\ @seealso{permute}\n\ @end deftypefn")
 DEFUN (length, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} length (@var{a})\n\ Return the `length' of the object @var{a}. For matrix objects, the\n\ length is the number of rows or columns, whichever is greater (this\n\ odd definition is used for compatibility with @sc{matlab}).\n\ @end deftypefn")
 DEFUN (ndims, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ndims (@var{a})\n\ Returns the number of dimensions of array @var{a}.\n\ For any array, the result will always be larger than or equal to 2.\n\ Trailing singleton dimensions are not counted.\n\ @end deftypefn")
 DEFUN (numel, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} numel (@var{a})\n\ @deftypefnx {Built-in Function} {} numel (@var{a}, @var{idx1}, @var{idx2}, @dots{})\n\ Returns the number of elements in the object @var{a}.\n\ Optionally, if indices @var{idx1}, @var{idx2}, @dots{} are supplied,\n\ return the number of elements that would result from the indexing\n\ @example\n\ @var{a}(@var{idx1}, @var{idx2}, @dots{})\n\ @end example\n\ This method is also called when an object appears as lvalue with cs-list\n\ indexing, i.e. @code{object@{@dots{}@}} or @code{object(@dots{}).field}.\n\ @seealso{size}\n\ @end deftypefn")
 DEFUN (size, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} size (@var{a}, @var{n})\n\ Return the number rows and columns of @var{a}.\n\ \n\ With one input argument and one output argument, the result is returned\n\ in a row vector. If there are multiple output arguments, the number of\n\ rows is assigned to the first, and the number of columns to the second,\n\ etc. For example,\n\ \n\ @example\n\ @group\n\ size ([1, 2; 3, 4; 5, 6])\n\ @result{} [ 3, 2 ]\n\ \n\ [nr, nc] = size ([1, 2; 3, 4; 5, 6])\n\ @result{} nr = 3\n\ @result{} nc = 2\n\ @end group\n\ @end example\n\ \n\ If given a second argument, @code{size} will return the size of the\n\ corresponding dimension. For example\n\ \n\ @example\n\ @group\n\ size ([1, 2; 3, 4; 5, 6], 2)\n\ @result{} 2\n\ @end group\n\ @end example\n\ \n\ @noindent\n\ returns the number of columns in the given matrix.\n\ @seealso{numel}\n\ @end deftypefn")
 DEFUN (size_equal, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} size_equal (@var{a}, @var{b}, @dots{})\n\ Return true if the dimensions of all arguments agree.\n\ Trailing singleton dimensions are ignored.\n\ Called with a single argument, size_equal returns true.\n\ @seealso{size, numel}\n\ @end deftypefn")
 DEFUN (nnz, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{scalar} =} nnz (@var{a})\n\ Returns the number of non zero elements in @var{a}.\n\ @seealso{sparse}\n\ @end deftypefn")
 DEFUN (nzmax, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{scalar} =} nzmax (@var{SM})\n\ Return the amount of storage allocated to the sparse matrix @var{SM}.\n\ Note that Octave tends to crop unused memory at the first opportunity\n\ for sparse objects. There are some cases of user created sparse objects\n\ where the value returned by @dfn{nzmax} will not be the same as @dfn{nnz},\n\ but in general they will give the same result.\n\ @seealso{sparse, spalloc}\n\ @end deftypefn")
 DEFUN (rows, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} rows (@var{a})\n\ Return the number of rows of @var{a}.\n\ @seealso{size, numel, columns, length, isscalar, isvector, ismatrix}\n\ @end deftypefn")
 DEFUN (columns, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} columns (@var{a})\n\ Return the number of columns of @var{a}.\n\ @seealso{size, numel, rows, length, isscalar, isvector, ismatrix}\n\ @end deftypefn")
 DEFUN (sum, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sum (@var{x})\n\ @deftypefnx {Built-in Function} {} sum (@var{x}, @var{dim})\n\ @deftypefnx {Built-in Function} {} sum (@dots{}, 'native')\n\ @deftypefnx {Built-in Function} {} sum (@dots{}, 'double')\n\ @deftypefnx {Built-in Function} {} sum (@dots{}, 'extra')\n\ Sum of elements along dimension @var{dim}. If @var{dim} is\n\ omitted, it defaults to the first non-singleton dimension.\n\ \n\ If the optional argument 'native' is given, then the sum is performed\n\ in the same type as the original argument, rather than in the default\n\ double type. For example\n\ \n\ @example\n\ @group\n\ sum ([true, true])\n\ @result{} 2\n\ sum ([true, true], 'native')\n\ @result{} true\n\ @end group\n\ @end example\n\ \n\ On the contrary, if 'double' is given, the sum is performed in double precision\n\ even for single precision inputs.\n\ \n\ For double precision inputs, 'extra' indicates that a more accurate algorithm\n\ than straightforward summation is to be used. For single precision inputs, 'extra' is\n\ the same as 'double'. Otherwise, 'extra' has no effect.\n\ @seealso{cumsum, sumsq, prod}\n\ @end deftypefn")
 DEFUN (sumsq, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} sumsq (@var{x})\n\ @deftypefnx {Built-in Function} {} sumsq (@var{x}, @var{dim})\n\ Sum of squares of elements along dimension @var{dim}. If @var{dim}\n\ is omitted, it defaults to the first non-singleton dimension.\n\ \n\ This function is conceptually equivalent to computing\n\ @example\n\ sum (x .* conj (x), dim)\n\ @end example\n\ but it uses less memory and avoids calling @code{conj} if @var{x} is real.\n\ @seealso{sum}\n\ @end deftypefn")
 DEFUN (islogical, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} islogical (@var{x})\n\ Return true if @var{x} is a logical object.\n\ @end deftypefn")
 DEFALIAS (isbool, islogical)
 DEFUN (isinteger, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isinteger (@var{x})\n\ Return true if @var{x} is an integer object (int8, uint8, int16, etc.).\n\ Note that @code{isinteger (14)} is false because numeric constants in\n\ Octave are double precision floating point values.\n\ @seealso{isreal, isnumeric, class, isa}\n\ @end deftypefn")
 DEFUN (iscomplex, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} iscomplex (@var{x})\n\ Return true if @var{x} is a complex-valued numeric object.\n\ @end deftypefn")
 DEFUN (isfloat, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isfloat (@var{x})\n\ Return true if @var{x} is a floating-point numeric object.\n\ @end deftypefn")
 DEFUN (complex, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} complex (@var{x})\n\ @deftypefnx {Built-in Function} {} complex (@var{re}, @var{im})\n\ Return a complex result from real arguments. With 1 real argument @var{x},\n\ return the complex result @code{@var{x} + 0i}. With 2 real arguments,\n\ return the complex result @code{@var{re} + @var{im}}. @code{complex} can\n\ often be more convenient than expressions such as @code{a + i*b}.\n\ For example:\n\ \n\ @example\n\ complex ([1, 2], [3, 4])\n\ @result{}\n\ 1 + 3i 2 + 4i\n\ @end example\n\ @seealso{real, imag, iscomplex}\n\ @end deftypefn")
 DEFUN (isreal, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isreal (@var{x})\n\ Return true if @var{x} is a real-valued numeric object.\n\ @end deftypefn")
 DEFUN (isempty, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isempty (@var{a})\n\ Return 1 if @var{a} is an empty matrix (either the number of rows, or\n\ the number of columns, or both are zero). Otherwise, return 0.\n\ @end deftypefn")
 DEFUN (isnumeric, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isnumeric (@var{x})\n\ Return nonzero if @var{x} is a numeric object.\n\ @end deftypefn")
 DEFUN (islist, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} islist (@var{x})\n\ Return nonzero if @var{x} is a list.\n\ @end deftypefn")
 DEFUN (ismatrix, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ismatrix (@var{a})\n\ Return 1 if @var{a} is a matrix. Otherwise, return 0.\n\ @end deftypefn")
 DEFUN (ones, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ones (@var{x})\n\ @deftypefnx {Built-in Function} {} ones (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} ones (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} ones (@dots{}, @var{class})\n\ Return a matrix or N-dimensional array whose elements are all 1.\n\ If invoked with a single scalar integer argument, return a square\n\ matrix of the specified size. If invoked with two or more scalar\n\ integer arguments, or a vector of integer values, return an array with\n\ given dimensions.\n\ \n\ If you need to create a matrix whose values are all the same, you should\n\ use an expression like\n\ \n\ @example\n\ val_matrix = val * ones (n, m)\n\ @end example\n\ \n\ The optional argument @var{class}, allows @code{ones} to return an array of\n\ the specified type, for example\n\ \n\ @example\n\ val = ones (n,m, \"uint8\")\n\ @end example\n\ @end deftypefn")
 DEFUN (zeros, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} zeros (@var{x})\n\ @deftypefnx {Built-in Function} {} zeros (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} zeros (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} zeros (@dots{}, @var{class})\n\ Return a matrix or N-dimensional array whose elements are all 0.\n\ The arguments are handled the same as the arguments for @code{ones}.\n\ \n\ The optional argument @var{class}, allows @code{zeros} to return an array of\n\ the specified type, for example\n\ \n\ @example\n\ val = zeros (n,m, \"uint8\")\n\ @end example\n\ @end deftypefn")
 DEFUN (Inf, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} Inf\n\ @deftypefnx {Built-in Function} {} Inf (@var{n})\n\ @deftypefnx {Built-in Function} {} Inf (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} Inf (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} Inf (@dots{}, @var{class})\n\ Return a scalar, matrix or N-dimensional array whose elements are all equal\n\ to the IEEE representation for positive infinity.\n\ \n\ Infinity is produced when results are too large to be represented using the\n\ the IEEE floating point format for numbers. Two common examples which\n\ produce infinity are division by zero and overflow.\n\ @example\n\ @group\n\ [1/0 e^800]\n\ @result{}\n\ Inf Inf\n\ @end group\n\ @end example\n\ \n\ When called with no arguments, return a scalar with the value @samp{Inf}.\n\ When called with a single argument, return a square matrix with the dimension\n\ specified. When called with more than one scalar argument the first two\n\ arguments are taken as the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @seealso{isinf}\n\ @end deftypefn")
 DEFALIAS (inf, Inf)
 DEFUN (NaN, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} NaN\n\ @deftypefnx {Built-in Function} {} NaN (@var{n})\n\ @deftypefnx {Built-in Function} {} NaN (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} NaN (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} NaN (@dots{}, @var{class})\n\ Return a scalar, matrix, or N-dimensional array whose elements are all equal\n\ to the IEEE symbol NaN (Not a Number).\n\ NaN is the result of operations which do not produce a well defined numerical\n\ result. Common operations which produce a NaN are arithmetic with infinity\n\ @tex\n\ ($\\infty - \\infty$), zero divided by zero ($0/0$),\n\ @end tex\n\ @ifnottex\n\ (Inf - Inf), zero divided by zero (0/0),\n\ @end ifnottex\n\ and any operation involving another NaN value (5 + NaN).\n\ \n\ Note that NaN always compares not equal to NaN (NaN != NaN). This behavior\n\ is specified by the IEEE standard for floating point arithmetic. To\n\ find NaN values, use the @code{isnan} function.\n\ \n\ When called with no arguments, return a scalar with the value @samp{NaN}.\n\ When called with a single argument, return a square matrix with the dimension\n\ specified. When called with more than one scalar argument the first two\n\ arguments are taken as the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @seealso{isnan}\n\ @end deftypefn")
 DEFALIAS (nan, NaN)
 DEFUN (e, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} e\n\ @deftypefnx {Built-in Function} {} e (@var{n})\n\ @deftypefnx {Built-in Function} {} e (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} e (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} e (@dots{}, @var{class})\n\ Return a scalar, matrix, or N-dimensional array whose elements are all equal\n\ to the base of natural logarithms. The constant\n\ @tex\n\ $e$ satisfies the equation $\\log (e) = 1$.\n\ @end tex\n\ @ifnottex\n\ @samp{e} satisfies the equation @code{log} (e) = 1.\n\ @end ifnottex\n\ \n\ When called with no arguments, return a scalar with the value @math{e}. When\n\ called with a single argument, return a square matrix with the dimension\n\ specified. When called with more than one scalar argument the first two\n\ arguments are taken as the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @end deftypefn")
 DEFUN (eps, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} eps\n\ @deftypefnx {Built-in Function} {} eps (@var{x})\n\ @deftypefnx {Built-in Function} {} eps (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} eps (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} eps (@dots{}, @var{class})\n\ Return a scalar, matrix or N-dimensional array whose elements are all eps,\n\ the machine precision. More precisely, @code{eps} is the relative spacing\n\ between any two adjacent numbers in the machine's floating point system.\n\ This number is obviously system dependent. On machines that support IEEE\n\ floating point arithmetic, @code{eps} is approximately\n\ @tex\n\ $2.2204\\times10^{-16}$ for double precision and $1.1921\\times10^{-7}$\n\ @end tex\n\ @ifnottex\n\ 2.2204e-16 for double precision and 1.1921e-07\n\ @end ifnottex\n\ for single precision.\n\ \n\ When called with no arguments, return a scalar with the value\n\ @code{eps(1.0)}.\n\ Given a single argument @var{x}, return the distance between @var{x} and\n\ the next largest value.\n\ When called with more than one argument the first two arguments are taken as\n\ the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @end deftypefn")
 DEFUN (pi, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} pi\n\ @deftypefnx {Built-in Function} {} pi (@var{n})\n\ @deftypefnx {Built-in Function} {} pi (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} pi (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} pi (@dots{}, @var{class})\n\ Return a scalar, matrix, or N-dimensional array whose elements are all equal\n\ to the ratio of the circumference of a circle to its\n\ @tex\n\ diameter($\\pi$).\n\ @end tex\n\ @ifnottex\n\ diameter.\n\ @end ifnottex\n\ Internally, @code{pi} is computed as @samp{4.0 * atan (1.0)}.\n\ \n\ When called with no arguments, return a scalar with the value of\n\ @tex\n\ $\\pi$.\n\ @end tex\n\ @ifnottex\n\ pi.\n\ @end ifnottex\n\ When called with a single argument, return a square matrix with the dimension\n\ specified. When called with more than one scalar argument the first two\n\ arguments are taken as the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @end deftypefn")
 DEFUN (realmax, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} realmax\n\ @deftypefnx {Built-in Function} {} realmax (@var{n})\n\ @deftypefnx {Built-in Function} {} realmax (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} realmax (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} realmax (@dots{}, @var{class})\n\ Return a scalar, matrix or N-dimensional array whose elements are all equal\n\ to the largest floating point number that is representable. The actual\n\ value is system dependent. On machines that support IEEE\n\ floating point arithmetic, @code{realmax} is approximately\n\ @tex\n\ $1.7977\\times10^{308}$ for double precision and $3.4028\\times10^{38}$\n\ @end tex\n\ @ifnottex\n\ 1.7977e+308 for double precision and 3.4028e+38\n\ @end ifnottex\n\ for single precision.\n\ \n\ When called with no arguments, return a scalar with the value\n\ @code{realmax(\"double\")}.\n\ When called with a single argument, return a square matrix with the dimension\n\ specified. When called with more than one scalar argument the first two\n\ arguments are taken as the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @seealso{realmin, intmax, bitmax}\n\ @end deftypefn")
 DEFUN (realmin, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} realmin\n\ @deftypefnx {Built-in Function} {} realmin (@var{n})\n\ @deftypefnx {Built-in Function} {} realmin (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} realmin (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} realmin (@dots{}, @var{class})\n\ Return a scalar, matrix or N-dimensional array whose elements are all equal\n\ to the smallest normalized floating point number that is representable.\n\ The actual value is system dependent. On machines that support\n\ IEEE floating point arithmetic, @code{realmin} is approximately\n\ @tex\n\ $2.2251\\times10^{-308}$ for double precision and $1.1755\\times10^{-38}$\n\ @end tex\n\ @ifnottex\n\ 2.2251e-308 for double precision and 1.1755e-38\n\ @end ifnottex\n\ for single precision.\n\ \n\ When called with no arguments, return a scalar with the value\n\ @code{realmin(\"double\")}.\n\ When called with a single argument, return a square matrix with the dimension\n\ specified. When called with more than one scalar argument the first two\n\ arguments are taken as the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @seealso{realmax, intmin}\n\ @end deftypefn")
 DEFUN (I, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} I\n\ @deftypefnx {Built-in Function} {} I (@var{n})\n\ @deftypefnx {Built-in Function} {} I (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} I (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} I (@dots{}, @var{class})\n\ Return a scalar, matrix, or N-dimensional array whose elements are all equal\n\ to the pure imaginary unit, defined as\n\ @tex\n\ $\\sqrt{-1}$.\n\ @end tex\n\ @ifnottex\n\ @code{sqrt (-1)}.\n\ @end ifnottex\n\ I, and its equivalents i, J, and j, are functions so any of the names may\n\ be reused for other purposes (such as i for a counter variable).\n\ \n\ When called with no arguments, return a scalar with the value @math{i}. When\n\ called with a single argument, return a square matrix with the dimension\n\ specified. When called with more than one scalar argument the first two\n\ arguments are taken as the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @end deftypefn")
 DEFALIAS (i, I)
 DEFALIAS (J, I)
 DEFALIAS (j, I)
 DEFUN (NA, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} NA\n\ @deftypefnx {Built-in Function} {} NA (@var{n})\n\ @deftypefnx {Built-in Function} {} NA (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} NA (@var{n}, @var{m}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} NA (@dots{}, @var{class})\n\ Return a scalar, matrix, or N-dimensional array whose elements are all equal\n\ to the special constant used to designate missing values.\n\ \n\ Note that NA always compares not equal to NA (NA != NA).\n\ To find NA values, use the @code{isna} function.\n\ \n\ When called with no arguments, return a scalar with the value @samp{NA}.\n\ When called with a single argument, return a square matrix with the dimension\n\ specified. When called with more than one scalar argument the first two\n\ arguments are taken as the number of rows and columns and any further\n\ arguments specify additional matrix dimensions.\n\ The optional argument @var{class} specifies the return type and may be\n\ either \"double\" or \"single\".\n\ @seealso{isna}\n\ @end deftypefn")
 DEFUN (false, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} false (@var{x})\n\ @deftypefnx {Built-in Function} {} false (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} false (@var{n}, @var{m}, @var{k}, @dots{})\n\ Return a matrix or N-dimensional array whose elements are all logical 0.\n\ The arguments are handled the same as the arguments for @code{ones}.\n\ @end deftypefn")
 DEFUN (true, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} true (@var{x})\n\ @deftypefnx {Built-in Function} {} true (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} true (@var{n}, @var{m}, @var{k}, @dots{})\n\ Return a matrix or N-dimensional array whose elements are all logical 1.\n\ The arguments are handled the same as the arguments for @code{ones}.\n\ @end deftypefn")
template<class MT >
octave_value identity_matrix (int nr, int nc)
 INSTANTIATE_EYE (int8NDArray)
 INSTANTIATE_EYE (FloatNDArray)
 INSTANTIATE_EYE (NDArray)
 INSTANTIATE_EYE (boolNDArray)
 DEFUN (eye, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} eye (@var{x})\n\ @deftypefnx {Built-in Function} {} eye (@var{n}, @var{m})\n\ @deftypefnx {Built-in Function} {} eye (@dots{}, @var{class})\n\ Return an identity matrix. If invoked with a single scalar argument,\n\ @code{eye} returns a square matrix with the dimension specified. If you\n\ supply two scalar arguments, @code{eye} takes them to be the number of\n\ rows and columns. If given a vector with two elements, @code{eye} uses\n\ the values of the elements as the number of rows and columns,\n\ respectively. For example,\n\ \n\ @example\n\ @group\n\ eye (3)\n\ @result{} 1 0 0\n\ 0 1 0\n\ 0 0 1\n\ @end group\n\ @end example\n\ \n\ The following expressions all produce the same result:\n\ \n\ @example\n\ @group\n\ eye (2)\n\ @equiv{}\n\ eye (2, 2)\n\ @equiv{}\n\ eye (size ([1, 2; 3, 4])\n\ @end group\n\ @end example\n\ \n\ The optional argument @var{class}, allows @code{eye} to return an array of\n\ the specified type, like\n\ \n\ @example\n\ val = zeros (n,m, \"uint8\")\n\ @end example\n\ \n\ Calling @code{eye} with no arguments is equivalent to calling it\n\ with an argument of 1. This odd definition is for compatibility\n\ with @sc{matlab}.\n\ @end deftypefn")
 DEFUN (linspace, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} linspace (@var{base}, @var{limit}, @var{n})\n\ Return a row vector with @var{n} linearly spaced elements between\n\ @var{base} and @var{limit}. If the number of elements is greater than one,\n\ then the @var{base} and @var{limit} are always included in\n\ the range. If @var{base} is greater than @var{limit}, the elements are\n\ stored in decreasing order. If the number of points is not specified, a\n\ value of 100 is used.\n\ \n\ The @code{linspace} function always returns a row vector if both\n\ @var{base} and @var{limit} are scalars. If one of them or both are column\n\ vectors, @code{linspace} returns a matrix.\n\ \n\ For compatibility with @sc{matlab}, return the second argument if\n\ fewer than two values are requested.\n\ @end deftypefn")
 DEFUN (resize, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} resize (@var{x}, @var{m})\n\ @deftypefnx {Built-in Function} {} resize (@var{x}, @var{m}, @var{n})\n\ @deftypefnx {Built-in Function} {} resize (@var{x}, @var{m}, @var{n}, @dots{})\n\ Resize @var{x} cutting off elements as necessary.\n\ \n\ In the result, element with certain indices is equal to the corresponding\n\ element of @var{x} if the indices are within the bounds of @var{x};\n\ otherwise, the element is set to zero.\n\ \n\ In other words, the statement\n\ \n\ @example\n\ y = resize (x, dv);\n\ @end example\n\ \n\ @noindent\n\ is equivalent to the following code:\n\ \n\ @example\n\ @group\n\ y = zeros (dv, class (x));\n\ sz = min (dv, size (x));\n\ for i = 1:length (sz), idx@{i@} = 1:sz(i); endfor\n\ y(idx@{:@}) = x(idx@{:@});\n\ @end group\n\ @end example\n\ \n\ @noindent\n\ but is performed more efficiently.\n\ \n\ If only @var{m} is supplied and it is a scalar, the dimension of the\n\ result is @var{m}-by-@var{m}. If @var{m} is a vector, then the\n\ dimensions of the result are given by the elements of @var{m}.\n\ If both @var{m} and @var{n} are scalars, then the dimensions of\n\ the result are @var{m}-by-@var{n}.\n\ \n\ An object can be resized to more dimensions than it has;\n\ in such case the missing dimensions are assumed to be 1.\n\ Resizing an object to fewer dimensions is not possible.\n\ @seealso{reshape, postpad}\n\ @end deftypefn")
 DEFUN (reshape, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} reshape (@var{a}, @var{m}, @var{n}, @dots{})\n\ @deftypefnx {Built-in Function} {} reshape (@var{a}, @var{size})\n\ Return a matrix with the given dimensions whose elements are taken\n\ from the matrix @var{a}. The elements of the matrix are accessed in\n\ column-major order (like Fortran arrays are stored).\n\ \n\ For example,\n\ \n\ @example\n\ @group\n\ reshape ([1, 2, 3, 4], 2, 2)\n\ @result{} 1 3\n\ 2 4\n\ @end group\n\ @end example\n\ \n\ @noindent\n\ Note that the total number of elements in the original\n\ matrix must match the total number of elements in the new matrix.\n\ \n\ A single dimension of the return matrix can be unknown and is flagged\n\ by an empty argument.\n\ @end deftypefn")
 DEFUN (squeeze, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} squeeze (@var{x})\n\ Remove singleton dimensions from @var{x} and return the result.\n\ Note that for compatibility with @sc{matlab}, all objects have\n\ a minimum of two dimensions and row vectors are left unchanged.\n\ @end deftypefn")
 DEFUN (full, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{FM} =} full (@var{SM})\n\ returns a full storage matrix from a sparse, diagonal, permutation matrix or a range.\n\ @seealso{sparse}\n\ @end deftypefn")
 DEFUN (norm, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} norm (@var{a}, @var{p}, @var{opt})\n\ Compute the p-norm of the matrix @var{a}. If the second argument is\n\ missing, @code{p = 2} is assumed.\n\ \n\ If @var{a} is a matrix (or sparse matrix):\n\ \n\ @table @asis\n\ @item @var{p} = @code{1}\n\ 1-norm, the largest column sum of the absolute values of @var{a}.\n\ \n\ @item @var{p} = @code{2}\n\ Largest singular value of @var{a}.\n\ \n\ @item @var{p} = @code{Inf} or @code{\"inf\"}\n\ @cindex infinity norm\n\ Infinity norm, the largest row sum of the absolute values of @var{a}.\n\ \n\ @item @var{p} = @code{\"fro\"}\n\ @cindex Frobenius norm\n\ Frobenius norm of @var{a}, @code{sqrt (sum (diag (@var{a}' * @var{a})))}.\n\ \n\ @item other @var{p}, @code{@var{p} > 1}\n\ @cindex general p-norm \n\ maximum @code{norm (A*x, p)} such that @code{norm (x, p) == 1}\n\ @end table\n\ \n\ If @var{a} is a vector or a scalar:\n\ \n\ @table @asis\n\ @item @var{p} = @code{Inf} or @code{\"inf\"}\n\ @code{max (abs (@var{a}))}.\n\ \n\ @item @var{p} = @code{-Inf}\n\ @code{min (abs (@var{a}))}.\n\ \n\ @item @var{p} = @code{\"fro\"}\n\ Frobenius norm of @var{a}, @code{sqrt (sumsq (abs (a)))}.\n\ \n\ @item @var{p} = 0\n\ Hamming norm - the number of nonzero elements.\n\ \n\ @item other @var{p}, @code{@var{p} > 1}\n\ p-norm of @var{a}, @code{(sum (abs (@var{a}) .^ @var{p})) ^ (1/@var{p})}.\n\ \n\ @item other @var{p} @code{@var{p} < 1}\n\ the p-pseudonorm defined as above.\n\ @end table\n\ \n\ If @code{\"rows\"} is given as @var{opt}, the norms of all rows of the matrix @var{a} are\n\ returned as a column vector. Similarly, if @code{\"columns\"} or @code{\"cols\"} is passed\n\ column norms are computed.\n\ @seealso{cond, svd}\n\ @end deftypefn")
 DEFUN (not, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} not (@var{x})\n\ This function is equivalent to @code{! x}.\n\ @end deftypefn")
 DEFUN (uplus, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} uplus (@var{x})\n\ This function is equivalent to @code{+ x}.\n\ @end deftypefn")
 DEFUN (uminus, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} uminus (@var{x})\n\ This function is equivalent to @code{- x}.\n\ @end deftypefn")
 DEFUN (transpose, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} transpose (@var{x})\n\ This function is equivalent to @code{x.'}.\n\ @end deftypefn")
 DEFUN (ctranspose, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ctranspose (@var{x})\n\ This function is equivalent to @code{x'}.\n\ @end deftypefn")
 DEFUN (plus, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} plus (@var{x}, @var{y})\n\ @deftypefnx {Built-in Function} {} plus (@var{x1}, @var{x2}, @dots{})\n\ This function is equivalent to @code{x + y}.\n\ If more arguments are given, the summation is applied\n\ cumulatively from left to right:\n\ \n\ @example\n\ (@dots{}((x1 + x2) + x3) + @dots{})\n\ @end example\n\ \n\ At least one argument is needed.\n\ @end deftypefn")
 DEFUN (minus, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} minus (@var{x}, @var{y})\n\ This function is equivalent to @code{x - y}.\n\ @end deftypefn")
 DEFUN (mtimes, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} mtimes (@var{x}, @var{y})\n\ @deftypefnx {Built-in Function} {} mtimes (@var{x1}, @var{x2}, @dots{})\n\ This function is equivalent to @code{x * y}.\n\ If more arguments are given, the multiplication is applied\n\ cumulatively from left to right:\n\ \n\ @example\n\ (@dots{}((x1 * x2) * x3) * @dots{})\n\ @end example\n\ \n\ At least one argument is needed.\n\ @end deftypefn")
 DEFUN (mrdivide, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} mrdivide (@var{x}, @var{y})\n\ This function is equivalent to @code{x / y}.\n\ @end deftypefn")
 DEFUN (mpower, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} mpower (@var{x}, @var{y})\n\ This function is equivalent to @code{x ^ y}.\n\ @end deftypefn")
 DEFUN (mldivide, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} mldivide (@var{x}, @var{y})\n\ This function is equivalent to @code{x \\ y}.\n\ @end deftypefn")
 DEFUN (lt, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} lt (@var{x}, @var{y})\n\ This function is equivalent to @code{x < y}.\n\ @end deftypefn")
 DEFUN (le, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} le (@var{x}, @var{y})\n\ This function is equivalent to @code{x <= y}.\n\ @end deftypefn")
 DEFUN (eq, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} eq (@var{x}, @var{y})\n\ This function is equivalent to @code{x == y}.\n\ @end deftypefn")
 DEFUN (ge, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ge (@var{x}, @var{y})\n\ This function is equivalent to @code{x >= y}.\n\ @end deftypefn")
 DEFUN (gt, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} gt (@var{x}, @var{y})\n\ This function is equivalent to @code{x > y}.\n\ @end deftypefn")
 DEFUN (ne, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ne (@var{x}, @var{y})\n\ This function is equivalent to @code{x != y}.\n\ @end deftypefn")
 DEFUN (times, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} times (@var{x}, @var{y})\n\ @deftypefnx {Built-in Function} {} times (@var{x1}, @var{x2}, @dots{})\n\ This function is equivalent to @code{x .* y}.\n\ If more arguments are given, the multiplication is applied\n\ cumulatively from left to right:\n\ \n\ @example\n\ (@dots{}((x1 .* x2) .* x3) .* @dots{})\n\ @end example\n\ \n\ At least one argument is needed.\n\ @end deftypefn")
 DEFUN (rdivide, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} rdivide (@var{x}, @var{y})\n\ This function is equivalent to @code{x ./ y}.\n\ @end deftypefn")
 DEFUN (power, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} power (@var{x}, @var{y})\n\ This function is equivalent to @code{x .^ y}.\n\ @end deftypefn")
 DEFUN (ldivide, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ldivide (@var{x}, @var{y})\n\ This function is equivalent to @code{x .\\ y}.\n\ @end deftypefn")
 DEFUN (and, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} and (@var{x}, @var{y})\n\ @deftypefnx {Built-in Function} {} and (@var{x1}, @var{x2}, @dots{})\n\ This function is equivalent to @code{x & y}.\n\ If more arguments are given, the logical and is applied\n\ cumulatively from left to right:\n\ \n\ @example\n\ (@dots{}((x1 & x2) & x3) & @dots{})\n\ @end example\n\ \n\ At least one argument is needed.\n\ @end deftypefn")
 DEFUN (or, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} or (@var{x}, @var{y})\n\ @deftypefnx {Built-in Function} {} or (@var{x1}, @var{x2}, @dots{})\n\ This function is equivalent to @code{x | y}.\n\ If more arguments are given, the logical or is applied\n\ cumulatively from left to right:\n\ \n\ @example\n\ (@dots{}((x1 | x2) | x3) | @dots{})\n\ @end example\n\ \n\ At least one argument is needed.\n\ @end deftypefn")
 DEFUN (tic, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} tic ()\n\ @deftypefnx {Built-in Function} {} toc ()\n\ Set or check a wall-clock timer. Calling @code{tic} without an\n\ output argument sets the timer. Subsequent calls to @code{toc}\n\ return the number of seconds since the timer was set. For example,\n\ \n\ @example\n\ @group\n\ tic ();\n\ # many computations later@dots{}\n\ elapsed_time = toc ();\n\ @end group\n\ @end example\n\ \n\ @noindent\n\ will set the variable @code{elapsed_time} to the number of seconds since\n\ the most recent call to the function @code{tic}.\n\ \n\ If called with one output argument then this function returns a scalar\n\ of type @code{uint64} and the wall-clock timer is not started.\n\ \n\ @example\n\ @group\n\ t = tic; sleep (5); (double (tic ()) - double (t)) * 1e-6\n\ @result{} 5\n\ @end group\n\ @end example\n\ \n\ Nested timing with @code{tic} and @code{toc} is not supported.\n\ Therefore @code{toc} will always return the elapsed time from the most\n\ recent call to @code{tic}.\n\ \n\ If you are more interested in the CPU time that your process used, you\n\ should use the @code{cputime} function instead. The @code{tic} and\n\ @code{toc} functions report the actual wall clock time that elapsed\n\ between the calls. This may include time spent processing other jobs or\n\ doing nothing at all. For example,\n\ \n\ @example\n\ @group\n\ tic (); sleep (5); toc ()\n\ @result{} 5\n\ t = cputime (); sleep (5); cputime () - t\n\ @result{} 0\n\ @end group\n\ @end example\n\ \n\ @noindent\n\ (This example also illustrates that the CPU timer may have a fairly\n\ coarse resolution.)\n\ @end deftypefn")
 DEFUN (toc, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} toc ()\n\ See tic.\n\ @end deftypefn")
 DEFUN (cputime, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {[@var{total}, @var{user}, @var{system}] =} cputime ();\n\ Return the CPU time used by your Octave session. The first output is\n\ the total time spent executing your process and is equal to the sum of\n\ second and third outputs, which are the number of CPU seconds spent\n\ executing in user mode and the number of CPU seconds spent executing in\n\ system mode, respectively. If your system does not have a way to report\n\ CPU time usage, @code{cputime} returns 0 for each of its output values.\n\ Note that because Octave used some CPU time to start, it is reasonable\n\ to check to see if @code{cputime} works by checking to see if the total\n\ CPU time used is nonzero.\n\ @end deftypefn")
 DEFUN (sort, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x})\n\ @deftypefnx {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x}, @var{dim})\n\ @deftypefnx {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x}, @var{dim}, @var{mode})\n\ Return a copy of @var{x} with the elements arranged in increasing\n\ order. For matrices, @code{sort} orders the elements in each column.\n\ \n\ For example,\n\ \n\ @example\n\ @group\n\ sort ([1, 2; 2, 3; 3, 1])\n\ @result{} 1 1\n\ 2 2\n\ 3 3\n\ @end group\n\ @end example\n\ \n\ The @code{sort} function may also be used to produce a matrix\n\ containing the original row indices of the elements in the sorted\n\ matrix. For example,\n\ \n\ @example\n\ @group\n\ [s, i] = sort ([1, 2; 2, 3; 3, 1])\n\ @result{} s = 1 1\n\ 2 2\n\ 3 3\n\ @result{} i = 1 3\n\ 2 1\n\ 3 2\n\ @end group\n\ @end example\n\ \n\ If the optional argument @var{dim} is given, then the matrix is sorted\n\ along the dimension defined by @var{dim}. The optional argument @code{mode}\n\ defines the order in which the values will be sorted. Valid values of\n\ @code{mode} are `ascend' or `descend'.\n\ \n\ For equal elements, the indices are such that the equal elements are listed\n\ in the order that appeared in the original list.\n\ \n\ The @code{sort} function may also be used to sort strings and cell arrays\n\ of strings, in which case the dictionary order of the strings is used.\n\ \n\ The algorithm used in @code{sort} is optimized for the sorting of partially\n\ ordered lists.\n\ @end deftypefn")
 DEFUN (__sort_rows_idx__, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __sort_rows_idx__ (@var{a}, @var{mode})\n\ Undocumented internal function.\n\ @end deftypefn\n")
 DEFUN (issorted, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} issorted (@var{a}, @var{rows})\n\ Returns true if the array is sorted, ascending or descending.\n\ NaNs are treated as by @code{sort}. If @var{rows} is supplied and\n\ has the value \"rows\", checks whether the array is sorted by rows\n\ as if output by @code{sortrows} (with no options).\n\ \n\ This function does not yet support sparse matrices.\n\ @seealso{sortrows, sort}\n\ @end deftypefn\n")
 DEFUN (nth_element, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} nth_element (@var{x}, @var{n})\n\ @deftypefnx {Built-in Function} {} nth_element (@var{x}, @var{n}, @var{dim})\n\ Select the n-th smallest element of a vector, using the ordering defined by @code{sort}.\n\ In other words, the result is equivalent to @code{sort(@var{x})(@var{n})}.\n\ @var{n} can also be a contiguous range, either ascending @code{l:u}\n\ or descending @code{u:-1:l}, in which case a range of elements is returned.\n\ If @var{x} is an array, @code{nth_element} operates along the dimension defined by @var{dim},\n\ or the first non-singleton dimension if @var{dim} is not given.\n\ \n\ nth_element encapsulates the C++ standard library algorithms nth_element and partial_sort.\n\ On average, the complexity of the operation is O(M*log(K)), where\n\ @code{M = size(@var{x}, @var{dim})} and @code{K = length (@var{n})}.\n\ This function is intended for cases where the ratio K/M is small; otherwise,\n\ it may be better to use @code{sort}.\n\ @seealso{sort, min, max}\n\ @end deftypefn")
 DEFUN (__accumarray_sum__, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __accumarray_sum__ (@var{idx}, @var{vals}, @var{n})\n\ Undocumented internal function.\n\ @end deftypefn")
 DEFUN (merge, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} merge (@var{mask}, @var{tval}, @var{fval})\n\ @deftypefnx {Built-in Function} {} ifelse (@var{mask}, @var{tval}, @var{fval})\n\ Merges elements of @var{true_val} and @var{false_val}, depending on the value of\n\ @var{mask}. If @var{mask} is a logical scalar, the other two arguments can be\n\ arbitrary values. Otherwise, @var{mask} must be a logical array, and @var{tval},\n\ @var{fval} should be arrays of matching class, or cell arrays.\n\ In the scalar mask case, @var{tval} is returned if @var{mask} is true, otherwise\n\ @var{fval} is returned.\n\ \n\ In the array mask case, both @var{tval} and @var{fval} must be either scalars or\n\ arrays with dimensions equal to @var{mask}. The result is constructed as follows:\n\ @example\n\ result(mask) = tval(mask);\n\ result(! mask) = fval(! mask);\n\ @end example\n\ \n\ @var{mask} can also be arbitrary numeric type, in which case\n\ it is first converted to logical.\n\ @seealso{logical}\n\ @end deftypefn")
 DEFALIAS (ifelse, merge)
 DEFUN (diff, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} diff (@var{x}, @var{k}, @var{dim})\n\ If @var{x} is a vector of length @var{n}, @code{diff (@var{x})} is the\n\ vector of first differences\n\ @tex\n\ $x_2 - x_1, \\ldots{}, x_n - x_{n-1}$.\n\ @end tex\n\ @ifnottex\n\ @var{x}(2) - @var{x}(1), @dots{}, @var{x}(n) - @var{x}(n-1).\n\ @end ifnottex\n\ \n\ If @var{x} is a matrix, @code{diff (@var{x})} is the matrix of column\n\ differences along the first non-singleton dimension.\n\ \n\ The second argument is optional. If supplied, @code{diff (@var{x},\n\ @var{k})}, where @var{k} is a non-negative integer, returns the\n\ @var{k}-th differences. It is possible that @var{k} is larger than\n\ then first non-singleton dimension of the matrix. In this case,\n\ @code{diff} continues to take the differences along the next\n\ non-singleton dimension.\n\ \n\ The dimension along which to take the difference can be explicitly\n\ stated with the optional variable @var{dim}. In this case the \n\ @var{k}-th order differences are calculated along this dimension.\n\ In the case where @var{k} exceeds @code{size (@var{x}, @var{dim})}\n\ then an empty matrix is returned.\n\ @end deftypefn")

Define Documentation

#define ANY_ALL ( FCN   ) 

Value:

\
  octave_value retval; \
 \
  int nargin = args.length (); \
 \
  if (nargin == 1 || nargin == 2) \
    { \
      int dim = (nargin == 1 ? -1 : args(1).int_value (true) - 1); \
 \
      if (! error_state) \
        { \
          if (dim >= -1) \
            retval = args(0).FCN (dim); \
          else \
            error (#FCN ": invalid dimension argument = %d", dim + 1); \
        } \
      else \
        error (#FCN ": expecting dimension argument to be an integer"); \
    } \
  else \
    print_usage (); \
 \
  return retval

#define DATA_REDUCTION ( FCN   ) 

#define DO_SINGLE_TYPE_CONCAT ( TYPE,
EXTRACTOR   ) 

Value:

do \
    { \
      TYPE result (dv); \
      \
      SINGLE_TYPE_CONCAT(TYPE, EXTRACTOR); \
      \
      retval = result; \
    } \
 while (0)

#define INSTANTIATE_EYE ( T   )     template octave_value identity_matrix<T> (int, int)

#define MAKE_INT_BRANCH ( INTX   ) 

Value:

else if (tval.is_ ## INTX ## _type () && fval.is_ ## INTX ## _type ()) \
    { \
      retval = do_merge (mask, \
                         tval.INTX ## _array_value (), \
                         fval.INTX ## _array_value ()); \
    }

#define MAKE_INT_BRANCH (  ) 

Value:

case btyp_ ## X: \
          retval = argx.X ## _array_value ().nth_element (n, dim); \
          break

#define MAKE_INT_BRANCH (  ) 

Value:

case btyp_ ## X: \
              if (isnative) \
                retval = arg.X ## _array_value ().sum (dim); \
              else \
                retval = arg.X ## _array_value ().dsum (dim); \
              break

#define MAKE_INT_BRANCH (  ) 

Value:

case btyp_ ## X: \
              if (isnative) \
                retval = arg.X ## _array_value ().cumsum (dim); \
              else \
                retval = arg.array_value ().cumsum (dim); \
              break

#define NATIVE_REDUCTION ( FCN,
BOOL_FCN   ) 

#define NATIVE_REDUCTION_1 ( FCN,
TYPE,
DIM   ) 

Value:

(arg.is_ ## TYPE ## _type ()) \
    { \
      TYPE ## NDArray tmp = arg. TYPE ##_array_value (); \
      \
      if (! error_state) \
        { \
          octave_ ## TYPE::clear_conv_flags (); \
          retval = tmp.FCN (DIM); \
          if (octave_ ## TYPE::get_trunc_flag ()) \
            { \
              gripe_native_integer_math_truncated (#FCN, \
                                                   octave_ ## TYPE::type_name ()); \
              octave_ ## TYPE::clear_conv_flags (); \
            } \
        } \
    }

#define SINGLE_TYPE_CONCAT ( TYPE,
EXTRACTOR   ) 


Typedef Documentation

typedef double(* d_dd_fcn)(double, double)

typedef float(* f_ff_fcn)(float, float)


Function Documentation

DEFALIAS ( ifelse  ,
merge   
)

DEFALIAS ( j  ,
I   
)

DEFALIAS ( ,
I   
)

DEFALIAS ( ,
I   
)

DEFALIAS ( nan  ,
NaN   
)

DEFALIAS ( inf  ,
Inf   
)

DEFALIAS ( isbool  ,
islogical   
)

DEFUN ( diff  ,
args   
)

DEFUN ( merge  ,
args   
)

DEFUN ( __accumarray_sum__  ,
args   
)

DEFUN ( nth_element  ,
args   
)

DEFUN ( issorted  ,
args   
)

DEFUN ( __sort_rows_idx__  ,
args   
)

DEFUN ( sort  ,
args  ,
nargout   
)

DEFUN ( cputime  ,
args   
)

DEFUN ( toc  ,
args  ,
nargout   
)

DEFUN ( tic  ,
args  ,
nargout   
)

DEFUN ( or  ,
args   
)

DEFUN ( and  ,
args   
)

DEFUN ( ldivide  ,
args   
)

DEFUN ( power  ,
args   
)

DEFUN ( rdivide  ,
args   
)

DEFUN ( times  ,
args   
)

DEFUN ( ne  ,
args   
)

DEFUN ( gt  ,
args   
)

DEFUN ( ge  ,
args   
)

DEFUN ( eq  ,
args   
)

DEFUN ( le  ,
args   
)

DEFUN ( lt  ,
args   
)

DEFUN ( mldivide  ,
args   
)

DEFUN ( mpower  ,
args   
)

DEFUN ( mrdivide  ,
args   
)

DEFUN ( mtimes  ,
args   
)

DEFUN ( minus  ,
args   
)

DEFUN ( plus  ,
args   
)

DEFUN ( ctranspose  ,
args   
)

DEFUN ( transpose  ,
args   
)

DEFUN ( uminus  ,
args   
)

DEFUN ( uplus  ,
args   
)

DEFUN ( not  ,
args   
)

DEFUN ( norm  ,
args   
)

DEFUN ( full  ,
args   
)

DEFUN ( squeeze  ,
args   
)

DEFUN ( reshape  ,
args   
)

DEFUN ( resize  ,
args   
)

DEFUN ( linspace  ,
args   
)

DEFUN ( eye  ,
args   
)

DEFUN ( true  ,
args   
)

DEFUN ( false  ,
args   
)

DEFUN ( NA  ,
args   
)

DEFUN ( I  ,
args   
)

DEFUN ( realmin  ,
args   
)

DEFUN ( realmax  ,
args   
)

DEFUN ( pi  ,
args   
)

DEFUN ( eps  ,
args   
)

DEFUN ( e  ,
args   
)

DEFUN ( NaN  ,
args   
)

DEFUN ( Inf  ,
args   
)

DEFUN ( zeros  ,
args   
)

DEFUN ( ones  ,
args   
)

DEFUN ( ismatrix  ,
args   
)

DEFUN ( islist  ,
args   
)

DEFUN ( isnumeric  ,
args   
)

DEFUN ( isempty  ,
args   
)

DEFUN ( isreal  ,
args   
)

DEFUN ( complex  ,
args   
)

DEFUN ( isfloat  ,
args   
)

DEFUN ( iscomplex  ,
args   
)

DEFUN ( isinteger  ,
args   
)

DEFUN ( islogical  ,
args   
)

DEFUN ( sumsq  ,
args   
)

DEFUN ( sum  ,
args   
)

DEFUN ( columns  ,
args   
)

DEFUN ( rows  ,
args   
)

DEFUN ( nzmax  ,
args   
)

DEFUN ( nnz  ,
args   
)

DEFUN ( size_equal  ,
args   
)

DEFUN ( size  ,
args  ,
nargout   
)

DEFUN ( numel  ,
args   
)

DEFUN ( ndims  ,
args   
)

DEFUN ( length  ,
args   
)

DEFUN ( ipermute  ,
args   
)

DEFUN ( permute  ,
args   
)

DEFUN ( cat  ,
args   
)

DEFUN ( vertcat  ,
args   
)

DEFUN ( horzcat  ,
args   
)

DEFUN ( prod  ,
args   
)

DEFUN ( diag  ,
args   
)

DEFUN ( cumsum  ,
args   
)

DEFUN ( cumprod  ,
args   
)

DEFUN ( fmod  ,
args   
)

DEFUN ( log2  ,
args  ,
nargout   
)

DEFUN ( hypot  ,
args   
)

DEFUN ( atan2  ,
args   
)

DEFUN ( any  ,
args   
)

DEFUN ( all  ,
args   
)

template<class MT >
octave_value identity_matrix ( int  nr,
int  nc 
) [inline]

INSTANTIATE_EYE ( boolNDArray   ) 

INSTANTIATE_EYE ( NDArray   ) 

INSTANTIATE_EYE ( FloatNDArray   ) 

INSTANTIATE_EYE ( int8NDArray   ) 

template<typename T , typename ET >
void map_2_xlog2 ( const Array< T > &  x,
Array< T > &  f,
Array< ET > &  e 
) [inline]