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 (
void)
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
void invalidate_type(void)
OCTAVE_API SparseBoolMatrix reshape(const dim_vector &new_dims) const
OCTAVE_API SparseBoolMatrix permute(const Array< octave_idx_type > &vec, bool inv=false) const
OCTAVE_API SparseBoolMatrix diag(octave_idx_type k=0) const
OCTAVE_API SparseBoolMatrix squeeze(void) const
OCTAVE_API SparseBoolMatrix all(int dim=-1) const
OCTAVE_API boolMatrix matrix_value(void) const
OCTAVE_API SparseBoolMatrix any(int dim=-1) const
octave_idx_type * cidx(void)
octave_idx_type ndims(void) const
octave_idx_type * ridx(void)
std::size_t byte_size(void) const
OCTAVE_API void resize(octave_idx_type r, octave_idx_type c)
OCTAVE_API void assign(const octave::idx_vector &i, const Sparse< T, Alloc > &rhs)
octave_idx_type nnz(void) const
Actual number of nonzero terms.
dim_vector dims(void) const
OCTAVE_API Sparse< T, Alloc > sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
octave_idx_type nzmax(void) const
Amount of storage for nonzero elements.
Vector representing the dimensions (size) of an Array.
OCTAVE_API octave_idx_type safe_numel(void) const
The following function will throw a std::bad_alloc () exception if the requested size is larger than ...
OCTINTERP_API bool print_as_scalar(void) const
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
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
bool is_matrix_type(void) const
const octave_idx_type * mex_get_jc(void) const
bool is_defined(void) const
~octave_base_sparse(void)=default
bool issparse(void) const
octave_value squeeze(void) const
octave_idx_type nnz(void) const
OCTINTERP_API void print(std::ostream &os, bool pr_as_read_syntax=false)
std::size_t byte_size(void) const
bool isnumeric(void) const
const octave_idx_type * mex_get_ir(void) const
octave_idx_type nzmax(void) const
OCTINTERP_API bool load_ascii(std::istream &is)
OCTINTERP_API 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
MatrixType matrix_type(void) const
octave_value reshape(const dim_vector &new_dims) const
void assign(const octave_value_list &idx, const RHS_T &rhs)
OCTINTERP_API bool save_ascii(std::ostream &os)
octave_value all(int dim=0) const
OCTINTERP_API octave_value fast_elem_extract(octave_idx_type n) const
octave_idx_type numel(void) const
octave_base_sparse(const T &a, const MatrixType &t)
OCTINTERP_API 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(void) const
OCTINTERP_API void delete_elements(const octave_value_list &idx)
dim_vector dims(void) const
bool is_constant(void) const
octave_value any(int dim=0) const
sortmode issorted(sortmode mode=UNSORTED) const
const void * mex_get_data(void) const
MatrixType matrix_type(const MatrixType &_typ) const
OCTINTERP_API octave_value resize(const dim_vector &dv, bool=false) const
OCTINTERP_API void print_info(std::ostream &os, const std::string &prefix) const
OCTINTERP_API octave_value do_index_op(const octave_value_list &idx, bool resize_ok=false)
OCTINTERP_API 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(void) 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()) ? '\'' :'"'))
static float_display_format get_edit_display_format(const octave_value &val)