Mercurial > hg > octave-jordi
diff liboctave/CMatrix.cc @ 2349:b369227ce3d2
[project @ 1996-07-27 07:59:20 by jwe]
author | jwe |
---|---|
date | Sat, 27 Jul 1996 07:59:22 +0000 (1996-07-27) |
parents | 1b57120c997b |
children | 2ce6e1ec9b53 |
line wrap: on
line diff
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -107,6 +107,20 @@ elem (i, j) = a.elem (i, j); } +ComplexMatrix::ComplexMatrix (const RowVector& rv) + : MArray2<Complex> (1, rv.length (), 0.0) +{ + for (int i = 0; i < rv.length (); i++) + elem (0, i) = rv.elem (i); +} + +ComplexMatrix::ComplexMatrix (const ColumnVector& cv) + : MArray2<Complex> (cv.length (), 1, 0.0) +{ + for (int i = 0; i < cv.length (); i++) + elem (i, 0) = cv.elem (i); +} + ComplexMatrix::ComplexMatrix (const DiagMatrix& a) : MArray2<Complex> (a.rows (), a.cols (), 0.0) { @@ -114,6 +128,20 @@ elem (i, i) = a.elem (i, i); } +ComplexMatrix::ComplexMatrix (const ComplexRowVector& rv) + : MArray2<Complex> (1, rv.length (), 0.0) +{ + for (int i = 0; i < rv.length (); i++) + elem (0, i) = rv.elem (i); +} + +ComplexMatrix::ComplexMatrix (const ComplexColumnVector& cv) + : MArray2<Complex> (cv.length (), 1, 0.0) +{ + for (int i = 0; i < cv.length (); i++) + elem (i, 0) = cv.elem (i); +} + ComplexMatrix::ComplexMatrix (const ComplexDiagMatrix& a) : MArray2<Complex> (a.rows (), a.cols (), 0.0) {