Mercurial > hg > octave-nkf
comparison liboctave/dMatrix.cc @ 1574:dd7d27461567
[project @ 1995-10-19 04:34:20 by jwe]
author | jwe |
---|---|
date | Thu, 19 Oct 1995 04:34:44 +0000 |
parents | ffee86c37931 |
children | 23aa282707e8 |
comparison
equal
deleted
inserted
replaced
1573:403c60daa8c7 | 1574:dd7d27461567 |
---|---|
89 Matrix::Matrix (const DiagMatrix& a) | 89 Matrix::Matrix (const DiagMatrix& a) |
90 : MArray2<double> (a.rows (), a.cols (), 0.0) | 90 : MArray2<double> (a.rows (), a.cols (), 0.0) |
91 { | 91 { |
92 for (int i = 0; i < a.length (); i++) | 92 for (int i = 0; i < a.length (); i++) |
93 elem (i, i) = a.elem (i, i); | 93 elem (i, i) = a.elem (i, i); |
94 } | |
95 | |
96 // XXX FIXME XXX -- could we use a templated mixed-type copy function | |
97 // here? | |
98 | |
99 Matrix::Matrix (const charMatrix& a) | |
100 : MArray2<double> (a.rows (), a.cols ()) | |
101 { | |
102 for (int i = 0; i < a.rows (); i++) | |
103 for (int j = 0; j < a.cols (); j++) | |
104 elem (i, j) = a.elem (i, j); | |
94 } | 105 } |
95 | 106 |
96 int | 107 int |
97 Matrix::operator == (const Matrix& a) const | 108 Matrix::operator == (const Matrix& a) const |
98 { | 109 { |