23 #if ! defined (octave_Sparse_perm_op_defs_h) 24 #define octave_Sparse_perm_op_defs_h 1 26 #include "octave-config.h" 36 template <
typename SM>
58 r.xridx (
i) = pcol[
a.ridx (
i)];
60 sort.
sort (r.xridx () + r.xcidx (j), sidx, r.xcidx (j+1) - r.xcidx (j));
62 r.
xdata (
i) =
a.data (sidx[ii++]);
68 template <
typename SM>
74 p.rows (),
p.cols (),
a.rows (),
a.cols ());
79 template <
typename SM>
90 r.xcidx (prow[j_src]) =
a.cidx (j_src+1) -
a.cidx (j_src);
106 for (
k = r.xcidx (j); k_src < kend_src; ++
k, ++k_src)
108 r.xridx (
k) =
a.ridx (k_src);
109 r.xdata (
k) =
a.data (k_src);
112 assert (k_src == nent);
117 template <
typename SM>
130 r.xcidx (j+1) = r.xcidx (j) + (
a.cidx (j_src+1) -
a.cidx (j_src));
132 assert (r.xcidx (nc) == nent);
141 for (k_src =
a.cidx (j_src); k_src < kend_src; ++k_src, ++
k)
143 r.xridx (
k) =
a.ridx (k_src);
144 r.xdata (
k) =
a.data (k_src);
152 template <
typename SM>
158 a.rows (),
a.cols (),
p.rows (),
p.cols ());
SM octinternal_do_mul_colpm_sm(const octave_idx_type *pcol, const SM &a)
SM octinternal_do_mul_pm_sm(const PermMatrix &p, const SM &a)
Sparse< bool > sort(octave_idx_type dim=0, sortmode mode=ASCENDING) const
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)
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
void err_nonconformant(const char *op, octave_idx_type op1_len, octave_idx_type op2_len)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
octave_idx_type * xcidx(void)