Mercurial > octave
comparison libinterp/corefcn/schur.cc @ 33395:a258493e726a
Backed out changeset c714266d9f0d
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Sat, 13 Apr 2024 14:28:48 -0400 |
parents | c714266d9f0d |
children |
comparison
equal
deleted
inserted
replaced
33394:ee94862503e2 | 33395:a258493e726a |
---|---|
44 mark_upper_triangular (const Matrix& a) | 44 mark_upper_triangular (const Matrix& a) |
45 { | 45 { |
46 octave_value retval = a; | 46 octave_value retval = a; |
47 | 47 |
48 octave_idx_type n = a.rows (); | 48 octave_idx_type n = a.rows (); |
49 | 49 panic_unless (a.columns () == n); |
50 if (a.columns () != n) | |
51 error ("mark_upper_triangular: A must be a square matrix"); | |
52 | 50 |
53 const typename Matrix::element_type zero = typename Matrix::element_type (); | 51 const typename Matrix::element_type zero = typename Matrix::element_type (); |
54 | 52 |
55 for (octave_idx_type i = 0; i < n; i++) | 53 for (octave_idx_type i = 0; i < n; i++) |
56 if (a(i, i) == zero) | 54 if (a(i, i) == zero) |