23 #if !defined (octave_Sparse_perm_op_defs_h)
24 #define octave_Sparse_perm_op_defs_h 1
28 template <
typename SM>
40 r.
xcidx (j) = a.cidx (j);
50 r.xridx (i) = pcol[a.ridx (i)];
52 sort.
sort (r.xridx () + r.xcidx (j), sidx, r.xcidx (j+1) - r.xcidx (j));
54 r.xdata (i) = a.data (sidx[ii++]);
60 template <
typename SM>
73 template <
typename SM>
84 r.xcidx (prow[j_src]) = a.cidx (j_src+1) - a.cidx (j_src);
100 for (k = r.xcidx (j); k_src < kend_src; ++k, ++k_src)
102 r.xridx (k) = a.ridx (k_src);
103 r.xdata (k) = a.data (k_src);
106 assert (k_src == nent);
111 template <
typename SM>
124 r.xcidx (j+1) = r.xcidx (j) + (a.cidx (j_src+1) - a.cidx (j_src));
126 assert (r.xcidx (nc) == nent);
135 for (k_src = a.cidx (j_src); k_src < kend_src; ++k_src, ++k)
137 r.xridx (k) = a.ridx (k_src);
138 r.xdata (k) = a.data (k_src);
146 template <
typename SM>
159 #endif // octave_Sparse_perm_op_defs_h
void gripe_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
octave_idx_type rows(void) const
SM octinternal_do_mul_colpm_sm(const octave_idx_type *pcol, const SM &a)
octave_idx_type cols(void) const
SM octinternal_do_mul_pm_sm(const PermMatrix &p, const SM &a)
octave_idx_type * xcidx(void)
SM octinternal_do_mul_sm_pm(const SM &a, const PermMatrix &p)
SM octinternal_do_mul_sm_colpm(const SM &a, const octave_idx_type *pcol)
SM octinternal_do_mul_sm_rowpm(const SM &a, const octave_idx_type *prow)
const Array< octave_idx_type > & col_perm_vec(void) const
Sparse< bool > sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
const T * data(void) const
void sort(T *data, octave_idx_type nel)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)