102 double_value (
bool =
false)
const
109 type_name (),
"real scalar");
111 retval = matrix(0).double_value ();
121 float_value (
bool =
false)
const
128 type_name (),
"real scalar");
130 retval = matrix(0).float_value ();
144 matrix_value (
bool =
false)
const
149 error (
"invalid conversion of %s to Matrix", type_name ().c_str ());
152 retval =
Matrix (dv(0), dv(1));
156 vec[i] = matrix(i).double_value ();
162 float_matrix_value (
bool =
false)
const
167 error (
"invalid conversion of %s to FloatMatrix", type_name ().c_str ());
174 vec[i] = matrix(i).float_value ();
180 complex_matrix_value (
bool =
false)
const
185 error (
"invalid conversion of %s to Matrix", type_name ().c_str ());
192 vec[i] =
Complex (matrix(i).double_value ());
198 float_complex_matrix_value (
bool =
false)
const
203 error (
"invalid conversion of %s to FloatMatrix", type_name ().c_str ());
216 array_value (
bool =
false)
const
218 NDArray retval (matrix.dims ());
222 vec[i] = matrix(i).double_value ();
227 float_array_value (
bool =
false)
const
233 vec[i] = matrix(i).float_value ();
238 complex_array_value (
bool =
false)
const
244 vec[i] =
Complex (matrix(i).double_value ());
249 float_complex_array_value (
bool =
false)
const
260 bool_array_value (
bool warn =
false)
const
266 if (warn && matrix.any_element_not_one_or_zero ())
271 vec[i] = matrix(i).bool_value ();
277 char_array_value (
bool =
false)
const
285 vec[i] = matrix(i).char_value ();
291 void increment (
void)
296 void decrement (
void)
301 void changesign (
void)
303 matrix_ref ().changesign ();
307 {
return idx_cache ? *idx_cache : set_idx_cache (
idx_vector (matrix)); }
312 {
return os.
write (matrix, block_size, output_type, skip, flt_fmt); }
322 OCTAVE_INT_T::val_type *pr =
static_cast<OCTAVE_INT_T::val_type *
>
329 for (
mwIndex i = 0; i < nel; i++)
330 pr[i] = p[i].value ();
340 return matrix.
abs ();
396 bool resize_ok =
false)
448 int8_array_value (
void)
const
452 int16_array_value (
void)
const
456 int32_array_value (
void)
const
460 int64_array_value (
void)
const
464 uint8_array_value (
void)
const
468 uint16_array_value (
void)
const
472 uint32_array_value (
void)
const
476 uint64_array_value (
void)
const
503 float float_scalar_value (
bool =
false)
const
504 {
return scalar.float_value (); }
507 matrix_value (
bool =
false)
const
510 retval(0,0) =
scalar.double_value ();
515 float_matrix_value (
bool =
false)
const
518 retval(0,0) =
scalar.float_value ();
523 complex_matrix_value (
bool =
false)
const
531 float_complex_matrix_value (
bool =
false)
const
539 array_value (
bool =
false)
const
542 retval(0) =
scalar.double_value ();
547 float_array_value (
bool =
false)
const
550 retval(0) =
scalar.float_value ();
555 complex_array_value (
bool =
false)
const
563 float_complex_array_value (
bool =
false)
const
570 bool bool_value (
bool warn =
false)
const
575 return scalar.bool_value ();
579 bool_array_value (
bool warn =
false)
const
586 retval(0) =
scalar.bool_value ();
592 char_array_value (
bool =
false)
const
595 retval(0) =
scalar.char_value ();
599 void increment (
void)
604 void decrement (
void)
616 block_size, output_type, skip, flt_fmt);
627 OCTAVE_INT_T::val_type *pr =
static_cast<OCTAVE_INT_T::val_type *
>