25 #if defined (HAVE_CONFIG_H) 51 template <
typename R,
typename T>
64 T *cv =
c.fortran_vec ();
78 template <
typename R,
typename T>
103 template <
typename T>
109 A.nnz () *
B.nnz ());
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);
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);
269 int nargin = args.length ();
octave_value dispatch_kron(const octave_value &a, const octave_value &b)
Template for N-dimensional array classes with like-type math operators.
F77_RET_T const F77_INT F77_CMPLX const F77_INT F77_CMPLX * B
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
bool is_perm_matrix(void) const
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
void mx_inline_mul(size_t n, R *r, const X *x, const Y *y)
Template for two dimensional diagonal array with math operators.
F77_RET_T const F77_INT F77_CMPLX * A
octave_idx_type columns(void) const
bool is_single_type(void) const
octave_idx_type rows(void) const
bool issparse(void) const
static MArray< T > kron(const MArray< R > &a, const MArray< T > &b)
T & xelem(octave_idx_type n)
octave_value diag(octave_idx_type k=0) const
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value do_kron(const octave_value &a, const octave_value &b)
bool iscomplex(void) const
bool is_diag_matrix(void) const
Vector representing the dimensions (size) of an Array.