26 #if ! defined (octave_ov_base_sparse_h)
27 #define octave_ov_base_sparse_h 1
29 #include "octave-config.h"
96 subsref (
const std::string& type,
const std::list<octave_value_list>& idx);
99 const std::list<octave_value_list>& idx,
int)
100 {
return subsref (type, idx); }
103 subsasgn (
const std::string& type,
const std::list<octave_value_list>& idx,
113 template <
typename RHS_T>
150 error (
"sparse indexing needs 1 or 2 indices");
153 catch (octave::index_exception& ie)
156 ie.set_pos_if_unset (
len, k+1);
213 OCTINTERP_API
bool is_true ()
const;
217 OCTINTERP_API
void print (std::ostream& os,
bool pr_as_read_syntax =
false);
220 print_info (std::ostream& os,
const std::string& prefix)
const;
223 print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
225 OCTINTERP_API
bool save_ascii (std::ostream& os);
227 OCTINTERP_API
bool load_ascii (std::istream& is);
231 OCTINTERP_API std::string
SparseBoolMatrix reshape(const dim_vector &new_dims) const
SparseBoolMatrix permute(const Array< octave_idx_type > &vec, bool inv=false) const
SparseBoolMatrix diag(octave_idx_type k=0) const
SparseBoolMatrix all(int dim=-1) const
boolMatrix matrix_value() const
SparseBoolMatrix squeeze() const
SparseBoolMatrix any(int dim=-1) const
octave_idx_type nzmax() const
Amount of storage for nonzero elements.
void assign(const octave::idx_vector &i, const Sparse< T, Alloc > &rhs)
void resize(octave_idx_type r, octave_idx_type c)
Sparse< T, Alloc > sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
octave_idx_type ndims() const
std::size_t byte_size() const
octave_idx_type nnz() const
Actual number of nonzero terms.
Vector representing the dimensions (size) of an Array.
octave_idx_type safe_numel() const
The following function will throw a std::bad_alloc () exception if the requested size is larger than ...
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
bool is_matrix_type() const
MatrixType matrix_type() const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int)
octave_value diag(octave_idx_type k=0) const
octave_value permute(const Array< int > &vec, bool inv=false) const
void print(std::ostream &os, bool pr_as_read_syntax=false)
octave_value squeeze() const
std::size_t byte_size() const
bool load_ascii(std::istream &is)
octave_idx_type nzmax() const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false) const
octave_value sort(Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
octave_value reshape(const dim_vector &new_dims) const
void assign(const octave_value_list &idx, const RHS_T &rhs)
const void * mex_get_data() const
const octave_idx_type * mex_get_ir() const
bool save_ascii(std::ostream &os)
octave_value all(int dim=0) const
octave_value fast_elem_extract(octave_idx_type n) const
octave_base_sparse(const T &a, const MatrixType &t)
octave_value subsasgn(const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
octave_base_sparse(const T &a)
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
octave_base_sparse(const octave_base_sparse &a)
octave_value full_value() const
void delete_elements(const octave_value_list &idx)
~octave_base_sparse()=default
octave_value any(int dim=0) const
sortmode issorted(sortmode mode=UNSORTED) const
float_display_format get_edit_display_format() const
MatrixType matrix_type(const MatrixType &_typ) const
octave_idx_type numel() const
bool print_as_scalar() const
octave_value resize(const dim_vector &dv, bool=false) const
void print_info(std::ostream &os, const std::string &prefix) const
octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
const octave_idx_type * mex_get_jc() const
octave_idx_type nnz() const
std::string edit_display(const float_display_format &fmt, octave_idx_type i, octave_idx_type j) const
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
virtual octave_value diag(octave_idx_type k=0) const
virtual void assign(const std::string &, const octave_value &)
octave_value map(unary_mapper_t umap) const
octave_idx_type length() const
sortmode issorted(sortmode mode=UNSORTED) const
void() error(const char *fmt,...)
octave::idx_vector idx_vector
bool is_true(const std::string &s)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))