93 error (
"sparse indexing needs 1 or 2 indices");
99 e.set_pos_if_unset (n_idx,
k+1);
106 template <
typename T>
109 const std::list<octave_value_list>& idx)
116 retval = do_index_op (idx.front ());
123 error (
"%s cannot be indexed with %c",
nm.c_str (),
type[0]);
134 template <
typename T>
137 const std::list<octave_value_list>& idx,
146 if (
type.length () != 1)
149 error (
"in indexed assignment of %s, last lhs index must be ()",
163 error (
"%s cannot be indexed with %c",
nm.c_str (),
type[0]);
179 template <
typename T>
218 error (
"sparse indexing needs 1 or 2 indices");
224 e.set_pos_if_unset (len,
k+1);
229 typ.invalidate_type ();
232 template <
typename MT>
270 error (
"sparse indexing needs 1 or 2 indices");
276 e.set_pos_if_unset (len,
k+1);
281 typ.invalidate_type ();
284 template <
typename T>
293 template <
typename T>
306 if (t1.any_element_is_nan ())
323 template <
typename T>
332 template <
typename T>
336 print_raw (
os, pr_as_read_syntax);
340 template <
typename T>
348 template <
typename T>
351 bool pr_as_read_syntax)
const 363 os <<
"Compressed Column Sparse (rows = " << nr
373 double dnel = dnr * dnc;
377 double pct = (nz / dnel * 100);
399 os <<
" [" << std::setprecision (prec) << pct <<
"%]";
422 os <<
" (" <<
matrix.ridx (
i)+1 <<
", " << j+1 <<
") -> ";
430 template <
typename MT>
438 template <
typename MT>
444 std::ostringstream buf;
449 template <
typename T>
458 os <<
"# nnz: " << nnz () <<
"\n";
459 os <<
"# rows: " <<
dv(0) <<
"\n";
460 os <<
"# columns: " <<
dv(1) <<
"\n";
467 template <
typename T>
478 error (
"load: failed to extract number of rows and columns");
485 error (
"load: failed to load matrix constant");
492 template <
typename T>
505 template <
typename T>
509 if (umap == umap_xtolower || umap == umap_xtoupper)
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_value map(octave_base_value::unary_mapper_t umap) const
characters Given a string matrix
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
bool load_ascii(std::istream &is)
void error(const char *fmt,...)
void err_nan_to_logical_conversion(void)
bool any_zero(void) const
octave_value resize(const dim_vector &dv, bool fill=false) const
std::string edit_display(const float_display_format &fmt, octave_idx_type i, octave_idx_type j) const
void assign(const octave_value_list &idx, const T &rhs)
void octave_print_internal(std::ostream &os, const float_display_format &fmt, bool d, bool pr_as_read_syntax)
OCTAVE_EXPORT octave_value_list isdir nd deftypefn *std::string nm
octave_value resize(const dim_vector &dv, bool=false) const
std::string extract_keyword(std::istream &is, const char *keyword, const bool next_only)
float_display_format get_edit_display_format(void) const
#define panic_impossible()
void print_info(std::ostream &os, const std::string &prefix) const
SparseBoolMatrix all(int dim=-1) const
void print(std::ostream &os, bool pr_as_read_syntax=false)
the exceeded dimensions are set to if fewer subscripts than dimensions are the exceeding dimensions are merged into the final requested dimension For consider the following dims
bool save_ascii(std::ostream &os)
SparseComplexMatrix sparse_complex_matrix_value(bool frc_str_conv=false) const
void delete_elements(const octave_value_list &idx)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
bool all_ones(void) const
builtin_type_t builtin_type(void) const
octave_value map(octave_base_value::unary_mapper_t umap) const
octave_idx_type numel(int n=0) const
Number of elements that a matrix with this dimensions would have.
bool print_as_scalar(void) const
octave_idx_type length(void) const
SparseMatrix sparse_matrix_value(bool frc_str_conv=false) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
octave_value fast_elem_extract(octave_idx_type n) const
void warn_array_as_logical(const dim_vector &dv)
SparseBoolMatrix sparse_bool_matrix_value(bool warn=false) const
write the output to stdout if nargout is
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
octave_value next_subsref(const std::string &type, const std::list< octave_value_list > &idx, size_t skip=1)
static octave_value empty_conv(const std::string &type, const octave_value &rhs=octave_value())