comparison liboctave/CMatrix.cc @ 3180:c17387059fd3

[project @ 1998-09-24 18:59:11 by jwe]
author jwe
date Thu, 24 Sep 1998 19:00:19 +0000
parents fccab8e7d35f
children 7aae2c3636a7
comparison
equal deleted inserted replaced
3179:f657159c8152 3180:c17387059fd3
162 162
163 // XXX FIXME XXX -- could we use a templated mixed-type copy function 163 // XXX FIXME XXX -- could we use a templated mixed-type copy function
164 // here? 164 // here?
165 165
166 ComplexMatrix::ComplexMatrix (const boolMatrix& a) 166 ComplexMatrix::ComplexMatrix (const boolMatrix& a)
167 : MArray2<Complex> (a.rows (), a.cols (), 0.0)
167 { 168 {
168 for (int i = 0; i < a.cols (); i++) 169 for (int i = 0; i < a.cols (); i++)
169 for (int j = 0; j < a.rows (); j++) 170 for (int j = 0; j < a.rows (); j++)
170 elem (i, j) = a.elem (i, j); 171 elem (i, j) = a.elem (i, j);
171 } 172 }
172 173
173 ComplexMatrix::ComplexMatrix (const charMatrix& a) 174 ComplexMatrix::ComplexMatrix (const charMatrix& a)
175 : MArray2<Complex> (a.rows (), a.cols (), 0.0)
174 { 176 {
175 for (int i = 0; i < a.cols (); i++) 177 for (int i = 0; i < a.cols (); i++)
176 for (int j = 0; j < a.rows (); j++) 178 for (int j = 0; j < a.rows (); j++)
177 elem (i, j) = a.elem (i, j); 179 elem (i, j) = a.elem (i, j);
178 } 180 }