comparison liboctave/fCMatrix.cc @ 13828:f1b023fd098d

always initialize info and rcon in Matrix determinant methods * dMatrix.cc (Matrix::determinant): Always initialize info and rcon. * CMatrix.cc (ComplexMatrix::determinant): Likewise. * fMatrix.cc (FloatMatrix::determinant): Likewise. * fCMatrix.cc (FloatComplexMatrix::determinant): Likewise.
author John W. Eaton <jwe@octave.org>
date Sat, 05 Nov 2011 01:59:40 -0400
parents 353c71c76f22
children 8e25d6d1db10
comparison
equal deleted inserted replaced
13827:822f80b90866 13828:f1b023fd098d
1565 FloatComplexMatrix::determinant (MatrixType& mattype, 1565 FloatComplexMatrix::determinant (MatrixType& mattype,
1566 octave_idx_type& info, float& rcon, int calc_cond) const 1566 octave_idx_type& info, float& rcon, int calc_cond) const
1567 { 1567 {
1568 FloatComplexDET retval (1.0); 1568 FloatComplexDET retval (1.0);
1569 1569
1570 info = 0;
1571 rcon = 0.0;
1572
1570 octave_idx_type nr = rows (); 1573 octave_idx_type nr = rows ();
1571 octave_idx_type nc = cols (); 1574 octave_idx_type nc = cols ();
1572 1575
1573 if (nr != nc) 1576 if (nr != nc)
1574 (*current_liboctave_error_handler) ("matrix must be square"); 1577 (*current_liboctave_error_handler) ("matrix must be square");
1593 else if (typ == MatrixType::Hermitian) 1596 else if (typ == MatrixType::Hermitian)
1594 { 1597 {
1595 FloatComplexMatrix atmp = *this; 1598 FloatComplexMatrix atmp = *this;
1596 FloatComplex *tmp_data = atmp.fortran_vec (); 1599 FloatComplex *tmp_data = atmp.fortran_vec ();
1597 1600
1598 info = 0;
1599 float anorm = 0; 1601 float anorm = 0;
1600 if (calc_cond) anorm = xnorm (*this, 1); 1602 if (calc_cond) anorm = xnorm (*this, 1);
1601 1603
1602 1604
1603 char job = 'L'; 1605 char job = 'L';