comparison src/ov-scalar.h @ 4569:01e4957409a4

[project @ 2003-10-30 05:48:17 by jwe]
author jwe
date Thu, 30 Oct 2003 05:48:17 +0000
parents 508238e65af7
children d44675070f1a
comparison
equal deleted inserted replaced
4568:03c053808a7c 4569:01e4957409a4
87 double scalar_value (bool = false) const { return scalar; } 87 double scalar_value (bool = false) const { return scalar; }
88 88
89 Matrix matrix_value (bool = false) const 89 Matrix matrix_value (bool = false) const
90 { return Matrix (1, 1, scalar); } 90 { return Matrix (1, 1, scalar); }
91 91
92 NDArray double_nd_array_value (bool = false) const 92 NDArray array_value (bool = false) const
93 { 93 { return NDArray (dim_vector (1, 1), double_value ()); }
94 dim_vector temp (1, 1);
95 return NDArray (temp, double_value ());
96 }
97 94
98 Complex complex_value (bool = false) const { return scalar; } 95 Complex complex_value (bool = false) const { return scalar; }
99 96
100 ComplexMatrix complex_matrix_value (bool = false) const 97 ComplexMatrix complex_matrix_value (bool = false) const
101 { return ComplexMatrix (1, 1, Complex (scalar)); } 98 { return ComplexMatrix (1, 1, Complex (scalar)); }
99
100 ComplexNDArray complex_array_value (bool = false) const
101 { return ComplexNDArray (dim_vector (1, 1), double_value ()); }
102 102
103 octave_value convert_to_str_internal (bool pad, bool force) const; 103 octave_value convert_to_str_internal (bool pad, bool force) const;
104 104
105 void increment (void) { ++scalar; } 105 void increment (void) { ++scalar; }
106 106