23 #if !defined (octave_ov_base_diag_h)
24 #define octave_ov_base_diag_h 1
42 template <
class DMT,
class MT>
61 size_t byte_size (
void)
const {
return matrix.byte_size (); }
68 const std::list<octave_value_list>& idx);
71 const std::list<octave_value_list>& idx,
int)
75 bool resize_ok =
false);
78 const std::list<octave_value_list>& idx,
86 {
return to_dense ().
reshape (new_dims); }
89 {
return to_dense ().
permute (vec, inv); }
103 {
return to_dense ().
sort (dim, mode); }
106 {
return to_dense ().
sort (sidx, dim, mode); }
129 double double_value (
bool =
false)
const;
131 float float_value (
bool =
false)
const;
133 double scalar_value (
bool frc_str_conv =
false)
const
134 {
return double_value (frc_str_conv); }
138 Matrix matrix_value (
bool =
false)
const;
140 FloatMatrix float_matrix_value (
bool =
false)
const;
142 Complex complex_value (
bool =
false)
const;
154 boolNDArray bool_array_value (
bool warn =
false)
const;
158 NDArray array_value (
bool =
false)
const;
190 octave_value convert_to_str_internal (
bool pad,
bool force,
char type)
const;
192 void print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
194 bool save_ascii (std::ostream& os);
196 bool load_ascii (std::istream& is);
202 mxArray *as_mxArray (
void)
const;
204 bool print_as_scalar (
void)
const;
206 void print (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
208 void print_info (std::ostream& os,
const std::string& prefix)
const;
217 typename DMT::element_type&)
const = 0;