GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
data.cc File Reference
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <ctime>
#include <algorithm>
#include <limits>
#include <string>
#include "lo-ieee.h"
#include "mx-base.h"
#include "oct-base64.h"
#include "oct-binmap.h"
#include "oct-time.h"
#include "quit.h"
#include "Cell.h"
#include "data.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "interpreter-private.h"
#include "oct-map.h"
#include "ov-class.h"
#include "ov-complex.h"
#include "ov-cx-mat.h"
#include "ov-cx-sparse.h"
#include "ov-float.h"
#include "ov-flt-complex.h"
#include "ov-flt-cx-mat.h"
#include "ov.h"
#include "ovl.h"
#include "pager.h"
#include "parse.h"
#include "pt-mat.h"
#include "utils.h"
#include "variables.h"
#include "xnorm.h"
Include dependency graph for data.cc:

Go to the source code of this file.

Macros

#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(INTX)
 
#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(X)
 
#define MAKE_INT_BRANCH(X)
 

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)
 
template<typename 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<typename NDT >
static NDT do_accumarray_sum (const idx_vector &idx, const NDT &vals, octave_idx_type n=-1)
 
template<typename 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<typename MT >
static octave_value do_linspace (const octave_value &base, const octave_value &limit, octave_idx_type n)
 
template<typename 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<typename T >
static Array< T > do_repelems (const Array< T > &src, const Array< octave_idx_type > &rep)
 
template<typename 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<typename SparseT >
static SparseT do_sparse_diff (const SparseT &array, octave_idx_type order, int dim)
 
template<typename T >
eps (const T &x)
 
