25 #if defined (HAVE_CONFIG_H)
51 if (
args.length () != 1)
127 if (nargin == 0 || nargin > 6)
149 else if (nargin == 2)
156 if (m >= 0 && n >= 0)
159 error (
"sparse: dimensions must be non-negative");
161 else if (nargin >= 3)
163 bool summation =
true;
169 else if (opt ==
"sum" || opt ==
"summation")
172 error (
"sparse: invalid option: %s", opt.c_str ());
181 nzmax =
args(5).idx_type_value ();
190 error (
"sparse: dimensions must be non-negative");
202 m, n, summation, nzmax);
205 i, j, m, n, summation, nzmax);
208 m, n, summation, nzmax);
263 if (nargin < 2 || nargin > 3)
271 nz =
args(2).idx_type_value ();
273 if (m >= 0 && n >= 0 && nz >= 0)
276 error (
"spalloc: M,N,NZ must be non-negative");
ComplexNDArray complex_array_value(bool frc_str_conv=false) const
sparse(ar{i}, ar{j}, ar{sv}, 3, 4) esult
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).is_integer_type())
OCTINTERP_API void print_usage(void)
void set_pos_if_unset(octave_idx_type nd_arg, octave_idx_type dim_arg)
bool is_numeric_type(void) const
#define DEFUN(name, args_name, nargout_name, doc)
void error(const char *fmt,...)
octave_idx_type nzmax(void) const
boolNDArray bool_array_value(bool warn=false) const
bool is_sparse_type(void) const
bool is_bool_type(void) const
nd deftypefn *octave_map m
bool is_string(void) const
SparseBoolMatrix sparse_bool_matrix_value(bool warn=false) const
bool is_complex_type(void) const
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
void err_wrong_type_arg(const char *name, const char *s)
OCTINTERP_API void get_dimensions(const octave_value &a, const char *warn_for, dim_vector &dim)
octave::unwind_protect frame
NDArray array_value(bool frc_str_conv=false) const
=val(i)}if ode{val(i)}occurs in table i
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
Vector representing the dimensions (size) of an Array.
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string