24 #if !defined (octave_ov_base_mat_h)
25 #define octave_ov_base_mat_h 1
56 typ (t.is_known () ? new
MatrixType (t) : 0), idx_cache ()
58 if (matrix.ndims () == 0)
65 idx_cache (m.idx_cache ? new
idx_vector (*m.idx_cache) : 0)
70 size_t byte_size (
void)
const {
return matrix.byte_size (); }
79 const std::list<octave_value_list>& idx);
82 const std::list<octave_value_list>& idx,
int)
83 {
return subsref (type, idx); }
86 const std::list<octave_value_list>& idx,
90 bool resize_ok =
false);
93 {
return do_index_op (idx); }
105 int ndims (
void)
const {
return matrix.ndims (); }
110 {
return MT (matrix.reshape (new_dims)); }
113 {
return MT (matrix.permute (vec, inv)); }
133 {
return octave_value (matrix.sort (sidx, dim, mode)); }
136 {
return matrix.is_sorted (mode); }
142 {
return matrix.is_sorted_rows (mode); }
154 bool print_as_scalar (
void)
const;
156 void print (std::ostream& os,
bool pr_as_read_syntax =
false);
158 void print_info (std::ostream& os,
const std::string& prefix)
const;
160 void short_disp (std::ostream& os)
const;
164 clear_cached_info ();
193 delete idx_cache; idx_cache = 0;
octave_value all(int dim=0) const
bool is_true(const std::string &s)
octave_value squeeze(void) const
sortmode is_sorted(sortmode mode=UNSORTED) const
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
Sort by rows returns only indices.
size_t byte_size(void) const
void maybe_economize(void)
sortmode is_sorted_rows(sortmode mode=UNSORTED) const
octave_value permute(const Array< int > &vec, bool inv=false) const
octave_idx_type numel(void) const
octave_value diag(octave_idx_type k=0) const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int)
bool is_constant(void) const
bool is_matrix_type(void) const
~octave_base_matrix(void)
MatrixType matrix_type(void) const
const MT & matrix_ref(void) const
octave_base_matrix(const octave_base_matrix &m)
octave_value any(int dim=0) const
octave_value sort(Array< octave_idx_type > &sidx, octave_idx_type dim=0, sortmode mode=ASCENDING) const
void clear_cached_info(void) const
idx_vector set_idx_cache(const idx_vector &idx) const
octave_value reshape(const dim_vector &new_dims) const
octave_value all(int dim=0) const
octave_base_matrix(const MT &m, const MatrixType &t=MatrixType())
dim_vector dims(void) const
bool is_numeric_type(void) const
octave_idx_type nnz(void) const
octave_value_list do_multi_index_op(int, const octave_value_list &idx)
octave_value any(int dim=0) const
octave_value sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
virtual octave_value resize(const dim_vector &, bool fill=false) const
Array< octave_idx_type > sort_rows_idx(sortmode mode=ASCENDING) const
octave_value diag(octave_idx_type m, octave_idx_type n) const
octave_value full_value(void) const
tree_walker & operator=(const tree_walker &)
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
F77_RET_T const double * x
bool is_defined(void) const