Mercurial > hg > octave-nkf
comparison liboctave/PermMatrix.h @ 8958:6ccc12cc65ef
implement raising a permutation matrix to integer power
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 11 Mar 2009 14:07:24 +0100 |
parents | eb63fbe60fab |
children | 3c1762c7e787 |
comparison
equal
deleted
inserted
replaced
8957:360aa52b5942 | 8958:6ccc12cc65ef |
---|---|
95 PermMatrix inverse (void) const; | 95 PermMatrix inverse (void) const; |
96 | 96 |
97 // Determinant, i.e. the sign of permutation. | 97 // Determinant, i.e. the sign of permutation. |
98 octave_idx_type determinant (void) const; | 98 octave_idx_type determinant (void) const; |
99 | 99 |
100 // Efficient integer power of a permutation. | |
101 PermMatrix power (octave_idx_type n) const; | |
102 | |
100 bool is_col_perm (void) const { return _colp; } | 103 bool is_col_perm (void) const { return _colp; } |
101 bool is_row_perm (void) const { return !_colp; } | 104 bool is_row_perm (void) const { return !_colp; } |
102 | 105 |
103 friend PermMatrix operator *(const PermMatrix& a, const PermMatrix& b); | 106 friend PermMatrix operator *(const PermMatrix& a, const PermMatrix& b); |
104 | 107 |