26#if defined (HAVE_CONFIG_H)
37err_invalid_permutation ()
39 (*current_liboctave_error_handler) (
"PermMatrix: invalid permutation vector");
47 if (! octave::idx_vector (p).is_permutation (p.
numel ()))
48 err_invalid_permutation ();
58 setup (p, colp, check);
62PermMatrix::setup (
const octave::idx_vector& idx,
bool colp,
octave_idx_type n)
66 if (! idx.is_permutation (
len))
67 err_invalid_permutation ();
94 if (i < 0 || j < 0 || i >
len || j >
len)
95 (*current_liboctave_error_handler) (
"index out of range");
158 return inverse ().pos_power (-m);
160 return pos_power (m);
181 for (j = 1, ic = p[ics]; j != m && ic != ics; j++, ic = p[ic]) ;
187 for (j = 0, ic = ics; j != mm; j++, ic = p[ic]) ;
195 jcs = p[jcs]; ic = p[ic];
221 octave::err_nonconformant (
"operator *", n, n, b.
rows (), b.
rows ());
PermMatrix operator*(const PermMatrix &a, const PermMatrix &b)
N Dimensional Array with copy-on-write semantics.
octave_idx_type & xelem(octave_idx_type n)
Array< T, Alloc > index(const octave::idx_vector &i) const
Indexing without resizing.
Array< T, Alloc > & operator=(const Array< T, Alloc > &a)
const octave_idx_type * data() const
octave_idx_type numel() const
Number of elements in the array.
octave_idx_type elem(octave_idx_type i, octave_idx_type j) const
octave_idx_type rows() const
octave_idx_type checkelem(octave_idx_type i, octave_idx_type j) const
PermMatrix inverse() const
static PermMatrix eye(octave_idx_type n)
octave_idx_type perm_length() const
octave_idx_type columns() const
octave_idx_type determinant() const
PermMatrix power(octave_idx_type n) const
const Array< octave_idx_type > & col_perm_vec() const
PermMatrix transpose() const
Vector representing the dimensions (size) of an Array.
#define OCTAVE_LOCAL_BUFFER(T, buf, size)