#include <sys/types.h>
#include <sys/times.h>
#include <cfloat>
#include <ctime>
#include <string>
#include "lo-ieee.h"
#include "lo-math.h"
#include "oct-time.h"
#include "str-vec.h"
#include "quit.h"
#include "mx-base.h"
#include "oct-binmap.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-class.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"
Go to the source code of this file.
Defines | |
#define | ANY_ALL(FCN) |
#define | BTYP_BRANCH(X, EX) |
#define | DATA_REDUCTION(FCN) |
#define | INSTANTIATE_EYE(T) template octave_value identity_matrix<T> (int, int) |
#define | MAKE_INT_BRANCH(X) |
#define | MAKE_INT_BRANCH(X) |
#define | MAKE_INT_BRANCH(X) |
#define | MAKE_INT_BRANCH(X) |
#define | MAKE_INT_BRANCH(X) |
#define | MAKE_INT_BRANCH(X) |
#define | MAKE_INT_BRANCH(INTX) |
#define | NATIVE_REDUCTION(FCN, BOOL_FCN) |
#define | NATIVE_REDUCTION_1(FCN, TYPE, DIM) |
Functions | |
static bool | all_scalar_1x1 (const octave_value_list &args) |
static octave_value | attempt_type_conversion (const octave_value &ov, std::string dtype) |
static octave_value | binary_assoc_op_defun_body (octave_value::binary_op op, octave_value::assign_op aop, const octave_value_list &args) |
static octave_value | binary_op_defun_body (octave_value::binary_op op, const octave_value_list &args) |
DEFALIAS (i, I) | |
DEFALIAS (J, I) | |
DEFALIAS (ifelse, merge) | |
DEFALIAS (j, I) | |
DEFALIAS (isbool, islogical) | |
DEFALIAS (inf, Inf) | |
DEFALIAS (nan, NaN) | |
DEFUN (__accumarray_max__, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __accumarray_max__ (@var{idx}, @var{vals}, @var{zero}, @var{n})\n\ Undocumented internal function.\n\ @end deftypefn") | |
DEFUN (__accumarray_min__, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __accumarray_min__ (@var{idx}, @var{vals}, @var{zero}, @var{n})\n\ Undocumented internal function.\n\ @end deftypefn") | |
DEFUN (diff, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} diff (@var{x})\n\ @deftypefnx {Built-in Function} {} diff (@var{x}, @var{k})\n\ @deftypefnx {Built-in Function} {} diff (@var{x}, @var{k}, @var{dim})\n\ If @var{x} is a vector of length @math{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\ the 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\ an empty matrix is returned.\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 (__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 (__accumdim_sum__, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __accumdim_sum__ (@var{idx}, @var{vals}, @var{dim}, @var{n})\n\ Undocumented internal function.\n\ @end deftypefn") | |
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\n\ @code{sort}. In other words, the result is equivalent to\n\ @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\n\ defined by @var{dim}, or the first non-singleton dimension if @var{dim} is\n\ not given.\n\ \n\ nth_element encapsulates the C++ standard library algorithms nth_element and\n\ partial_sort. On average, the complexity of the operation is O(M*log(K)),\n\ where @w{@code{M = size (@var{x}, @var{dim})}} and\n\ @w{@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 (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 (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\ Merge elements of @var{true_val} and @var{false_val}, depending on the\n\ value of @var{mask}. If @var{mask} is a logical scalar, the other two\n\ arguments can be arbitrary values. Otherwise, @var{mask} must be a logical\n\ array, and @var{tval}, @var{fval} should be arrays of matching class, or\n\ cell arrays. In the scalar mask case, @var{tval} is returned if @var{mask}\n\ is true, otherwise @var{fval} is returned.\n\ \n\ In the array mask case, both @var{tval} and @var{fval} must be either\n\ scalars or arrays with dimensions equal to @var{mask}. The result is\n\ constructed as follows:\n\ \n\ @example\n\ @group\n\ result(mask) = tval(mask);\n\ result(! mask) = fval(! mask);\n\ @end group\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") | |
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 (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 within columns\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\ 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\ 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\ For equal elements, the indices are such that equal elements are listed\n\ in the order in which they appeared in the original list.\n\ \n\ Sorting of complex entries is done first by magnitude (@code{abs (@var{z})})\n\ and for any ties by phase angle (@code{angle (z)}). For example:\n\ \n\ @example\n\ @group\n\ sort ([1+i; 1; 1-i])\n\ @result{} 1 + 0i\n\ 1 - 1i\n\ 1 + 1i\n\ @end group\n\ @end example\n\ \n\ NaN values are treated as being greater than any other value and are sorted\n\ to the end of the list.\n\ \n\ The @code{sort} function may also be used to sort strings and cell arrays\n\ of strings, in which case ASCII dictionary order (uppercase 'A' precedes\n\ lowercase 'a') 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 (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 (toc, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} toc ()\n\ See tic.\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 (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\ Return the logical OR of @var{x} and @var{y}.\n\ This function is equivalent to @w{@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 required.\n\ @seealso{and, not, xor}\n\ @end deftypefn") | |
DEFUN (size, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} size (@var{a})\n\ @deftypefnx {Built-in Function} {} size (@var{a}, @var{dim})\n\ Return the number of 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 (ldivide, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ldivide (@var{x}, @var{y})\n\ Return the element-by-element left division of @var{x} and @var{y}.\n\ This function and @w{@xcode{x .\\ y}} are equivalent.\n\ @seealso{rdivide, mldivide}\n\ @end deftypefn") | |
DEFUN (power, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} power (@var{x}, @var{y})\n\ Return the element-by-element operation of @var{x} raised to the\n\ @var{y} power. If several complex results are possible,\n\ returns the one with smallest non-negative argument (angle). Use\n\ @code{realpow}, @code{realsqrt}, @code{cbrt}, or @code{nthroot} if a\n\ real result is preferred.\n\ \n\ This function and @w{@xcode{x .^ y}} are equivalent.\n\ @seealso{mpower, realpow, realsqrt, cbrt, nthroot}\n\ @end deftypefn") | |
DEFUN (rdivide, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} rdivide (@var{x}, @var{y})\n\ Return the element-by-element right division of @var{x} and @var{y}.\n\ This function and @w{@xcode{x ./ y}} are equivalent.\n\ @seealso{ldivide, mrdivide}\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 or no argument, size_equal returns true.\n\ @seealso{size, numel}\n\ @end deftypefn") | |
DEFUN (ne, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ne (@var{x}, @var{y})\n\ Return true if the two inputs are not equal.\n\ This function is equivalent to @w{@code{x != y}}.\n\ @seealso{eq, isequal}\n\ @end deftypefn") | |
DEFUN (I, args,,"-*- texinfo -*-\n\ @c List other forms of function in documentation index\n\ @findex i\n\ @findex j\n\ @findex J\n\ \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") | |
DEFUN (rem, args,,"-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} rem (@var{x}, @var{y})\n\ @deftypefnx {Mapping Function} {} fmod (@var{x}, @var{y})\n\ Return the remainder of the division @code{@var{x} / @var{y}}, computed\n\ using the expression\n\ \n\ @example\n\ x - y .* fix (x ./ y)\n\ @end example\n\ \n\ An error message is printed if the dimensions of the arguments do not\n\ agree, or if either of the arguments is complex.\n\ @seealso{mod}\n\ @end deftypefn") | |
DEFUN (repelems, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} repelems (@var{x}, @var{r})\n\ Construct a vector of repeated elements from @var{x}. @var{r}\n\ is a 2x@var{N} integer matrix specifying which elements to repeat and\n\ how often to repeat each element.\n\ \n\ Entries in the first row, @var{r}(1,j), select an element to repeat.\n\ The corresponding entry in the second row, @var{r}(2,j), specifies\n\ the repeat count. If @var{x} is a matrix then the columns of @var{x} are\n\ imagined to be stacked on top of each other for purposes of the selection\n\ index. A row vector is always returned.\n\ \n\ Conceptually the result is calculated as follows:\n\ \n\ @example\n\ @group\n\ y = [];\n\ for i = 1:columns (@var{r})\n\ y = [y, @var{x}(@var{r}(1,i)*ones(1, @var{r}(2,i)))];\n\ endfor\n\ @end group\n\ @end example\n\ @seealso{repmat}\n\ @end deftypefn") | |
DEFUN (le, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} le (@var{x}, @var{y})\n\ This function is equivalent to @w{@code{x <= y}}.\n\ @end deftypefn") | |
DEFUN (nnz, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{scalar} =} nnz (@var{a})\n\ Return the number of non zero elements in @var{a}.\n\ @seealso{sparse}\n\ @end deftypefn") | |
DEFUN (mldivide, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} mldivide (@var{x}, @var{y})\n\ Return the matrix left division of @var{x} and @var{y}.\n\ This function and @w{@xcode{x \\ y}} are equivalent.\n\ @seealso{mrdivide, ldivide}\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 (mrdivide, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} mrdivide (@var{x}, @var{y})\n\ Return the matrix right division of @var{x} and @var{y}.\n\ This function and @w{@xcode{x / y}} are equivalent.\n\ @seealso{mldivide, rdivide}\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\ Return the matrix multiplication product of inputs.\n\ This function and @w{@xcode{x * y}} are equivalent.\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 required.\n\ @seealso{times}\n\ @end deftypefn") | |
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\ 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\ @seealso{true}\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\ \n\ Arrays may also be concatenated horizontally using the syntax for creating\n\ new matrices. For example:\n\ \n\ @example\n\ @var{hcat} = [ @var{array1}, @var{array2}, @dots{} ];\n\ @end example\n\ @seealso{cat, vertcat}\n\ @end deftypefn") | |
DEFUN (isempty, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isempty (@var{a})\n\ Return true if @var{a} is an empty matrix (any one of its dimensions is\n\ zero). Otherwise, return false.\n\ @seealso{isnull}\n\ @end deftypefn") | |
DEFUN (ctranspose, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ctranspose (@var{x})\n\ Return the complex conjugate transpose of @var{x}.\n\ This function and @xcode{x'} are equivalent.\n\ @seealso{transpose}\n\ @end deftypefn") | |
DEFUN (mod, args,,"-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} mod (@var{x}, @var{y})\n\ Compute the modulo of @var{x} and @var{y}. Conceptually this is given by\n\ \n\ @example\n\ x - y .* floor (x ./ y)\n\ @end example\n\ \n\ @noindent\n\ and is written such that the correct modulus is returned for\n\ integer types. This function handles negative values correctly. That\n\ is, @code{mod (-1, 3)} is 2, not -1, as @code{rem (-1, 3)} returns.\n\ @code{mod (@var{x}, 0)} returns @var{x}.\n\ \n\ An error results if the dimensions of the arguments do not agree, or if\n\ either of the arguments is complex.\n\ @seealso{rem}\n\ @end deftypefn") | |
DEFUN (uminus, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} uminus (@var{x})\n\ This function and @w{@xcode{- x}} are equivalent.\n\ @end deftypefn") | |
DEFUN (uplus, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} uplus (@var{x})\n\ This function and @w{@xcode{+ x}} are equivalent.\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{columns, size, length, numel, isscalar, isvector, ismatrix}\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\ 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\ @seealso{false}\n\ @end deftypefn") | |
DEFUN (norm, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} norm (@var{A})\n\ @deftypefnx {Built-in Function} {} norm (@var{A}, @var{p})\n\ @deftypefnx {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 @var{opt} is the value @code{\"rows\"}, treat each row as a vector and\n\ compute its norm. The result is returned as a column vector.\n\ Similarly, if @var{opt} is @code{\"columns\"} or @code{\"cols\"} then compute\n\ the norms of each column and return a row vector.\n\ @seealso{cond, svd}\n\ @end deftypefn") | |
DEFUN (full, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{FM} =} full (@var{SM})\n\ Return a full storage matrix from a sparse, diagonal, permutation matrix\n\ or a range.\n\ @seealso{sparse}\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 (columns, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} columns (@var{a})\n\ Return the number of columns of @var{a}.\n\ @seealso{rows, size, length, numel, isscalar, isvector, ismatrix}\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{m} @var{n} @dots{}])\n\ @deftypefnx {Built-in Function} {} reshape (@var{A}, @dots{}, [], @dots{})\n\ @deftypefnx {Built-in Function} {} reshape (@var{A}, @var{size})\n\ Return a matrix with the specified dimensions (@var{m}, @var{n}, @dots{})\n\ whose elements are taken from the matrix @var{A}. The elements of the\n\ matrix are accessed in column-major order (like Fortran arrays are stored).\n\ \n\ The following code demonstrates reshaping a 1x4 row vector into a 2x2 square\n\ matrix.\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 (@code{prod (size (@var{A}))}) must match the total number of elements\n\ in the new matrix (@code{prod ([@var{m} @var{n} @dots{}])}).\n\ \n\ A single dimension of the return matrix may be left unspecified and Octave\n\ will determine its size automatically. An empty matrix ([]) is used to flag\n\ the unspecified dimension.\n\ @seealso{resize}\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}, @dots{})\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}.\n\ If @var{m}, @var{n}, @dots{} are all scalars, then the dimensions of\n\ the result are @var{m}-by-@var{n}-by-@dots{}.\n\ If given a vector as input, then the\n\ dimensions of the result are given by the elements of that vector.\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 (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\n\ precision 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,\n\ 'extra' is 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\ \n\ @example\n\ sum (x .* conj (x), dim)\n\ @end example\n\ \n\ @noindent\n\ but it uses less memory and avoids calling @code{conj} if @var{x} is real.\n\ @seealso{sum}\n\ @end deftypefn") | |
DEFUN (eye, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} eye (@var{n})\n\ @deftypefnx {Built-in Function} {} eye (@var{m}, @var{n})\n\ @deftypefnx {Built-in Function} {} eye ([@var{m} @var{n}])\n\ @deftypefnx {Built-in Function} {} eye (@dots{}, @var{class})\n\ Return an identity matrix. If invoked with a single scalar argument @var{n},\n\ return a square @nospell{NxN} identity matrix. If\n\ supplied two scalar arguments (@var{m}, @var{n}), @code{eye} takes them to be\n\ the number of rows and columns. If given a vector with two elements,\n\ @code{eye} uses 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. Any negative dimensions are treated as zero. \n\ These odd definitions are for compatibility with @sc{matlab}.\n\ @seealso{speye}\n\ @end deftypefn") | |
DEFUN (any, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} any (@var{x})\n\ @deftypefnx {Built-in Function} {} any (@var{x}, @var{dim})\n\ For a vector argument, return true (logical 1) if any element of the vector\n\ is nonzero.\n\ \n\ For a matrix argument, return a row vector of logical 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\ @seealso{all}\n\ @end deftypefn") | |
DEFUN (hypot, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} hypot (@var{x}, @var{y})\n\ @deftypefnx {Built-in Function} {} hypot (@var{x}, @var{y}, @var{z}, @dots{})\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\ @code{hypot} can also be called with more than 2 arguments; in this case,\n\ the arguments are accumulated from left to right:\n\ \n\ @example\n\ @group\n\ hypot (hypot (@var{x}, @var{y}), @var{z})\n\ hypot (hypot (hypot (@var{x}, @var{y}), @var{z}), @var{w}), etc.\n\ @end group\n\ @end example\n\ @end deftypefn") | |
DEFUN (islogical, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} islogical (@var{x})\n\ @deftypefnx {Built-in Function} {} isbool (@var{x})\n\ Return true if @var{x} is a logical object.\n\ @seealso{isfloat, isinteger, ischar, isnumeric, isa}\n\ @end deftypefn") | |
DEFUN (linspace, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} linspace (@var{base}, @var{limit})\n\ @deftypefnx {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 endpoints @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, or both, of them are column\n\ vectors, @code{linspace} returns a matrix.\n\ \n\ For compatibility with @sc{matlab}, return the second argument (@var{limit})\n\ if fewer than two values are requested.\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 (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 @w{@code{isinteger (14)}} is false because numeric constants in\n\ Octave are double precision floating point values.\n\ @seealso{isfloat, ischar, islogical, isnumeric, isa}\n\ @end deftypefn") | |
DEFUN (vec, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{v} =} vec (@var{x})\n\ @deftypefnx {Built-in Function} {@var{v} =} vec (@var{x}, @var{dim})\n\ Return the vector obtained by stacking the columns of the matrix @var{x}\n\ one above the other. Without @var{dim} this is equivalent to\n\ @code{@var{x}(:)}. If @var{dim} is supplied, the dimensions of @var{v}\n\ are set to @var{dim} with all elements along the last dimension.\n\ This is equivalent to @code{shiftdim (@var{x}(:), 1-@var{dim})}.\n\ @seealso{vech}\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\ @seealso{isreal, isnumeric}\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\ Objects of class double or single are floating-point objects.\n\ @seealso{isinteger, ischar, islogical, isnumeric, isa}\n\ @end deftypefn") | |
DEFUN (not, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} not (@var{x})\n\ Return the logical NOT of @var{x}. This function is equivalent to\n\ @code{! x}.\n\ @seealso{and, or, xor}\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\ @group\n\ complex ([1, 2], [3, 4])\n\ @result{}\n\ 1 + 3i 2 + 4i\n\ @end group\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 non-complex matrix or scalar.\n\ For compatibility with @sc{matlab}, this includes logical and character\n\ matrices.\n\ @seealso{iscomplex, isnumeric}\n\ @end deftypefn") | |
DEFUN (transpose, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} transpose (@var{x})\n\ Return the transpose of @var{x}.\n\ This function and @xcode{x.'} are equivalent.\n\ @seealso{ctranspose}\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\ @deftypefnx {Built-in Function} {} cumsum (@dots{}, 'double')\n\ @deftypefnx {Built-in Function} {} cumsum (@dots{}, 'extra')\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\ See @code{sum} for an explanation of the optional parameters 'native',\n\ 'double', and 'extra'.\n\ @seealso{sum, cumprod}\n\ @end deftypefn") | |
DEFUN (diag, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{M} =} diag (@var{v})\n\ @deftypefnx {Built-in Function} {@var{M} =} diag (@var{v}, @var{k})\n\ @deftypefnx {Built-in Function} {@var{M} =} diag (@var{v}, @var{m}, @var{n})\n\ @deftypefnx {Built-in Function} {@var{v} =} diag (@var{M})\n\ @deftypefnx {Built-in Function} {@var{v} =} diag (@var{M}, @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\ The 3-input form returns a diagonal matrix with vector @var{v} on the main\n\ diagonal and the resulting matrix being of size @var{m} rows x @var{n}\n\ columns.\n\ \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 (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 (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 (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 (issorted, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} issorted (@var{a})\n\ @deftypefnx {Built-in Function} {} issorted (@var{a}, @var{mode})\n\ @deftypefnx {Built-in Function} {} issorted (@var{a}, \"rows\", @var{mode})\n\ Return true if the array is sorted according to @var{mode}, which\n\ may be either \"ascending\", \"descending\", or \"either\". By default,\n\ @var{mode} is \"ascending\". NaNs are treated in the same manner as\n\ @code{sort}.\n\ \n\ If the optional argument \"rows\" is supplied, check whether\n\ the array is sorted by rows as output by the function @code{sortrows}\n\ (with no options).\n\ \n\ This function does not support sparse matrices.\n\ @seealso{sort, sortrows}\n\ @end deftypefn\n") | |
DEFUN (NaN, args,,"-*- texinfo -*-\n\ @c List other form of function in documentation index\n\ @findex nan\n\ \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") | |
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 (Inf, args,,"-*- texinfo -*-\n\ @c List other form of function in documentation index\n\ @findex inf\n\ \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\ \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") | |
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\ Return the logical AND of @var{x} and @var{y}.\n\ This function is equivalent to @w{@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 required.\n\ @seealso{or, not, xor}\n\ @end deftypefn") | |
DEFUN (ones, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ones (@var{n})\n\ @deftypefnx {Built-in Function} {} ones (@var{m}, @var{n})\n\ @deftypefnx {Built-in Function} {} ones (@var{m}, @var{n}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} ones ([@var{m} @var{n} @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 @var{n}, return a square\n\ @nospell{NxN} matrix. If invoked with two or more scalar\n\ integer arguments, or a vector of integer values, return an array with\n\ the 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 (m, n)\n\ @end example\n\ \n\ The optional argument @var{class} specifies the class of the return array\n\ and defaults to double. For example:\n\ \n\ @example\n\ val = ones (m,n, \"uint8\")\n\ @end example\n\ @seealso{zeros}\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\ Return the element-by-element multiplication product of inputs.\n\ This function and @w{@xcode{x .* y}} are equivalent.\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 required.\n\ @seealso{mtimes}\n\ @end deftypefn") | |
DEFUN (gt, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} gt (@var{x}, @var{y})\n\ This function is equivalent to @w{@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 @w{@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 @w{@code{x < y}}.\n\ @end deftypefn") | |
DEFUN (mpower, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} mpower (@var{x}, @var{y})\n\ Return the matrix power operation of @var{x} raised to the @var{y} power.\n\ This function and @w{@xcode{x ^ y}} are equivalent.\n\ @seealso{power}\n\ @end deftypefn") | |
DEFUN (ismatrix, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ismatrix (@var{a})\n\ Return true if @var{a} is a numeric, logical, or character matrix.\n\ Scalars (1x1 matrices) and vectors (@nospell{1xN} or @nospell{Nx1} matrices)\n\ are subsets of the more general N-dimensional matrix and @code{ismatrix}\n\ will return true for these objects as well.\n\ @seealso{isscalar, isvector, iscell, isstruct, issparse}\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\ \n\ Arrays may also be concatenated vertically using the syntax for creating\n\ new matrices. For example:\n\ \n\ @example\n\ @var{vcat} = [ @var{array1}; @var{array2}; @dots{} ];\n\ @end example\n\ @seealso{cat, horzcat}\n\ @end deftypefn") | |
DEFUN (isnumeric, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isnumeric (@var{x})\n\ Return true if @var{x} is a numeric object, i.e., an integer, real, or\n\ complex array. Logical and character arrays are not considered to be\n\ numeric.\n\ @seealso{isinteger, isfloat, isreal, iscomplex, islogical, ischar, iscell, isstruct}\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 and @w{@xcode{x + y}} are equivalent.\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 required.\n\ @seealso{minus}\n\ @end deftypefn") | |
DEFUN (minus, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} minus (@var{x}, @var{y})\n\ This function and @w{@xcode{x - y}} are equivalent.\n\ @seealso{plus}\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{} 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\ \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 (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 (eq, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} eq (@var{x}, @var{y})\n\ Return true if the two inputs are equal.\n\ This function is equivalent to @w{@code{x == y}}.\n\ @seealso{ne, isequal}\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 only once).\n\ @seealso{ipermute}\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 (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\ \n\ @noindent\n\ returns the original array @var{A}.\n\ @seealso{permute}\n\ @end deftypefn") | |
DEFUN (zeros, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} zeros (@var{n})\n\ @deftypefnx {Built-in Function} {} zeros (@var{m}, @var{n})\n\ @deftypefnx {Built-in Function} {} zeros (@var{m}, @var{n}, @var{k}, @dots{})\n\ @deftypefnx {Built-in Function} {} zeros ([@var{m} @var{n} @dots{}])\n\ @deftypefnx {Built-in Function} {} zeros (@dots{}, @var{class})\n\ Return a matrix or N-dimensional array whose elements are all 0.\n\ If invoked with a single scalar integer argument, return a square\n\ @nospell{NxN} matrix. If invoked with two or more scalar\n\ integer arguments, or a vector of integer values, return an array with\n\ the given dimensions.\n\ \n\ The optional argument @var{class} specifies the class of the return array\n\ and defaults to double. For example:\n\ \n\ @example\n\ val = zeros (m,n, \"uint8\")\n\ @end example\n\ @seealso{ones}\n\ @end deftypefn") | |
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 (all, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} all (@var{x})\n\ @deftypefnx {Built-in Function} {} all (@var{x}, @var{dim})\n\ For a vector argument, return true (logical 1) if all elements of the vector\n\ are nonzero.\n\ \n\ For a matrix argument, return a row vector of logical ones and\n\ zeros with each element indicating whether all of the elements of the\n\ corresponding column of the matrix are nonzero. For example:\n\ \n\ @example\n\ @group\n\ all ([2, 3; 1, 0]))\n\ @result{} [ 1, 0 ]\n\ @end group\n\ @end example\n\ \n\ If the optional argument @var{dim} is supplied, work along dimension\n\ @var{dim}.\n\ @seealso{any}\n\ @end deftypefn") | |
DEFUN (ndims, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ndims (@var{a})\n\ Return the number of dimensions of @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\ \n\ @example\n\ @group\n\ ndims (ones (4, 1, 2, 1))\n\ @result{} 3\n\ @end group\n\ @end example\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\ Return 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\ \n\ @example\n\ @var{a}(@var{idx1}, @var{idx2}, @dots{})\n\ @end example\n\ \n\ Note that the indices do not have to be numerical. For example,\n\ \n\ @example\n\ @group\n\ @var{a} = 1;\n\ @var{b} = ones (2, 3);\n\ numel (@var{a}, @var{b});\n\ @end group\n\ @end example\n\ \n\ @noindent\n\ will return 6, as this is the number of ways to index with @var{b}.\n\ \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") | |
template<class NDT > | |
static NDT | do_accumarray_minmax (const idx_vector &idx, const NDT &vals, octave_idx_type n, bool ismin, const typename NDT::element_type &zero_val) |
static octave_value_list | do_accumarray_minmax_fun (const octave_value_list &args, bool ismin) |
template<class NDT > | |
static NDT | do_accumarray_sum (const idx_vector &idx, const NDT &vals, octave_idx_type n=-1) |
template<class NDT > | |
static NDT | do_accumdim_sum (const idx_vector &idx, const NDT &vals, int dim=-1, octave_idx_type n=-1) |
static octave_value | do_cat (const octave_value_list &xargs, int dim, std::string fname) |
octave_value | do_class_concat (const octave_value_list &ovl, std::string cattype, int dim) |
static octave_value | do_diff (const octave_value &array, octave_idx_type order, int dim=-1) |
static octave_value | do_hypot (const octave_value &x, const octave_value &y) |
template<class MT > | |
static octave_value | do_linspace (const octave_value &base, const octave_value &limit, octave_idx_type n) |
template<class NDT > | |
static NDT | do_merge (const Array< bool > &mask, const NDT &tval, const NDT &fval) |
static octave_value | do_permute (const octave_value_list &args, bool inv) |
template<class T > | |
static Array< T > | do_repelems (const Array< T > &src, const Array< octave_idx_type > &rep) |
template<class TYPE > | |
static TYPE | do_single_type_concat (const octave_value_list &args, int dim) |
static octave_map | do_single_type_concat_map (const octave_value_list &args, int dim) |
template<class SparseT > | |
static SparseT | do_sparse_diff (const SparseT &array, octave_idx_type order, int dim) |
static octave_value | fill_matrix (const octave_value_list &args, double val, float fval, const char *fcn) |
static octave_value | fill_matrix (const octave_value_list &args, double val, const char *fcn) |
static octave_value | fill_matrix (const octave_value_list &args, bool val, const char *fcn) |
static octave_value | fill_matrix (const octave_value_list &args, const Complex &val, const char *fcn) |
static octave_value | fill_matrix (const octave_value_list &args, int val, const char *fcn) |
static sortmode | get_sort_mode_option (const octave_value &arg, const char *argn) |
static octave_value | identity_matrix (int nr, int nc, oct_data_conv::data_type dt) |
template<class MT > | |
octave_value | identity_matrix (int nr, int nc) |
INSTANTIATE_EYE (int8NDArray) | |
INSTANTIATE_EYE (FloatNDArray) | |
INSTANTIATE_EYE (boolNDArray) | |
INSTANTIATE_EYE (NDArray) | |
template<typename T , typename ET > | |
void | map_2_xlog2 (const Array< T > &x, Array< T > &f, Array< ET > &e) |
template<class TYPE , class T > | |
static void | single_type_concat (Array< T > &result, const octave_value_list &args, int dim) |
template<class TYPE , class T > | |
static void | single_type_concat (Sparse< T > &result, const octave_value_list &args, int dim) |
template<class MAP > | |
static void | single_type_concat_map (octave_map &result, const octave_value_list &args, int dim) |
static octave_value | unary_op_defun_body (octave_value::unary_op op, const octave_value_list &args) |
Variables | |
static double | tic_toc_timestamp = -1.0 |
#define ANY_ALL | ( | FCN | ) |
\ 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
Definition at line 83 of file data.cc.
Referenced by DEFUN().
#define BTYP_BRANCH | ( | X, | ||
EX | ||||
) |
case btyp_ ## X: \ retval = do_repelems (x.EX ## _value (), r); \ break
Referenced by DEFUN(), and DEFUN_DLD().
#define INSTANTIATE_EYE | ( | T | ) | template octave_value identity_matrix<T> (int, int) |
#define MAKE_INT_BRANCH | ( | X | ) |
case btyp_ ## X: \ retval = do_accumarray_minmax (idx, vals.X ## _array_value (), n, ismin, \ zero.X ## _scalar_value ()); \ break
#define MAKE_INT_BRANCH | ( | X | ) |
case btyp_ ## X: \ { \ X##NDArray a0 = args(0).X##_array_value (); \ X##NDArray a1 = args(1).X##_array_value (); \ retval = binmap<octave_##X,octave_##X,octave_##X> (a0, a1, rem, "rem"); \ } \ break
Definition at line 6797 of file data.cc.
Referenced by DEFUN(), do_accumarray_minmax_fun(), do_cumminmax_body(), do_extended_gcd(), do_minmax_body(), and do_simple_gcd().
#define MAKE_INT_BRANCH | ( | X | ) |
#define MAKE_INT_BRANCH | ( | X | ) |
#define MAKE_INT_BRANCH | ( | X | ) |
#define MAKE_INT_BRANCH | ( | X | ) |
#define MAKE_INT_BRANCH | ( | INTX | ) |
#define NATIVE_REDUCTION_1 | ( | FCN, | ||
TYPE, | ||||
DIM | ||||
) |
static bool all_scalar_1x1 | ( | const octave_value_list & | args | ) | [static] |
static octave_value attempt_type_conversion | ( | const octave_value & | ov, | |
std::string | dtype | |||
) | [static] |
static octave_value binary_assoc_op_defun_body | ( | octave_value::binary_op | op, | |
octave_value::assign_op | aop, | |||
const octave_value_list & | args | |||
) | [static] |
Definition at line 5426 of file data.cc.
References octave_value::assign(), do_binary_op(), octave_value_list::length(), and print_usage().
Referenced by DEFUN().
static octave_value binary_op_defun_body | ( | octave_value::binary_op | op, | |
const octave_value_list & | args | |||
) | [static] |
Definition at line 5412 of file data.cc.
References do_binary_op(), octave_value_list::length(), and print_usage().
Referenced by DEFUN().
DEFALIAS | ( | i | , | |
I | ||||
) |
DEFALIAS | ( | J | , | |
I | ||||
) |
DEFALIAS | ( | ifelse | , | |
merge | ||||
) |
DEFALIAS | ( | j | , | |
I | ||||
) |
DEFALIAS | ( | isbool | , | |
islogical | ||||
) |
DEFALIAS | ( | inf | , | |
Inf | ||||
) |
DEFALIAS | ( | nan | , | |
NaN | ||||
) |
DEFUN | ( | __accumarray_max__ | , | |
args | ||||
) |
Definition at line 6655 of file data.cc.
References do_accumarray_minmax_fun().
DEFUN | ( | __accumarray_min__ | , | |
args | ||||
) |
Definition at line 6646 of file data.cc.
References do_accumarray_minmax_fun().
DEFUN | ( | diff | , | |
args | ||||
) |
Definition at line 7028 of file data.cc.
References do_diff(), error(), error_state, and print_usage().
DEFUN | ( | realmax | , | |
args | ||||
) |
Definition at line 4264 of file data.cc.
References fill_matrix().
DEFUN | ( | __accumarray_sum__ | , | |
args | ||||
) |
Definition at line 6503 of file data.cc.
References octave_value::array_value(), Range::base(), octave_value::complex_array_value(), do_accumarray_sum(), error_state, octave_value::float_array_value(), octave_value::float_complex_array_value(), gripe_wrong_type_arg(), Range::inc(), octave_value::is_bool_type(), octave_value::is_complex_type(), octave_value::is_numeric_type(), octave_value::is_range(), octave_value::is_single_type(), print_usage(), and octave_value::range_value().
DEFUN | ( | __accumdim_sum__ | , | |
args | ||||
) |
Definition at line 6694 of file data.cc.
References octave_value::array_value(), octave_value::complex_array_value(), do_accumdim_sum(), error_state, octave_value::float_array_value(), octave_value::float_complex_array_value(), gripe_wrong_type_arg(), octave_value::is_bool_type(), octave_value::is_complex_type(), octave_value::is_numeric_type(), octave_value::is_single_type(), and print_usage().
DEFUN | ( | nth_element | , | |
args | ||||
) |
Definition at line 6395 of file data.cc.
References octave_value::array_value(), btyp_complex, btyp_double, btyp_float, btyp_float_complex, octave_value::builtin_type(), octave_value::cellstr_value(), octave_value::complex_array_value(), octave_value::dims(), error(), error_state, dim_vector::first_non_singleton(), octave_value::float_array_value(), octave_value::float_complex_array_value(), gripe_wrong_type_arg(), octave_value::is_cellstr(), MAKE_INT_BRANCH, Array< T >::nth_element(), and print_usage().
DEFUN | ( | realmin | , | |
args | ||||
) |
Definition at line 4297 of file data.cc.
References fill_matrix().
DEFUN | ( | merge | , | |
args | ||||
) |
Definition at line 6805 of file data.cc.
References octave_value::array_value(), octave_value::bool_array_value(), octave_value::cell_value(), octave_value::char_array_value(), octave_value::class_name(), octave_value::complex_array_value(), do_merge(), error(), octave_value::float_array_value(), octave_value::float_complex_array_value(), octave_value::is_cell(), octave_value::is_complex_type(), octave_value::is_double_type(), octave_value::is_scalar_type(), octave_value::is_single_type(), octave_value::is_sq_string(), octave_value::is_string(), octave_value::is_true(), MAKE_INT_BRANCH, octave_value(), and print_usage().
DEFUN | ( | __sort_rows_idx__ | , | |
args | ||||
) |
Definition at line 6213 of file data.cc.
References arg(), error(), octave_value::is_sparse_type(), octave_value::ndims(), octave_value(), print_usage(), octave_value::sort_rows_idx(), and octave_value::string_value().
DEFUN | ( | sort | , | |
args | , | |||
nargout | ||||
) |
Definition at line 5873 of file data.cc.
References arg(), octave_value::dims(), error(), dim_vector::first_non_singleton(), print_usage(), octave_value_list::resize(), and octave_value::sort().
DEFUN | ( | cputime | , | |
args | ||||
) |
Definition at line 5806 of file data.cc.
References RUSAGE_SELF, and warning().
DEFUN | ( | toc | , | |
args | , | |||
nargout | ||||
) |
Definition at line 5772 of file data.cc.
References octave_time::double_value(), octave_stdout, and warning().
DEFUN | ( | tic | , | |
args | , | |||
nargout | ||||
) |
Definition at line 5699 of file data.cc.
References octave_time::double_value(), and warning().
DEFUN | ( | or | , | |
args | ||||
) |
Definition at line 5676 of file data.cc.
References binary_assoc_op_defun_body(), octave_value::op_el_or, and octave_value::op_el_or_eq.
DEFUN | ( | size | , | |
args | , | |||
nargout | ||||
) |
Definition at line 2476 of file data.cc.
References error(), error_state, dim_vector::length(), print_usage(), dim_vector::redim(), and octave_value_list::resize().
DEFUN | ( | ldivide | , | |
args | ||||
) |
Definition at line 5644 of file data.cc.
References binary_op_defun_body(), and octave_value::op_el_ldiv.
DEFUN | ( | power | , | |
args | ||||
) |
Definition at line 5628 of file data.cc.
References binary_op_defun_body(), and octave_value::op_el_pow.
DEFUN | ( | rdivide | , | |
args | ||||
) |
Definition at line 5617 of file data.cc.
References binary_op_defun_body(), and octave_value::op_el_div.
DEFUN | ( | size_equal | , | |
args | ||||
) |
Definition at line 2567 of file data.cc.
References octave_value::dims().
DEFUN | ( | ne | , | |
args | ||||
) |
Definition at line 5585 of file data.cc.
References binary_op_defun_body(), and octave_value::op_ne.
DEFUN | ( | I | , | |
args | ||||
) |
Definition at line 4330 of file data.cc.
References fill_matrix().
DEFUN | ( | rem | , | |
args | ||||
) |
Definition at line 518 of file data.cc.
References octave_value::array_value(), btyp_double, btyp_float, error(), gripe_wrong_type_arg(), octave_value::is_scalar_type(), MAKE_INT_BRANCH, panic_impossible, print_usage(), and xrem().
DEFUN | ( | repelems | , | |
args | ||||
) |
Definition at line 7149 of file data.cc.
References bool_array, BTYP_BRANCH, octave_value::builtin_type(), complex, Array< T >::dims(), error(), error_state, float_array, float_complex, float_complex_array, gripe_wrong_type_arg(), Array< T >::ndims(), Array< T >::numel(), print_usage(), Array< T >::rows(), and x.
DEFUN | ( | le | , | |
args | ||||
) |
Definition at line 5547 of file data.cc.
References binary_op_defun_body(), and octave_value::op_le.
DEFUN | ( | nnz | , | |
args | ||||
) |
Definition at line 2601 of file data.cc.
References octave_value::nnz(), and print_usage().
DEFUN | ( | mldivide | , | |
args | ||||
) |
Definition at line 5527 of file data.cc.
References binary_op_defun_body(), and octave_value::op_ldiv.
DEFUN | ( | nzmax | , | |
args | ||||
) |
Definition at line 2618 of file data.cc.
References octave_value::nzmax(), and print_usage().
DEFUN | ( | mrdivide | , | |
args | ||||
) |
Definition at line 5505 of file data.cc.
References binary_op_defun_body(), and octave_value::op_div.
DEFUN | ( | mtimes | , | |
args | ||||
) |
Definition at line 5484 of file data.cc.
References binary_assoc_op_defun_body(), octave_value::op_mul, and octave_value::op_mul_eq.
DEFUN | ( | NA | , | |
args | ||||
) |
Definition at line 4369 of file data.cc.
References fill_matrix(), lo_ieee_float_na_value(), and lo_ieee_na_value().
DEFUN | ( | false | , | |
args | ||||
) |
Definition at line 4403 of file data.cc.
References fill_matrix().
DEFUN | ( | isempty | , | |
args | ||||
) |
Definition at line 3333 of file data.cc.
References octave_value::is_empty(), and print_usage().
DEFUN | ( | ctranspose | , | |
args | ||||
) |
Definition at line 5378 of file data.cc.
References octave_value::op_hermitian, and unary_op_defun_body().
DEFUN | ( | uminus | , | |
args | ||||
) |
Definition at line 5336 of file data.cc.
References octave_value::op_uminus, and unary_op_defun_body().
DEFUN | ( | uplus | , | |
args | ||||
) |
Definition at line 5327 of file data.cc.
References octave_value::op_uplus, and unary_op_defun_body().
DEFUN | ( | rows | , | |
args | ||||
) |
Definition at line 2639 of file data.cc.
References print_usage(), and octave_value::rows().
DEFUN | ( | true | , | |
args | ||||
) |
Definition at line 4419 of file data.cc.
References fill_matrix().
DEFUN | ( | norm | , | |
args | ||||
) |
Definition at line 5130 of file data.cc.
References error(), error_state, gripe_wrong_type_arg(), octave_value::ndims(), octave_Inf, octave_value(), print_usage(), xcolnorms(), xfrobnorm(), xnorm(), and xrownorms().
DEFUN | ( | full | , | |
args | ||||
) |
Definition at line 5110 of file data.cc.
References octave_value::full_value(), and print_usage().
DEFUN | ( | squeeze | , | |
args | ||||
) |
Definition at line 5092 of file data.cc.
References print_usage(), and octave_value::squeeze().
DEFUN | ( | columns | , | |
args | ||||
) |
Definition at line 2656 of file data.cc.
References octave_value::columns(), and print_usage().
DEFUN | ( | reshape | , | |
args | ||||
) |
Definition at line 4884 of file data.cc.
References dim_vector::alloc(), error(), error_state, Array< T >::length(), dim_vector::numel(), print_usage(), and octave_value::reshape().
DEFUN | ( | resize | , | |
args | ||||
) |
Definition at line 4796 of file data.cc.
References error_state, Array< T >::length(), print_usage(), dim_vector::resize(), and octave_value::resize().
DEFUN | ( | sum | , | |
args | ||||
) |
Definition at line 2673 of file data.cc.
References boolNDArray::any(), SparseBoolMatrix::any(), arg(), octave_value::array_value(), octave_value::bool_array_value(), btyp_bool, btyp_complex, btyp_double, btyp_float, btyp_float_complex, octave_value::builtin_type(), octave_value::complex_array_value(), FloatComplexNDArray::dsum(), FloatNDArray::dsum(), error(), error_state, octave_value::float_array_value(), octave_value::float_complex_array_value(), gripe_wrong_type_arg(), octave_value::is_sparse_type(), MAKE_INT_BRANCH, print_usage(), octave_value::sparse_bool_matrix_value(), octave_value::sparse_complex_matrix_value(), octave_value::sparse_matrix_value(), boolNDArray::sum(), SparseBoolMatrix::sum(), FloatComplexNDArray::sum(), FloatNDArray::sum(), ComplexNDArray::sum(), SparseComplexMatrix::sum(), NDArray::sum(), SparseMatrix::sum(), warning(), ComplexNDArray::xsum(), and NDArray::xsum().
DEFUN | ( | sumsq | , | |
args | ||||
) |
Definition at line 2890 of file data.cc.
References DATA_REDUCTION.
DEFUN | ( | eye | , | |
args | ||||
) |
Definition at line 4550 of file data.cc.
References error_state, get_dimensions(), identity_matrix(), print_usage(), and oct_data_conv::string_to_data_type().
DEFUN | ( | hypot | , | |
args | ||||
) |
Definition at line 355 of file data.cc.
References do_hypot(), error_state, and print_usage().
DEFUN | ( | islogical | , | |
args | ||||
) |
Definition at line 2931 of file data.cc.
References octave_value::is_bool_type(), and print_usage().
DEFUN | ( | linspace | , | |
args | ||||
) |
Definition at line 4710 of file data.cc.
References error(), error_state, octave_value::is_complex_type(), octave_value::is_single_type(), and print_usage().
DEFUN | ( | isinteger | , | |
args | ||||
) |
Definition at line 2967 of file data.cc.
References octave_value::is_integer_type(), and print_usage().
DEFUN | ( | vec | , | |
args | ||||
) |
Definition at line 5024 of file data.cc.
References dim_vector::alloc(), arg(), error(), error_state, octave_value::magic_colon_t, octave_value::numel(), print_usage(), octave_value::reshape(), and octave_value::single_subsref().
DEFUN | ( | iscomplex | , | |
args | ||||
) |
Definition at line 2986 of file data.cc.
References octave_value::is_complex_type(), and print_usage().
DEFUN | ( | isfloat | , | |
args | ||||
) |
Definition at line 3003 of file data.cc.
References octave_value::is_float_type(), and print_usage().
DEFUN | ( | not | , | |
args | ||||
) |
Definition at line 5316 of file data.cc.
References octave_value::op_not, and unary_op_defun_body().
DEFUN | ( | complex | , | |
args | ||||
) |
Definition at line 3024 of file data.cc.
References arg(), octave_value::array_value(), Sparse< T >::cidx(), Sparse< T >::cols(), octave_value::complex_array_value(), octave_value::complex_value(), Sparse< T >::data(), Array< T >::dims(), Sparse< T >::dims(), octave_value::double_value(), error(), error_state, octave_value::float_array_value(), octave_value::float_complex_array_value(), octave_value::float_complex_value(), octave_value::float_value(), octave_value::is_complex_type(), octave_value::is_single_type(), octave_value::is_sparse_type(), Sparse< T >::nnz(), Array< T >::numel(), octave_value::numel(), octave_value(), print_usage(), Sparse< T >::ridx(), Sparse< T >::rows(), octave_value::sparse_complex_matrix_value(), octave_value::sparse_matrix_value(), SparseComplexMatrix, and Array< T >::xelem().
DEFUN | ( | isreal | , | |
args | ||||
) |
Definition at line 3314 of file data.cc.
References octave_value::is_real_type(), and print_usage().
DEFUN | ( | transpose | , | |
args | ||||
) |
Definition at line 5345 of file data.cc.
References octave_value::op_transpose, and unary_op_defun_body().
DEFUN | ( | pi | , | |
args | ||||
) |
Definition at line 4223 of file data.cc.
References atan(), and fill_matrix().
DEFUN | ( | eps | , | |
args | ||||
) |
Definition at line 4106 of file data.cc.
References error_state, fill_matrix(), lo_ieee_float_nan_value(), lo_ieee_nan_value(), pow(), powf(), xisinf(), and xisnan().
DEFUN | ( | e | , | |
args | ||||
) |
Definition at line 4072 of file data.cc.
References fill_matrix().
DEFUN | ( | issorted | , | |
args | ||||
) |
Definition at line 6284 of file data.cc.
References arg(), octave_value::dims(), error(), error_state, get_sort_mode_option(), octave_value::is_sorted(), octave_value::is_sorted_rows(), octave_value::is_sparse_type(), dim_vector::is_vector(), octave_value::ndims(), print_usage(), and octave_value::string_value().
DEFUN | ( | NaN | , | |
args | ||||
) |
Definition at line 4012 of file data.cc.
References fill_matrix(), lo_ieee_float_nan_value(), and lo_ieee_nan_value().
DEFUN | ( | length | , | |
args | ||||
) |
Definition at line 2386 of file data.cc.
References octave_value::length(), and print_usage().
DEFUN | ( | Inf | , | |
args | ||||
) |
Definition at line 3952 of file data.cc.
References fill_matrix(), lo_ieee_float_inf_value(), and lo_ieee_inf_value().
DEFUN | ( | and | , | |
args | ||||
) |
Definition at line 5655 of file data.cc.
References binary_assoc_op_defun_body(), octave_value::op_el_and, and octave_value::op_el_and_eq.
DEFUN | ( | ones | , | |
args | ||||
) |
Definition at line 3857 of file data.cc.
References fill_matrix().
DEFUN | ( | times | , | |
args | ||||
) |
Definition at line 5596 of file data.cc.
References binary_assoc_op_defun_body(), octave_value::op_el_mul, and octave_value::op_el_mul_eq.
DEFUN | ( | gt | , | |
args | ||||
) |
Definition at line 5576 of file data.cc.
References binary_op_defun_body(), and octave_value::op_gt.
DEFUN | ( | ge | , | |
args | ||||
) |
Definition at line 5567 of file data.cc.
References binary_op_defun_body(), and octave_value::op_ge.
DEFUN | ( | lt | , | |
args | ||||
) |
Definition at line 5538 of file data.cc.
References binary_op_defun_body(), and octave_value::op_lt.
DEFUN | ( | mpower | , | |
args | ||||
) |
Definition at line 5516 of file data.cc.
References binary_op_defun_body(), and octave_value::op_pow.
DEFUN | ( | ismatrix | , | |
args | ||||
) |
Definition at line 3388 of file data.cc.
References arg(), octave_value::is_matrix_type(), octave_value::is_range(), octave_value::is_scalar_type(), and print_usage().
DEFUN | ( | isnumeric | , | |
args | ||||
) |
Definition at line 3351 of file data.cc.
References octave_value::is_numeric_type(), and print_usage().
DEFUN | ( | plus | , | |
args | ||||
) |
Definition at line 5454 of file data.cc.
References binary_assoc_op_defun_body(), octave_value::op_add, and octave_value::op_add_eq.
DEFUN | ( | minus | , | |
args | ||||
) |
Definition at line 5474 of file data.cc.
References binary_op_defun_body(), and octave_value::op_sub.
DEFUN | ( | cat | , | |
args | ||||
) |
Definition at line 2116 of file data.cc.
References do_cat(), error(), error_state, and print_usage().
DEFUN | ( | eq | , | |
args | ||||
) |
Definition at line 5556 of file data.cc.
References binary_op_defun_body(), and octave_value::op_eq.
DEFUN | ( | permute | , | |
args | ||||
) |
Definition at line 2357 of file data.cc.
References do_permute().
DEFUN | ( | atan2 | , | |
args | ||||
) |
Definition at line 215 of file data.cc.
References octave_value::array_value(), atan2(), error(), gripe_wrong_type_arg(), octave_value::is_scalar_type(), and print_usage().
DEFUN | ( | ipermute | , | |
args | ||||
) |
Definition at line 2369 of file data.cc.
References do_permute().
DEFUN | ( | zeros | , | |
args | ||||
) |
Definition at line 3908 of file data.cc.
References fill_matrix().
DEFUN | ( | log2 | , | |
args | , | |||
nargout | ||||
) |
Definition at line 418 of file data.cc.
References f, gripe_wrong_type_arg(), map_2_xlog2(), print_usage(), and x.
DEFUN | ( | ndims | , | |
args | ||||
) |
Definition at line 2404 of file data.cc.
References octave_value::ndims(), and print_usage().
DEFUN | ( | numel | , | |
args | ||||
) |
Definition at line 2429 of file data.cc.
References dims_to_numel(), octave_value::numel(), and print_usage().
static NDT do_accumarray_minmax | ( | const idx_vector & | idx, | |
const NDT & | vals, | |||
octave_idx_type | n, | |||
bool | ismin, | |||
const typename NDT::element_type & | zero_val | |||
) | [static] |
Definition at line 6554 of file data.cc.
References error(), idx_vector::extent(), and idx_vector::length().
Referenced by do_accumarray_minmax_fun().
static octave_value_list do_accumarray_minmax_fun | ( | const octave_value_list & | args, | |
bool | ismin | |||
) | [static] |
Definition at line 6582 of file data.cc.
References octave_value::array_value(), btyp_bool, btyp_complex, btyp_double, btyp_float, btyp_float_complex, octave_value::builtin_type(), octave_value::complex_array_value(), do_accumarray_minmax(), error_state, octave_value::float_array_value(), octave_value::float_complex_array_value(), gripe_wrong_type_arg(), octave_value_list::length(), MAKE_INT_BRANCH, and print_usage().
Referenced by DEFUN().
static NDT do_accumarray_sum | ( | const idx_vector & | idx, | |
const NDT & | vals, | |||
octave_idx_type | n = -1 | |||
) | [static] |
Definition at line 6482 of file data.cc.
References error(), idx_vector::extent(), and idx_vector::length().
Referenced by DEFUN().
static NDT do_accumdim_sum | ( | const idx_vector & | idx, | |
const NDT & | vals, | |||
int | dim = -1 , |
|||
octave_idx_type | n = -1 | |||
) | [static] |
Definition at line 6666 of file data.cc.
References error(), idx_vector::extent(), dim_vector::first_non_singleton(), and idx_vector::length().
Referenced by DEFUN().
static octave_value do_cat | ( | const octave_value_list & | xargs, | |
int | dim, | |||
std::string | fname | |||
) | [static] |
octave_value do_class_concat | ( | const octave_value_list & | ovl, | |
std::string | cattype, | |||
int | dim | |||
) |
Definition at line 1604 of file data.cc.
Referenced by do_class_concat(), and tree_matrix::rvalue1().
static octave_value do_diff | ( | const octave_value & | array, | |
octave_idx_type | order, | |||
int | dim = -1 | |||
) | [static] |
Definition at line 6942 of file data.cc.
References octave_value::array_value(), octave_value::complex_array_value(), NDArray::diff(), ComplexNDArray::diff(), FloatNDArray::diff(), FloatComplexNDArray::diff(), intNDArray< T >::diff(), octave_value::dims(), do_sparse_diff(), dim_vector::first_non_singleton(), octave_value::float_array_value(), octave_value::float_complex_array_value(), octave_value::int16_array_value(), octave_value::int32_array_value(), octave_value::int64_array_value(), octave_value::int8_array_value(), octave_value::is_complex_type(), octave_value::is_int16_type(), octave_value::is_int32_type(), octave_value::is_int64_type(), octave_value::is_int8_type(), octave_value::is_integer_type(), octave_value::is_single_type(), octave_value::is_sparse_type(), octave_value::is_uint16_type(), octave_value::is_uint32_type(), octave_value::is_uint64_type(), octave_value::is_uint8_type(), dim_vector::length(), panic_impossible, octave_value::resize(), octave_value::sparse_complex_matrix_value(), octave_value::sparse_matrix_value(), octave_value::uint16_array_value(), octave_value::uint32_array_value(), octave_value::uint64_array_value(), and octave_value::uint8_array_value().
Referenced by DEFUN().
static octave_value do_hypot | ( | const octave_value & | x, | |
const octave_value & | y | |||
) | [static] |
Definition at line 303 of file data.cc.
References octave_value::array_value(), octave_value::float_array_value(), octave_value::float_value(), gripe_wrong_type_arg(), octave_value::is_complex_type(), octave_value::is_numeric_type(), octave_value::is_scalar_type(), octave_value::is_single_type(), octave_value::is_sparse_type(), octave_value::scalar_value(), and octave_value::sparse_matrix_value().
Referenced by DEFUN().
static octave_value do_linspace | ( | const octave_value & | base, | |
const octave_value & | limit, | |||
octave_idx_type | n | |||
) | [static] |
Definition at line 4668 of file data.cc.
References octave_value::is_scalar_type(), and linspace().
static NDT do_merge | ( | const Array< bool > & | mask, | |
const NDT & | tval, | |||
const NDT & | fval | |||
) | [static] |
Definition at line 6743 of file data.cc.
References Array< T >::data(), Array< T >::dims(), and error().
Referenced by DEFUN().
static octave_value do_permute | ( | const octave_value_list & | args, | |
bool | inv | |||
) | [static] |
Definition at line 2330 of file data.cc.
References error_state, Array< T >::length(), octave_value_list::length(), and print_usage().
Referenced by DEFUN().
static Array<T> do_repelems | ( | const Array< T > & | src, | |
const Array< octave_idx_type > & | rep | |||
) | [static] |
Definition at line 7117 of file data.cc.
References Array< T >::checkelem(), Array< T >::clear(), Array< T >::columns(), error(), Array< T >::fortran_vec(), Array< T >::ndims(), and Array< T >::rows().
static TYPE do_single_type_concat | ( | const octave_value_list & | args, | |
int | dim | |||
) | [static] |
static octave_map do_single_type_concat_map | ( | const octave_value_list & | args, | |
int | dim | |||
) | [static] |
static SparseT do_sparse_diff | ( | const SparseT & | array, | |
octave_idx_type | order, | |||
int | dim | |||
) | [static] |
static octave_value fill_matrix | ( | const octave_value_list & | args, | |
double | val, | |||
float | fval, | |||
const char * | fcn | |||
) | [static] |
Definition at line 3564 of file data.cc.
References check_dimensions(), dim_vector::chop_trailing_singletons(), oct_data_conv::dt_double, oct_data_conv::dt_single, error(), error_state, FloatNDArray, get_dimensions(), octave_value_list::length(), NDArray, dim_vector::resize(), and oct_data_conv::string_to_data_type().
static octave_value fill_matrix | ( | const octave_value_list & | args, | |
double | val, | |||
const char * | fcn | |||
) | [static] |
Definition at line 3645 of file data.cc.
References check_dimensions(), dim_vector::chop_trailing_singletons(), oct_data_conv::dt_double, oct_data_conv::dt_single, error(), error_state, FloatNDArray, get_dimensions(), octave_value_list::length(), NDArray, dim_vector::resize(), and oct_data_conv::string_to_data_type().
static octave_value fill_matrix | ( | const octave_value_list & | args, | |
bool | val, | |||
const char * | fcn | |||
) | [static] |
Definition at line 3806 of file data.cc.
References check_dimensions(), dim_vector::chop_trailing_singletons(), error(), error_state, get_dimensions(), octave_value_list::length(), and dim_vector::resize().
static octave_value fill_matrix | ( | const octave_value_list & | args, | |
const Complex & | val, | |||
const char * | fcn | |||
) | [static] |
Definition at line 3725 of file data.cc.
References check_dimensions(), dim_vector::chop_trailing_singletons(), ComplexNDArray, oct_data_conv::dt_double, oct_data_conv::dt_single, error(), error_state, FloatComplexNDArray, get_dimensions(), octave_value_list::length(), dim_vector::resize(), and oct_data_conv::string_to_data_type().
static octave_value fill_matrix | ( | const octave_value_list & | args, | |
int | val, | |||
const char * | fcn | |||
) | [static] |
Definition at line 3439 of file data.cc.
References check_dimensions(), dim_vector::chop_trailing_singletons(), oct_data_conv::dt_double, oct_data_conv::dt_int16, oct_data_conv::dt_int32, oct_data_conv::dt_int64, oct_data_conv::dt_int8, oct_data_conv::dt_logical, oct_data_conv::dt_single, oct_data_conv::dt_uint16, oct_data_conv::dt_uint32, oct_data_conv::dt_uint64, oct_data_conv::dt_uint8, error(), error_state, FloatNDArray, get_dimensions(), dim_vector::length(), octave_value_list::length(), NDArray, dim_vector::resize(), and oct_data_conv::string_to_data_type().
Referenced by DEFUN().
static sortmode get_sort_mode_option | ( | const octave_value & | arg, | |
const char * | argn | |||
) | [static] |
Definition at line 6261 of file data.cc.
References error(), error_state, and octave_value::string_value().
Referenced by DEFUN().
static octave_value identity_matrix | ( | int | nr, | |
int | nc, | |||
oct_data_conv::data_type | dt | |||
) | [static] |
Definition at line 4483 of file data.cc.
References oct_data_conv::dt_double, oct_data_conv::dt_int16, oct_data_conv::dt_int32, oct_data_conv::dt_int64, oct_data_conv::dt_int8, oct_data_conv::dt_logical, oct_data_conv::dt_single, oct_data_conv::dt_uint16, oct_data_conv::dt_uint32, oct_data_conv::dt_uint64, oct_data_conv::dt_uint8, error(), error_state, and f.
octave_value identity_matrix | ( | int | nr, | |
int | nc | |||
) |
INSTANTIATE_EYE | ( | int8NDArray | ) |
INSTANTIATE_EYE | ( | FloatNDArray | ) |
INSTANTIATE_EYE | ( | boolNDArray | ) |
INSTANTIATE_EYE | ( | NDArray | ) |
void map_2_xlog2 | ( | const Array< T > & | x, | |
Array< T > & | f, | |||
Array< ET > & | e | |||
) |
Definition at line 406 of file data.cc.
References Array< T >::dims(), Array< T >::numel(), x, Array< T >::xelem(), and xlog2().
Referenced by DEFUN().
static void single_type_concat | ( | Array< T > & | result, | |
const octave_value_list & | args, | |||
int | dim | |||
) | [static] |
static void single_type_concat | ( | Sparse< T > & | result, | |
const octave_value_list & | args, | |||
int | dim | |||
) | [static] |
static void single_type_concat_map | ( | octave_map & | result, | |
const octave_value_list & | args, | |||
int | dim | |||
) | [static] |
static octave_value unary_op_defun_body | ( | octave_value::unary_op | op, | |
const octave_value_list & | args | |||
) | [static] |
Definition at line 5304 of file data.cc.
References do_unary_op(), octave_value_list::length(), and print_usage().
Referenced by DEFUN().
double tic_toc_timestamp = -1.0 [static] |