Mercurial > octave
comparison libinterp/octave-value/ov-bool-mat.h @ 31138:b3ca7f891750
maint: use "m_" prefix for member variables in class octave_base_matrix.
* ov-base-int.cc, ov-base-mat.cc, ov-base-mat.h, ov-base.h, ov-bool-mat.cc,
ov-bool-mat.h, ov-cell.cc, ov-cell.h, ov-ch-mat.cc, ov-ch-mat.h, ov-cx-mat.cc,
ov-cx-mat.h, ov-flt-cx-mat.cc, ov-flt-cx-mat.h, ov-flt-re-mat.cc,
ov-flt-re-mat.h, ov-intx.h, ov-re-mat.cc, ov-re-mat.h, ov-str-mat.cc,
ov-str-mat.h:
use "m_" prefix for member variables in class octave_base_matrix.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 10 Jul 2022 18:26:24 -0700 |
parents | 796f54d4ddbf |
children | aac27ad79be6 |
comparison
equal
deleted
inserted
replaced
31137:6308ce73bdca | 31138:b3ca7f891750 |
---|---|
89 | 89 |
90 octave_base_value * try_narrowing_conversion (void); | 90 octave_base_value * try_narrowing_conversion (void); |
91 | 91 |
92 octave::idx_vector index_vector (bool /* require_integers */ = false) const | 92 octave::idx_vector index_vector (bool /* require_integers */ = false) const |
93 { | 93 { |
94 return idx_cache ? *idx_cache : set_idx_cache (octave::idx_vector (matrix)); | 94 return m_idx_cache ? *m_idx_cache |
95 : set_idx_cache (octave::idx_vector (m_matrix)); | |
95 } | 96 } |
96 | 97 |
97 builtin_type_t builtin_type (void) const { return btyp_bool; } | 98 builtin_type_t builtin_type (void) const { return btyp_bool; } |
98 | 99 |
99 bool is_bool_matrix (void) const { return true; } | 100 bool is_bool_matrix (void) const { return true; } |
103 bool isreal (void) const { return true; } | 104 bool isreal (void) const { return true; } |
104 | 105 |
105 bool isnumeric (void) const { return false; } | 106 bool isnumeric (void) const { return false; } |
106 | 107 |
107 int8NDArray | 108 int8NDArray |
108 int8_array_value (void) const { return int8NDArray (matrix); } | 109 int8_array_value (void) const { return int8NDArray (m_matrix); } |
109 | 110 |
110 int16NDArray | 111 int16NDArray |
111 int16_array_value (void) const { return int16NDArray (matrix); } | 112 int16_array_value (void) const { return int16NDArray (m_matrix); } |
112 | 113 |
113 int32NDArray | 114 int32NDArray |
114 int32_array_value (void) const { return int32NDArray (matrix); } | 115 int32_array_value (void) const { return int32NDArray (m_matrix); } |
115 | 116 |
116 int64NDArray | 117 int64NDArray |
117 int64_array_value (void) const { return int64NDArray (matrix); } | 118 int64_array_value (void) const { return int64NDArray (m_matrix); } |
118 | 119 |
119 uint8NDArray | 120 uint8NDArray |
120 uint8_array_value (void) const { return uint8NDArray (matrix); } | 121 uint8_array_value (void) const { return uint8NDArray (m_matrix); } |
121 | 122 |
122 uint16NDArray | 123 uint16NDArray |
123 uint16_array_value (void) const { return uint16NDArray (matrix); } | 124 uint16_array_value (void) const { return uint16NDArray (m_matrix); } |
124 | 125 |
125 uint32NDArray | 126 uint32NDArray |
126 uint32_array_value (void) const { return uint32NDArray (matrix); } | 127 uint32_array_value (void) const { return uint32NDArray (m_matrix); } |
127 | 128 |
128 uint64NDArray | 129 uint64NDArray |
129 uint64_array_value (void) const { return uint64NDArray (matrix); } | 130 uint64_array_value (void) const { return uint64NDArray (m_matrix); } |
130 | 131 |
131 double double_value (bool = false) const; | 132 double double_value (bool = false) const; |
132 | 133 |
133 float float_value (bool = false) const; | 134 float float_value (bool = false) const; |
134 | 135 |
135 double scalar_value (bool frc_str_conv = false) const | 136 double scalar_value (bool frc_str_conv = false) const |
136 { return double_value (frc_str_conv); } | 137 { return double_value (frc_str_conv); } |
137 | 138 |
138 Matrix matrix_value (bool = false) const | 139 Matrix matrix_value (bool = false) const |
139 { return Matrix (boolMatrix (matrix)); } | 140 { return Matrix (boolMatrix (m_matrix)); } |
140 | 141 |
141 FloatMatrix float_matrix_value (bool = false) const | 142 FloatMatrix float_matrix_value (bool = false) const |
142 { return FloatMatrix (boolMatrix (matrix)); } | 143 { return FloatMatrix (boolMatrix (m_matrix)); } |
143 | 144 |
144 NDArray array_value (bool = false) const | 145 NDArray array_value (bool = false) const |
145 { return NDArray (matrix); } | 146 { return NDArray (m_matrix); } |
146 | 147 |
147 FloatNDArray float_array_value (bool = false) const | 148 FloatNDArray float_array_value (bool = false) const |
148 { return FloatNDArray (matrix); } | 149 { return FloatNDArray (m_matrix); } |
149 | 150 |
150 Complex complex_value (bool = false) const; | 151 Complex complex_value (bool = false) const; |
151 | 152 |
152 FloatComplex float_complex_value (bool = false) const; | 153 FloatComplex float_complex_value (bool = false) const; |
153 | 154 |
154 ComplexMatrix complex_matrix_value (bool = false) const | 155 ComplexMatrix complex_matrix_value (bool = false) const |
155 { return ComplexMatrix (boolMatrix (matrix)); } | 156 { return ComplexMatrix (boolMatrix (m_matrix)); } |
156 | 157 |
157 FloatComplexMatrix float_complex_matrix_value (bool = false) const | 158 FloatComplexMatrix float_complex_matrix_value (bool = false) const |
158 { return FloatComplexMatrix (boolMatrix (matrix)); } | 159 { return FloatComplexMatrix (boolMatrix (m_matrix)); } |
159 | 160 |
160 ComplexNDArray complex_array_value (bool = false) const | 161 ComplexNDArray complex_array_value (bool = false) const |
161 { return ComplexNDArray (matrix); } | 162 { return ComplexNDArray (m_matrix); } |
162 | 163 |
163 FloatComplexNDArray float_complex_array_value (bool = false) const | 164 FloatComplexNDArray float_complex_array_value (bool = false) const |
164 { return FloatComplexNDArray (matrix); } | 165 { return FloatComplexNDArray (m_matrix); } |
165 | 166 |
166 charNDArray | 167 charNDArray |
167 char_array_value (bool = false) const | 168 char_array_value (bool = false) const |
168 { | 169 { |
169 charNDArray retval (dims ()); | 170 charNDArray retval (dims ()); |
170 | 171 |
171 octave_idx_type nel = numel (); | 172 octave_idx_type nel = numel (); |
172 | 173 |
173 for (octave_idx_type i = 0; i < nel; i++) | 174 for (octave_idx_type i = 0; i < nel; i++) |
174 retval(i) = static_cast<char> (matrix(i)); | 175 retval(i) = static_cast<char> (m_matrix(i)); |
175 | 176 |
176 return retval; | 177 return retval; |
177 } | 178 } |
178 | 179 |
179 boolMatrix bool_matrix_value (bool = false) const | 180 boolMatrix bool_matrix_value (bool = false) const |
180 { return boolMatrix (matrix); } | 181 { return boolMatrix (m_matrix); } |
181 | 182 |
182 boolNDArray bool_array_value (bool = false) const | 183 boolNDArray bool_array_value (bool = false) const |
183 { return matrix; } | 184 { return m_matrix; } |
184 | 185 |
185 SparseMatrix sparse_matrix_value (bool = false) const | 186 SparseMatrix sparse_matrix_value (bool = false) const |
186 { return SparseMatrix (Matrix (boolMatrix (matrix))); } | 187 { return SparseMatrix (Matrix (boolMatrix (m_matrix))); } |
187 | 188 |
188 SparseComplexMatrix sparse_complex_matrix_value (bool = false) const | 189 SparseComplexMatrix sparse_complex_matrix_value (bool = false) const |
189 { return SparseComplexMatrix (ComplexMatrix (boolMatrix (matrix))); } | 190 { return SparseComplexMatrix (ComplexMatrix (boolMatrix (m_matrix))); } |
190 | 191 |
191 SparseBoolMatrix sparse_bool_matrix_value (bool = false) const | 192 SparseBoolMatrix sparse_bool_matrix_value (bool = false) const |
192 { return SparseBoolMatrix (boolMatrix (matrix)); } | 193 { return SparseBoolMatrix (boolMatrix (m_matrix)); } |
193 | 194 |
194 octave_value convert_to_str_internal (bool pad, bool force, char type) const; | 195 octave_value convert_to_str_internal (bool pad, bool force, char type) const; |
195 | 196 |
196 octave_value as_double (void) const; | 197 octave_value as_double (void) const; |
197 octave_value as_single (void) const; | 198 octave_value as_single (void) const; |
225 bool load_hdf5 (octave_hdf5_id loc_id, const char *name); | 226 bool load_hdf5 (octave_hdf5_id loc_id, const char *name); |
226 | 227 |
227 int write (octave::stream& os, int block_size, | 228 int write (octave::stream& os, int block_size, |
228 oct_data_conv::data_type output_type, int skip, | 229 oct_data_conv::data_type output_type, int skip, |
229 octave::mach_info::float_format flt_fmt) const | 230 octave::mach_info::float_format flt_fmt) const |
230 { return os.write (matrix, block_size, output_type, skip, flt_fmt); } | 231 { return os.write (m_matrix, block_size, output_type, skip, flt_fmt); } |
231 | 232 |
232 mxArray * as_mxArray (bool interleaved) const; | 233 mxArray * as_mxArray (bool interleaved) const; |
233 | 234 |
234 // Mapper functions are converted to double for treatment | 235 // Mapper functions are converted to double for treatment |
235 octave_value map (unary_mapper_t umap) const | 236 octave_value map (unary_mapper_t umap) const |