OCTAVE_EXPORT octave_value_list F__accumarray_max__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__accumarray_min__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__accumarray_sum__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__accumdim_sum__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list F__sort_rows_idx__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fall (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fand (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fany (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fatan2 (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fbase64_decode (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fbase64_encode (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fcat (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fcolon (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fcolumns (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fcomplex (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fcputime (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fctranspose (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fcumprod (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fcumsum (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fdiag (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fdiff (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fe (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Feps (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Feq (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Feye (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ffalse (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ffull (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fge (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgt (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fhorzcat (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fhypot (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FI (const octave_value_list &args, int)
 
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, double val, const char *fcn)
 
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, int val, const char *fcn)
 
OCTAVE_EXPORT octave_value_list FInf (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fipermute (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fiscolumn (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fiscomplex (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisempty (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisfloat (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisinteger (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fislogical (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fismatrix (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisnumeric (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisreal (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisrow (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisscalar (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fissorted (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fissquare (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisvector (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fldivide (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fle (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Flength (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Flinspace (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Flog2 (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Flt (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fmerge (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fminus (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fmldivide (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fmod (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fmpower (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fmrdivide (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fmtimes (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FNA (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FNaN (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fndims (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fne (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fnnz (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fnorm (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fnot (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fnth_element (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fnumel (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fnzmax (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fones (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list For (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fpermute (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fpi (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fplus (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fpower (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fprod (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Frdivide (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Frealmax (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Frealmin (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Frem (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Frepelems (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Freshape (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fresize (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Frows (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fsize (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fsize_equal (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fsort (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Fsqueeze (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fsum (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fsumsq (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ftic (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Ftimes (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ftoc (const octave_value_list &args, int nargout)
 
OCTAVE_EXPORT octave_value_list Ftranspose (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ftrue (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fuminus (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fuplus (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fvec (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fvertcat (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fzeros (const octave_value_list &args, int)
 
static sortmode get_sort_mode_option (const octave_value &arg)
 
template<typename MT >
octave_value identity_matrix (int nr, int nc)
 
static octave_value identity_matrix (int nr, int nc, oct_data_conv::data_type dt)
 
template octave_value identity_matrix< boolNDArray > (int, int)
 
template octave_value identity_matrix< FloatNDArray > (int, int)
 
template octave_value identity_matrix< int16NDArray > (int, int)
 
template octave_value identity_matrix< int32NDArray > (int, int)
 
template octave_value identity_matrix< int64NDArray > (int, int)
 
template octave_value identity_matrix< int8NDArray > (int, int)
 
template octave_value identity_matrix< NDArray > (int, int)
 
template octave_value identity_matrix< uint16NDArray > (int, int)
 
template octave_value identity_matrix< uint32NDArray > (int, int)
 
template octave_value identity_matrix< uint64NDArray > (int, int)
 
template octave_value identity_matrix< uint8NDArray > (int, int)
 
template<typename T , typename ET >
void map_2_xlog2 (const Array< T > &x, Array< T > &f, Array< ET > &e)
 
template<typename TYPE , typename T >
static void single_type_concat (Array< T > &result, const octave_value_list &args, int dim)
 
template<typename TYPE , typename T >
static void single_type_concat (Sparse< T > &result, const octave_value_list &args, int dim)
 
template<typename 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
 

Macro Definition Documentation

◆ BTYP_BRANCH

#define BTYP_BRANCH (   X,
  EX 
)
Value:
case btyp_ ## X: \
retval = do_repelems (x.EX ## _value (), r); \
break;
static Array< T > do_repelems(const Array< T > &src, const Array< octave_idx_type > &rep)
Definition: data.cc:7824
F77_RET_T const F77_DBLE * x
T * r
Definition: mx-inlines.cc:773

◆ DATA_REDUCTION

#define DATA_REDUCTION (   FCN)

Definition at line 916 of file data.cc.

◆ INSTANTIATE_EYE

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

Definition at line 4961 of file data.cc.

◆ MAKE_INT_BRANCH [1/9]

#define MAKE_INT_BRANCH (   INTX)
Value:
else if (tval.is_ ## INTX ## _type () && fval.is_ ## INTX ## _type ()) \
{ \
retval = do_merge (mask, \
tval.INTX ## _array_value (), \
fval.INTX ## _array_value ()); \
}
static NDT do_merge(const Array< bool > &mask, const NDT &tval, const NDT &fval)
Definition: data.cc:7452

Definition at line 7506 of file data.cc.

◆ MAKE_INT_BRANCH [2/9]

#define MAKE_INT_BRANCH (   X)
Value:
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
octave_int< T > rem(const octave_int< T > &x, const octave_int< T > &y)
Definition: oct-inttypes.h:925

Definition at line 7506 of file data.cc.

◆ MAKE_INT_BRANCH [3/9]

#define MAKE_INT_BRANCH (   X)
Value:
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, mod, "mod"); \
} \
break
octave_int< T > mod(const octave_int< T > &x, const octave_int< T > &y)
Definition: oct-inttypes.h:932

Definition at line 7506 of file data.cc.

◆ MAKE_INT_BRANCH [4/9]

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

Definition at line 7506 of file data.cc.

◆ MAKE_INT_BRANCH [5/9]

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

Definition at line 7506 of file data.cc.

◆ MAKE_INT_BRANCH [6/9]

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

Definition at line 7506 of file data.cc.

◆ MAKE_INT_BRANCH [7/9]

#define MAKE_INT_BRANCH (   X)
Value:
case btyp_ ## X: \
retval = argx.X ## _array_value ().nth_element (n, dim); \
break;
octave_idx_type n
Definition: mx-inlines.cc:753

Definition at line 7506 of file data.cc.

◆ MAKE_INT_BRANCH [8/9]

#define MAKE_INT_BRANCH (   X)
Value:
case btyp_ ## X: \
retval = do_accumarray_minmax (idx, vals.X ## _array_value (), \
n, ismin, zero.X ## _scalar_value ()); \
break;
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)
Definition: data.cc:7234

Definition at line 7506 of file data.cc.

◆ MAKE_INT_BRANCH [9/9]

#define MAKE_INT_BRANCH (   X)
Value:
if (args(0).is_ ## X ## _type ()) \
{ \
const X##NDArray in = args(0). X## _array_value (); \
size_t inlen = in.numel () * sizeof (X## _t) / sizeof (char); \
const char *inc = reinterpret_cast<const char *> (in.data ()); \
char *out; \
if (octave::base64_encode (inc, inlen, &out)) \
{ \
retval(0) = octave_value (out); \
::free (out); \
} \
}
bool base64_encode(const char *inc, const size_t inlen, char **out)
Definition: oct-base64.cc:39
void free(void *)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))

Definition at line 7506 of file data.cc.

Function Documentation

◆ all_scalar_1x1()

static bool all_scalar_1x1 ( const octave_value_list args)
static

Definition at line 1511 of file data.cc.

References octave_value_list::length(), and numel().

Referenced by do_single_type_concat_map(), and single_type_concat().

◆ attempt_type_conversion()

static octave_value attempt_type_conversion ( const octave_value ov,
std::string  dtype 
)
static

◆ binary_assoc_op_defun_body()

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 6044 of file data.cc.

References Array< T >::assign(), do_binary_op(), octave_value_list::length(), print_usage(), and retval.

Referenced by Fand(), Fmtimes(), For(), Fplus(), and Ftimes().

◆ binary_op_defun_body()

static octave_value binary_op_defun_body ( octave_value::binary_op  op,
const octave_value_list args 
)
static

◆ do_accumarray_minmax()

template<typename 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

Definition at line 7234 of file data.cc.

References error(), idx_vector::extent(), idx_vector::length(), n, and retval.

Referenced by do_accumarray_minmax_fun().

◆ do_accumarray_minmax_fun()

◆ do_accumarray_sum()

template<typename NDT >
static NDT do_accumarray_sum ( const idx_vector idx,
const NDT &  vals,
octave_idx_type  n = -1 
)
static

Definition at line 7150 of file data.cc.

References error(), idx_vector::extent(), idx_vector::length(), n, and retval.

Referenced by F__accumarray_sum__().

◆ do_accumdim_sum()

template<typename NDT >
static NDT do_accumdim_sum ( const idx_vector idx,
const NDT &  vals,
int  dim = -1,
octave_idx_type  n = -1 
)
static

◆ do_cat()

◆ do_class_concat()

◆ do_diff()

◆ do_hypot()

◆ do_linspace()

template<typename MT >
static octave_value do_linspace ( const octave_value base,
const octave_value limit,
octave_idx_type  n 
)
static

Definition at line 5148 of file data.cc.

References octave_value::is_scalar_type(), linspace(), n, and retval.

◆ do_merge()

template<typename NDT >
static NDT do_merge ( const Array< bool > &  mask,
const NDT &  tval,
const NDT &  fval 
)
static

Definition at line 7452 of file data.cc.

References Array< T >::data(), Array< T >::dims(), error(), Array< T >::fortran_vec(), n, Array< T >::numel(), and retval.

Referenced by Fmerge().

◆ do_permute()

static octave_value do_permute ( const octave_value_list args,
bool  inv 
)
static

◆ do_repelems()

template<typename T >
static Array<T> do_repelems ( const Array< T > &  src,
const Array< octave_idx_type > &  rep 
)
static

◆ do_single_type_concat()

template<typename TYPE >
static TYPE do_single_type_concat ( const octave_value_list args,
int  dim 
)
static

Definition at line 1586 of file data.cc.

◆ do_single_type_concat_map()

static octave_map do_single_type_concat_map ( const octave_value_list args,
int  dim 
)
static

Definition at line 1615 of file data.cc.

References all_scalar_1x1().

Referenced by do_cat(), and do_class_concat().

◆ do_sparse_diff()

template<typename SparseT >
static SparseT do_sparse_diff ( const SparseT &  array,
octave_idx_type  order,
int  dim 
)
static

Definition at line 7623 of file data.cc.

References Array< T >::columns(), Array< T >::index(), retval, and Array< T >::rows().

Referenced by do_diff().

◆ eps()

template<typename T >
T eps ( const T &  x)

◆ F__accumarray_max__()

OCTAVE_EXPORT octave_value_list F__accumarray_max__ ( const octave_value_list args,
int   
)

Definition at line 7356 of file data.cc.

References do_accumarray_minmax_fun().

◆ F__accumarray_min__()

OCTAVE_EXPORT octave_value_list F__accumarray_min__ ( const octave_value_list args,
int   
)

Definition at line 7347 of file data.cc.

References do_accumarray_minmax_fun().

◆ F__accumarray_sum__()

◆ F__accumdim_sum__()

◆ F__sort_rows_idx__()

OCTAVE_EXPORT octave_value_list F__sort_rows_idx__ ( const octave_value_list args,
int   
)

◆ Fall()

OCTAVE_EXPORT octave_value_list Fall ( const octave_value_list args,
int   
)

Definition at line 90 of file data.cc.

References error(), ovl(), and print_usage().

◆ Fand()

OCTAVE_EXPORT octave_value_list Fand ( const octave_value_list args,
int   
)

◆ Fany()

OCTAVE_EXPORT octave_value_list Fany ( const octave_value_list args,
int   
)

Definition at line 155 of file data.cc.

References error(), ovl(), and print_usage().

◆ Fatan2()

OCTAVE_EXPORT octave_value_list Fatan2 ( const octave_value_list args,
int   
)

Definition at line 206 of file data.cc.

References err_wrong_type_arg(), error(), print_usage(), and retval.

◆ Fbase64_decode()

OCTAVE_EXPORT octave_value_list Fbase64_decode ( const octave_value_list args,
int   
)

◆ Fbase64_encode()

◆ Fcat()

OCTAVE_EXPORT octave_value_list Fcat ( const octave_value_list args,
int   
)

Definition at line 2288 of file data.cc.

References do_cat(), error(), ovl(), and print_usage().

◆ Fcolon()

OCTAVE_EXPORT octave_value_list Fcolon ( const octave_value_list args,
int   
)

Definition at line 6347 of file data.cc.

References do_colon_op(), and print_usage().

◆ Fcolumns()

OCTAVE_EXPORT octave_value_list Fcolumns ( const octave_value_list args,
int   
)

Definition at line 2878 of file data.cc.

References ovl(), and print_usage().

◆ Fcomplex()

◆ Fcputime()

OCTAVE_EXPORT octave_value_list Fcputime ( const octave_value_list args,
int   
)

◆ Fctranspose()

OCTAVE_EXPORT octave_value_list Fctranspose ( const octave_value_list args,
int   
)

Definition at line 6008 of file data.cc.

References octave_value::op_hermitian, and unary_op_defun_body().

◆ Fcumprod()

OCTAVE_EXPORT octave_value_list Fcumprod ( const octave_value_list args,
int   
)

Definition at line 998 of file data.cc.

References DATA_REDUCTION.

◆ Fcumsum()

◆ Fdiag()

OCTAVE_EXPORT octave_value_list Fdiag ( const octave_value_list args,
int   
)

◆ Fdiff()

OCTAVE_EXPORT octave_value_list Fdiff ( const octave_value_list args,
int   
)

Definition at line 7775 of file data.cc.

References do_diff(), error(), and print_usage().

◆ Fe()

OCTAVE_EXPORT octave_value_list Fe ( const octave_value_list args,
int   
)

Definition at line 4565 of file data.cc.

References fill_matrix().

◆ Feps()

◆ Feq()

OCTAVE_EXPORT octave_value_list Feq ( const octave_value_list args,
int   
)

Definition at line 6193 of file data.cc.

References binary_op_defun_body(), and octave_value::op_eq.

◆ Feye()

◆ Ffalse()

OCTAVE_EXPORT octave_value_list Ffalse ( const octave_value_list args,
int   
)

Definition at line 4906 of file data.cc.

References fill_matrix().

◆ Ffull()

OCTAVE_EXPORT octave_value_list Ffull ( const octave_value_list args,
int   
)

Definition at line 5677 of file data.cc.

References ovl(), and print_usage().

◆ Fge()

OCTAVE_EXPORT octave_value_list Fge ( const octave_value_list args,
int   
)

Definition at line 6203 of file data.cc.

References binary_op_defun_body(), and octave_value::op_ge.

◆ Fgt()

OCTAVE_EXPORT octave_value_list Fgt ( const octave_value_list args,
int   
)

Definition at line 6213 of file data.cc.

References binary_op_defun_body(), and octave_value::op_gt.

◆ Fhorzcat()

OCTAVE_EXPORT octave_value_list Fhorzcat ( const octave_value_list args,
int   
)

Definition at line 1994 of file data.cc.

References do_cat().

◆ Fhypot()

OCTAVE_EXPORT octave_value_list Fhypot ( const octave_value_list args,
int   
)

Definition at line 384 of file data.cc.

References do_hypot(), print_usage(), and retval.

◆ FI()

OCTAVE_EXPORT octave_value_list FI ( const octave_value_list args,
int   
)

Definition at line 4848 of file data.cc.

References fill_matrix().

◆ fill_matrix() [1/5]

static octave_value fill_matrix ( const octave_value_list args,
bool  val,
const char *  fcn 
)
static

◆ fill_matrix() [2/5]

◆ fill_matrix() [3/5]

◆ fill_matrix() [4/5]

◆ fill_matrix() [5/5]

◆ FInf()

OCTAVE_EXPORT octave_value_list FInf ( const octave_value_list args,
int   
)

Definition at line 4445 of file data.cc.

References fill_matrix(), lo_ieee_float_inf_value(), and lo_ieee_inf_value().

◆ Fipermute()

OCTAVE_EXPORT octave_value_list Fipermute ( const octave_value_list args,
int   
)

Definition at line 2514 of file data.cc.

References do_permute().

◆ Fiscolumn()

OCTAVE_EXPORT octave_value_list Fiscolumn ( const octave_value_list args,
int   
)

Definition at line 3806 of file data.cc.

References Array< T >::numel(), octave_value(), ovl(), and print_usage().

◆ Fiscomplex()

OCTAVE_EXPORT octave_value_list Fiscomplex ( const octave_value_list args,
int   
)

Definition at line 3252 of file data.cc.

References ovl(), and print_usage().

◆ Fisempty()

OCTAVE_EXPORT octave_value_list Fisempty ( const octave_value_list args,
int   
)

Definition at line 3624 of file data.cc.

References ovl(), and print_usage().

◆ Fisfloat()

OCTAVE_EXPORT octave_value_list Fisfloat ( const octave_value_list args,
int   
)

Definition at line 3284 of file data.cc.

References ovl(), and print_usage().

◆ Fisinteger()

OCTAVE_EXPORT octave_value_list Fisinteger ( const octave_value_list args,
int   
)

Definition at line 3197 of file data.cc.

References octave::math::isinteger(), ovl(), and print_usage().

◆ Fislogical()

OCTAVE_EXPORT octave_value_list Fislogical ( const octave_value_list args,
int   
)

Definition at line 3165 of file data.cc.

References ovl(), and print_usage().

◆ Fismatrix()

OCTAVE_EXPORT octave_value_list Fismatrix ( const octave_value_list args,
int   
)

Definition at line 3856 of file data.cc.

References Array< T >::numel(), octave_value(), ovl(), and print_usage().

◆ Fisnumeric()

OCTAVE_EXPORT octave_value_list Fisnumeric ( const octave_value_list args,
int   
)

Definition at line 3645 of file data.cc.

References ovl(), and print_usage().

◆ Fisreal()

OCTAVE_EXPORT octave_value_list Fisreal ( const octave_value_list args,
int   
)

Definition at line 3610 of file data.cc.

References ovl(), and print_usage().

◆ Fisrow()

OCTAVE_EXPORT octave_value_list Fisrow ( const octave_value_list args,
int   
)

Definition at line 3757 of file data.cc.

References Array< T >::numel(), octave_value(), ovl(), and print_usage().

◆ Fisscalar()

OCTAVE_EXPORT octave_value_list Fisscalar ( const octave_value_list args,
int   
)

Definition at line 3677 of file data.cc.

References Array< T >::numel(), octave_value(), ovl(), and print_usage().

◆ Fissorted()

◆ Fissquare()

OCTAVE_EXPORT octave_value_list Fissquare ( const octave_value_list args,
int   
)

Definition at line 3904 of file data.cc.

References Array< T >::numel(), octave_value(), ovl(), and print_usage().

◆ Fisvector()

OCTAVE_EXPORT octave_value_list Fisvector ( const octave_value_list args,
int   
)

Definition at line 3717 of file data.cc.

References Array< T >::numel(), octave_value(), ovl(), and print_usage().

◆ Fldivide()

OCTAVE_EXPORT octave_value_list Fldivide ( const octave_value_list args,
int   
)

Definition at line 6289 of file data.cc.

References binary_op_defun_body(), and octave_value::op_el_ldiv.

◆ Fle()

OCTAVE_EXPORT octave_value_list Fle ( const octave_value_list args,
int   
)

Definition at line 6181 of file data.cc.

References binary_op_defun_body(), and octave_value::op_le.

◆ Flength()

OCTAVE_EXPORT octave_value_list Flength ( const octave_value_list args,
int   
)

Definition at line 2529 of file data.cc.

References octave::jit_convention::length, ovl(), and print_usage().

◆ Flinspace()

◆ Flog2()

OCTAVE_EXPORT octave_value_list Flog2 ( const octave_value_list args,
int  nargout 
)

Definition at line 481 of file data.cc.

References err_wrong_type_arg(), f, octave::math::log2(), map_2_xlog2(), ovl(), print_usage(), retval, and x.

◆ Flt()

OCTAVE_EXPORT octave_value_list Flt ( const octave_value_list args,
int   
)

Definition at line 6171 of file data.cc.

References binary_op_defun_body(), and octave_value::op_lt.

◆ Fmerge()

◆ Fminus()

OCTAVE_EXPORT octave_value_list Fminus ( const octave_value_list args,
int   
)

Definition at line 6104 of file data.cc.

References binary_op_defun_body(), and octave_value::op_sub.

◆ Fmldivide()

OCTAVE_EXPORT octave_value_list Fmldivide ( const octave_value_list args,
int   
)

Definition at line 6161 of file data.cc.

References binary_op_defun_body(), and octave_value::op_ldiv.

◆ Fmod()

◆ Fmpower()

OCTAVE_EXPORT octave_value_list Fmpower ( const octave_value_list args,
int   
)

Definition at line 6149 of file data.cc.

References binary_op_defun_body(), and octave_value::op_pow.

◆ Fmrdivide()

OCTAVE_EXPORT octave_value_list Fmrdivide ( const octave_value_list args,
int   
)

Definition at line 6137 of file data.cc.

References binary_op_defun_body(), and octave_value::op_div.

◆ Fmtimes()

OCTAVE_EXPORT octave_value_list Fmtimes ( const octave_value_list args,
int   
)

◆ FNA()

OCTAVE_EXPORT octave_value_list FNA ( const octave_value_list args,
int   
)

Definition at line 4882 of file data.cc.

References fill_matrix(), lo_ieee_float_na_value(), and lo_ieee_na_value().

◆ FNaN()

OCTAVE_EXPORT octave_value_list FNaN ( const octave_value_list args,
int   
)

Definition at line 4510 of file data.cc.

References fill_matrix(), lo_ieee_float_nan_value(), and lo_ieee_nan_value().

◆ Fndims()

OCTAVE_EXPORT octave_value_list Fndims ( const octave_value_list args,
int   
)

Definition at line 2553 of file data.cc.

References Array< T >::numel(), octave_value(), ovl(), and print_usage().

◆ Fne()

OCTAVE_EXPORT octave_value_list Fne ( const octave_value_list args,
int   
)

Definition at line 6225 of file data.cc.

References binary_op_defun_body(), and octave_value::op_ne.

◆ Fnnz()

OCTAVE_EXPORT octave_value_list Fnnz ( const octave_value_list args,
int   
)

Definition at line 2784 of file data.cc.

References ovl(), and print_usage().

◆ Fnorm()

◆ Fnot()

OCTAVE_EXPORT octave_value_list Fnot ( const octave_value_list args,
int   
)

Definition at line 5944 of file data.cc.

References octave_value::op_not, and unary_op_defun_body().

◆ Fnth_element()

◆ Fnumel()

OCTAVE_EXPORT octave_value_list Fnumel ( const octave_value_list args,
int   
)

Definition at line 2618 of file data.cc.

References octave::dims_to_numel(), Array< T >::numel(), print_usage(), and retval.

◆ Fnzmax()

OCTAVE_EXPORT octave_value_list Fnzmax ( const octave_value_list args,
int   
)

Definition at line 2820 of file data.cc.

References ovl(), and print_usage().

◆ Fones()

OCTAVE_EXPORT octave_value_list Fones ( const octave_value_list args,
int   
)

Definition at line 4311 of file data.cc.

References fill_matrix().

◆ For()

OCTAVE_EXPORT octave_value_list For ( const octave_value_list args,
int   
)

◆ Fpermute()

OCTAVE_EXPORT octave_value_list Fpermute ( const octave_value_list args,
int   
)

Definition at line 2495 of file data.cc.

References do_permute().

◆ Fpi()

OCTAVE_EXPORT octave_value_list Fpi ( const octave_value_list args,
int   
)

Definition at line 4723 of file data.cc.

References octave::math::atan(), and fill_matrix().

◆ Fplus()

OCTAVE_EXPORT octave_value_list Fplus ( const octave_value_list args,
int   
)

◆ Fpower()

OCTAVE_EXPORT octave_value_list Fpower ( const octave_value_list args,
int   
)

Definition at line 6276 of file data.cc.

References binary_op_defun_body(), and octave_value::op_el_pow.

◆ Fprod()

◆ Frdivide()

OCTAVE_EXPORT octave_value_list Frdivide ( const octave_value_list args,
int   
)

Definition at line 6258 of file data.cc.

References binary_op_defun_body(), and octave_value::op_el_div.

◆ Frealmax()

OCTAVE_EXPORT octave_value_list Frealmax ( const octave_value_list args,
int   
)

Definition at line 4767 of file data.cc.

References fill_matrix(), and max().

◆ Frealmin()

OCTAVE_EXPORT octave_value_list Frealmin ( const octave_value_list args,
int   
)

Definition at line 4806 of file data.cc.

References fill_matrix(), and min().

◆ Frem()

◆ Frepelems()

OCTAVE_EXPORT octave_value_list Frepelems ( const octave_value_list args,
int   
)

◆ Freshape()

OCTAVE_EXPORT octave_value_list Freshape ( const octave_value_list args,
int   
)

◆ Fresize()

OCTAVE_EXPORT octave_value_list Fresize ( const octave_value_list args,
int   
)

◆ Frows()

OCTAVE_EXPORT octave_value_list Frows ( const octave_value_list args,
int   
)

Definition at line 2834 of file data.cc.

References ovl(), and print_usage().

◆ Fsize()

OCTAVE_EXPORT octave_value_list Fsize ( const octave_value_list args,
int  nargout 
)

◆ Fsize_equal()

OCTAVE_EXPORT octave_value_list Fsize_equal ( const octave_value_list args,
int   
)

Definition at line 2759 of file data.cc.

References ovl().

◆ Fsort()

OCTAVE_EXPORT octave_value_list Fsort ( const octave_value_list args,
int  nargout 
)

◆ Fsqueeze()

OCTAVE_EXPORT octave_value_list Fsqueeze ( const octave_value_list args,
int   
)

Definition at line 5663 of file data.cc.

References ovl(), and print_usage().

◆ Fsum()

◆ Fsumsq()

OCTAVE_EXPORT octave_value_list Fsumsq ( const octave_value_list args,
int   
)

Definition at line 3136 of file data.cc.

References DATA_REDUCTION.

◆ Ftic()

OCTAVE_EXPORT octave_value_list Ftic ( const octave_value_list args,
int  nargout 
)

Definition at line 6410 of file data.cc.

References octave::sys::time::double_value(), retval, tic_toc_timestamp, and warning().

◆ Ftimes()

OCTAVE_EXPORT octave_value_list Ftimes ( const octave_value_list args,
int   
)

◆ Ftoc()

OCTAVE_EXPORT octave_value_list Ftoc ( const octave_value_list args,
int  nargout 
)

◆ Ftranspose()

OCTAVE_EXPORT octave_value_list Ftranspose ( const octave_value_list args,
int   
)

Definition at line 5976 of file data.cc.

References octave_value::op_transpose, and unary_op_defun_body().

◆ Ftrue()

OCTAVE_EXPORT octave_value_list Ftrue ( const octave_value_list args,
int   
)

Definition at line 4924 of file data.cc.

References fill_matrix().

◆ Fuminus()

OCTAVE_EXPORT octave_value_list Fuminus ( const octave_value_list args,
int   
)

Definition at line 5964 of file data.cc.

References octave_value::op_uminus, and unary_op_defun_body().

◆ Fuplus()

OCTAVE_EXPORT octave_value_list Fuplus ( const octave_value_list args,
int   
)

Definition at line 5954 of file data.cc.

References octave_value::op_uplus, and unary_op_defun_body().

◆ Fvec()

◆ Fvertcat()

OCTAVE_EXPORT octave_value_list Fvertcat ( const octave_value_list args,
int   
)

Definition at line 2233 of file data.cc.

References do_cat().

◆ Fzeros()

OCTAVE_EXPORT octave_value_list Fzeros ( const octave_value_list args,
int   
)

Definition at line 4379 of file data.cc.

References fill_matrix().

◆ get_sort_mode_option()

static sortmode get_sort_mode_option ( const octave_value arg)
static

Definition at line 6889 of file data.cc.

References ASCENDING, DESCENDING, error(), UNSORTED, and octave_value::xstring_value().

Referenced by Fissorted().

◆ identity_matrix() [1/2]

template<typename MT >
octave_value identity_matrix ( int  nr,
int  nc 
)

Definition at line 4931 of file data.cc.

References m, min(), n, and retval.

Referenced by Feye().

◆ identity_matrix() [2/2]

◆ identity_matrix< boolNDArray >()

template octave_value identity_matrix< boolNDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ identity_matrix< FloatNDArray >()

template octave_value identity_matrix< FloatNDArray > ( int  ,
int   
)

◆ identity_matrix< int16NDArray >()

template octave_value identity_matrix< int16NDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ identity_matrix< int32NDArray >()

template octave_value identity_matrix< int32NDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ identity_matrix< int64NDArray >()

template octave_value identity_matrix< int64NDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ identity_matrix< int8NDArray >()

template octave_value identity_matrix< int8NDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ identity_matrix< NDArray >()

template octave_value identity_matrix< NDArray > ( int  ,
int   
)

◆ identity_matrix< uint16NDArray >()

template octave_value identity_matrix< uint16NDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ identity_matrix< uint32NDArray >()

template octave_value identity_matrix< uint32NDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ identity_matrix< uint64NDArray >()

template octave_value identity_matrix< uint64NDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ identity_matrix< uint8NDArray >()

template octave_value identity_matrix< uint8NDArray > ( int  ,
int   
)

Referenced by identity_matrix().

◆ map_2_xlog2()

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

Definition at line 447 of file data.cc.

References f, octave::math::log2(), x, and Array< T >::xelem().

Referenced by Flog2().

◆ single_type_concat() [1/2]

template<typename TYPE , typename T >
static void single_type_concat ( Array< T > &  result,
const octave_value_list args,
int  dim 
)
static

◆ single_type_concat() [2/2]

template<typename TYPE , typename T >
static void single_type_concat ( Sparse< T > &  result,
const octave_value_list args,
int  dim 
)
static

Definition at line 1566 of file data.cc.

References Sparse< T >::cat(), octave_value_list::length(), and OCTAVE_LOCAL_BUFFER.

◆ single_type_concat_map()

template<typename MAP >
static void single_type_concat_map ( octave_map result,
const octave_value_list args,
int  dim 
)
static

Definition at line 1597 of file data.cc.

References octave_map::cat(), octave_value_list::length(), and OCTAVE_LOCAL_BUFFER.

◆ unary_op_defun_body()

static octave_value unary_op_defun_body ( octave_value::unary_op  op,
const octave_value_list args 
)
static

Definition at line 5928 of file data.cc.

References do_unary_op(), octave_value_list::length(), and print_usage().

Referenced by Fctranspose(), Fnot(), Ftranspose(), Fuminus(), and Fuplus().

Variable Documentation

◆ tic_toc_timestamp

double tic_toc_timestamp = -1.0
static

Definition at line 6358 of file data.cc.

Referenced by Ftic(), and Ftoc().