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)
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); }
154 bool print_as_scalar (
void)
const;
156 void print (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
158 void print_info (std::ostream& os,
const std::string& prefix)
const;
160 void short_disp (std::ostream& os)
const;
162 MT& matrix_ref (
void)
164 clear_cached_info ();
168 const MT& matrix_ref (
void)
const
190 void clear_cached_info (
void)
const
193 delete idx_cache; idx_cache = 0;