25 #if defined (HAVE_CONFIG_H)
51 template <
typename R,
typename T>
55 assert (a.
ndims () == 2);
56 assert (b.
ndims () == 2);
78 template <
typename R,
typename T>
82 assert (b.
ndims () == 2);
103 template <
typename T>
120 const T v = A.
data (Ai);
124 C.data (idx) = v * B.
data (Bi);
125 C.ridx (idx++) = Ci + B.
ridx (Bi);
128 C.cidx (Aj * B.
columns () + Bj + 1) = idx;
147 res_perm.
xelem (rescol++) = a_add + pb(j);
153 template <
typename MTA,
typename MTB>
157 MTA am = octave_value_extract<MTA> (
a);
158 MTB bm = octave_value_extract<MTB> (
b);
168 retval = do_kron<PermMatrix, PermMatrix> (a, b);
172 retval = do_kron<SparseComplexMatrix, SparseComplexMatrix> (a, b);
174 retval = do_kron<SparseMatrix, SparseMatrix> (
a,
b);
192 retval = tmp.
diag ();
197 retval = do_kron<FloatComplexDiagMatrix, FloatComplexMatrix> (a, b);
199 retval = do_kron<FloatDiagMatrix, FloatComplexMatrix> (a, b);
201 retval = do_kron<FloatDiagMatrix, FloatMatrix> (
a,
b);
206 retval = do_kron<ComplexDiagMatrix, ComplexMatrix> (a, b);
208 retval = do_kron<DiagMatrix, ComplexMatrix> (a, b);
210 retval = do_kron<DiagMatrix, Matrix> (
a,
b);
216 retval = do_kron<FloatComplexMatrix, FloatComplexMatrix> (a, b);
218 retval = do_kron<FloatMatrix, FloatComplexMatrix> (a, b);
220 retval = do_kron<FloatMatrix, FloatMatrix> (
a,
b);
225 retval = do_kron<ComplexMatrix, ComplexMatrix> (a, b);
227 retval = do_kron<Matrix, ComplexMatrix> (a, b);
229 retval = do_kron<Matrix, Matrix> (
a,
b);
octave_value dispatch_kron(const octave_value &a, const octave_value &b)
octave_idx_type rows(void) const
octave_idx_type rows(void) const
octave_idx_type rows(void) const
OCTINTERP_API void print_usage(void)
octave_value diag(octave_idx_type k=0) const
#define DEFUN(name, args_name, nargout_name, doc)
bool is_perm_matrix(void) const
octave_idx_type rows(void) const
octave_idx_type * cidx(void)
octave_idx_type columns(void) const
Template for N-dimensional array classes with like-type math operators.
octave_idx_type rows(void) const
void mx_inline_mul(size_t n, R *r, const X *x, const Y *y)
octave_idx_type nnz(void) const
Actual number of nonzero terms.
T dgelem(octave_idx_type i) const
F77_RET_T const F77_INT F77_CMPLX const F77_INT F77_CMPLX * B
octave_idx_type columns(void) const
bool is_sparse_type(void) const
const Array< octave_idx_type > & col_perm_vec(void) const
const T * data(void) const
bool is_complex_type(void) const
Template for two dimensional diagonal array with math operators.
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
static MArray< T > kron(const MArray< R > &a, const MArray< T > &b)
T & xelem(octave_idx_type n)
octave_idx_type cols(void) const
octave_idx_type * ridx(void)
octave_value do_kron(const octave_value &a, const octave_value &b)
=val(i)}if ode{val(i)}occurs in table i
octave_idx_type diag_length(void) const
const T * fortran_vec(void) const
bool is_single_type(void) const
octave_idx_type cols(void) const
Vector representing the dimensions (size) of an Array.
bool is_diag_matrix(void) const
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
F77_RET_T const F77_INT F77_CMPLX * A