26 #if defined (HAVE_CONFIG_H)
54 template <
typename R,
typename T>
67 T *cv = c.fortran_vec ();
85 template <
typename R,
typename T>
112 template <
typename T>
118 A.nnz () *
B.nnz ());
130 const T v =
A.data (Ai);
134 C.data (idx) = v *
B.data (Bi);
135 C.ridx (idx++) = Ci +
B.ridx (Bi);
138 C.cidx (Aj *
B.columns () + Bj + 1) = idx;
158 res_perm.xelem (rescol++) = a_add + pb(j);
164 template <
typename MTA,
typename MTB>
168 MTA am = octave_value_extract<MTA> (a);
169 MTB bm = octave_value_extract<MTB> (b);
179 retval = do_kron<PermMatrix, PermMatrix> (a, b);
183 retval = do_kron<SparseComplexMatrix, SparseComplexMatrix> (a, b);
185 retval = do_kron<SparseMatrix, SparseMatrix> (a, b);
203 retval = tmp.
diag ();
208 retval = do_kron<FloatComplexDiagMatrix, FloatComplexMatrix> (a, b);
210 retval = do_kron<FloatDiagMatrix, FloatComplexMatrix> (a, b);
212 retval = do_kron<FloatDiagMatrix, FloatMatrix> (a, b);
217 retval = do_kron<ComplexDiagMatrix, ComplexMatrix> (a, b);
219 retval = do_kron<DiagMatrix, ComplexMatrix> (a, b);
221 retval = do_kron<DiagMatrix, Matrix> (a, b);
227 retval = do_kron<FloatComplexMatrix, FloatComplexMatrix> (a, b);
229 retval = do_kron<FloatMatrix, FloatComplexMatrix> (a, b);
231 retval = do_kron<FloatMatrix, FloatMatrix> (a, b);
236 retval = do_kron<ComplexMatrix, ComplexMatrix> (a, b);
238 retval = do_kron<Matrix, ComplexMatrix> (a, b);
240 retval = do_kron<Matrix, Matrix> (a, b);
281 int nargin = args.length ();
337 OCTAVE_END_NAMESPACE(
octave)
int ndims() const
Size of the specified dimension.
octave_idx_type rows() const
const T * data() const
Size of the specified dimension.
octave_idx_type cols() const
octave_idx_type rows() const
T dgelem(octave_idx_type i) const
octave_idx_type cols() const
octave_idx_type diag_length() const
Template for N-dimensional array classes with like-type math operators.
Template for two dimensional diagonal array with math operators.
octave_idx_type rows() const
const Array< octave_idx_type > & col_perm_vec() const
Vector representing the dimensions (size) of an Array.
bool is_diag_matrix() const
octave_idx_type rows() const
bool is_perm_matrix() const
bool is_single_type() const
octave_idx_type columns() const
octave_value diag(octave_idx_type k=0) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
#define error_unless(cond)
octave_value dispatch_kron(const octave_value &a, const octave_value &b)
octave_value do_kron(const octave_value &a, const octave_value &b)
F77_RET_T const F77_INT F77_CMPLX const F77_INT F77_CMPLX * B
F77_RET_T const F77_INT F77_CMPLX * A
void mx_inline_mul(std::size_t n, R *r, const X *x, const Y *y)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))