Matrix  $Rev: 3071 $ at $LastChangedDate: 2015-03-26 15:35:47 +0100 (Thu, 26 Mar 2015) $
init.c
Go to the documentation of this file.
1 #include "Mutils.h"
2 #include "abIndex.h"
3 #include "chm_common.h"
4 #include "CHMfactor.h"
5 #include "Csparse.h"
6 #include "Tsparse.h"
7 #include "dense.h"
8 #include "dgCMatrix.h"
9 #include "dgTMatrix.h"
10 #include "dgeMatrix.h"
11 #include "dpoMatrix.h"
12 #include "dppMatrix.h"
13 #include "dsCMatrix.h"
14 #include "TMatrix_as.h"
15 #include "dspMatrix.h"
16 #include "dsyMatrix.h"
17 #include "dtCMatrix.h"
18 #include "dtTMatrix.h"
19 #include "dtrMatrix.h"
20 #include "dtpMatrix.h"
21 #include "factorizations.h"
22 #include "ldense.h"
23 #include "lgCMatrix.h"
24 #include "sparseQR.h"
25 #include <R_ext/Rdynload.h>
26 
27 #include "Syms.h"
28 
29 #define CALLDEF(name, n) {#name, (DL_FUNC) &name, n}
30 #define EXTDEF(name, n) {#name, (DL_FUNC) &name, n}
31 
32 
33 static R_CallMethodDef CallEntries[] = {
78  CALLDEF(diag_tC, 2),
79  CALLDEF(LU_expand, 1),
80  CALLDEF(LU_validate, 1),
84  CALLDEF(R_all0, 1),
85  CALLDEF(R_any0, 1),
87 #ifdef _Matrix_has_SVD_
88  CALLDEF(SVD_validate, 1),
89 #endif
99  CALLDEF(dense_band, 3),
104  CALLDEF(Dim_validate, 2),
106 
107  CALLDEF(dgCMatrix_LU, 5),
108  CALLDEF(dgCMatrix_QR, 3),
109 #ifdef Matrix_with_SPQR
110  CALLDEF(dgCMatrix_SPQR, 4),
111 #endif
117  /* CALLDEF(dgCMatrix_lusol, 2), */
124  CALLDEF(dgeMatrix_LU, 2),
193 /* CALLDEF(dtCMatrix_solve, 1), */
227 
228  /* for dgC* _and_ lgC* : */
235 
236  CALLDEF(lapack_qr, 2),
237 
240 
247 
249  CALLDEF(lsq_dense_QR, 2),
251  CALLDEF(sparseQR_qty, 4),
257 
258 /* still simple placeholders, but already used in ../R/AllClass.R : */
262 
264 
266  CALLDEF(m_encodeInd, 4),
267  CALLDEF(m_encodeInd2, 5),
268 
269  CALLDEF(Matrix_rle_i, 2),
270  CALLDEF(Matrix_rle_d, 2),
271 
273 
275  {NULL, NULL, 0}
276 };
277 
278 static const R_ExternalMethodDef ExtEntries[] = {
279  EXTDEF(Mmatrix, 7),
280  {NULL, NULL, 0}
281 };
282 
283 void
284 #ifdef HAVE_VISIBILITY_ATTRIBUTE
285 __attribute__ ((visibility ("default")))
286 #endif
287 R_init_Matrix(DllInfo *dll)
288 {
289  R_registerRoutines(dll, NULL, CallEntries, NULL, ExtEntries);
290  R_useDynamicSymbols(dll, FALSE);
291 
292 /* These are callable from other packages' C code: */
293 
294 #define RREGDEF(name) R_RegisterCCallable("Matrix", #name, (DL_FUNC) name)
295 
297 
307 
308  RREGDEF(cholmod_aat);
309  RREGDEF(cholmod_add);
310  RREGDEF(cholmod_allocate_dense);
311  RREGDEF(cholmod_allocate_sparse);
312  RREGDEF(cholmod_allocate_triplet);
313  RREGDEF(cholmod_analyze);
314  RREGDEF(cholmod_analyze_p);
315  RREGDEF(cholmod_band_inplace);
316  RREGDEF(cholmod_change_factor);
317  RREGDEF(cholmod_copy);
318  RREGDEF(cholmod_copy_dense);
319  RREGDEF(cholmod_copy_factor);
320  RREGDEF(cholmod_copy_sparse);
321  RREGDEF(cholmod_dense_to_sparse);
322  RREGDEF(cholmod_factor_to_sparse);
323  RREGDEF(cholmod_factorize);
324  RREGDEF(cholmod_factorize_p);
325  RREGDEF(cholmod_finish);
326  RREGDEF(cholmod_free_dense);
327  RREGDEF(cholmod_free_factor);
328  RREGDEF(cholmod_free_sparse);
329  RREGDEF(cholmod_free_triplet);
330  RREGDEF(cholmod_nnz);
331  RREGDEF(cholmod_scale);
332  RREGDEF(cholmod_sdmult);
333  RREGDEF(cholmod_solve);
334  RREGDEF(cholmod_solve2);
335  RREGDEF(cholmod_sort);
336  RREGDEF(cholmod_sparse_to_dense);
337  RREGDEF(cholmod_sparse_to_triplet);
338  RREGDEF(cholmod_speye);
339  RREGDEF(cholmod_spsolve);
340  RREGDEF(cholmod_ssmult);
341  RREGDEF(cholmod_start);
342  RREGDEF(cholmod_submatrix);
343  RREGDEF(cholmod_transpose);
344  RREGDEF(cholmod_triplet_to_sparse);
345  RREGDEF(cholmod_vertcat);
346  RREGDEF(cholmod_updown);
347 
350 
351  R_cholmod_start(&c);
352 // R_cholmod_start(&cl); << TODO; needs more work in ./chm_common.c etc
353 
354  Matrix_betaSym = install("beta");
355  Matrix_DimNamesSym = install("Dimnames");
356  Matrix_DimSym = install("Dim");
357  Matrix_diagSym = install("diag");
358  Matrix_factorSym = install("factors");
359  Matrix_iSym = install("i");
360  Matrix_jSym = install("j");
361  Matrix_lengthSym = install("length");
362  Matrix_pSym = install("p");
363  Matrix_permSym = install("perm");
364  Matrix_uploSym = install("uplo");
365  Matrix_xSym = install("x");
366  Matrix_VSym = install("V");
367 
368  Matrix_NS = R_FindNamespace(mkString("Matrix"));
369  if(Matrix_NS == R_UnboundValue)
370  error(_("missing 'Matrix' namespace: should never happen"));
371 
372 #ifdef DEBUG_Matrix
373  if(isEnvironment(Matrix_NS))
374  Rprintf("Matrix_NS: %s\n",
375  CHAR(asChar(eval(lang2(install("format"),Matrix_NS),
376  R_GlobalEnv))));
377  else
378 #else
379  if(!isEnvironment(Matrix_NS))
380 #endif
381  error(_("Matrix namespace not determined correctly"));
382 }
383 
384 void R_unload_Matrix(DllInfo *dll)
385 {
386  cholmod_finish(&c);
387 }
SEXP Matrix_DimSym
Definition: Syms.h:2
SEXP CHMfactor_ldetL2up(SEXP x, SEXP parent, SEXP mult)
Definition: CHMfactor.c:169
SEXP dppMatrix_solve(SEXP x)
Definition: dppMatrix.c:56
SEXP dtCMatrix_sparse_solve(SEXP a, SEXP b)
Definition: dtCMatrix.c:114
#define RREGDEF(name)
SEXP ltpMatrix_getDiag(SEXP x)
Definition: dtpMatrix.c:79
SEXP CHMfactor_updown(SEXP upd, SEXP C_, SEXP L_)
Definition: CHMfactor.c:38
SEXP ltrMatrix_getDiag(SEXP x)
Definition: dtrMatrix.c:271
SEXP dtrMatrix_as_matrix(SEXP from, SEXP keep_dimnames)
Definition: dtrMatrix.c:236
SEXP Csparse_drop(SEXP x, SEXP tol)
SEXP lgC_to_matrix(SEXP x)
Definition: lgCMatrix.c:6
SEXP tTMatrix_validate(SEXP x)
Definition: dtTMatrix.c:6
SEXP lgeMatrix_setDiag(SEXP x, SEXP d)
Definition: dgeMatrix.c:436
SEXP dgeMatrix_colsums(SEXP x, SEXP naRmP, SEXP cols, SEXP mean)
Definition: dgeMatrix.c:839
SEXP dsCMatrix_Csparse_solve(SEXP a, SEXP b, SEXP LDL)
Definition: dsCMatrix.c:197
SEXP dspMatrix_trf(SEXP x)
Definition: dspMatrix.c:165
SEXP lsTMatrix_as_lgTMatrix(SEXP x)
Definition: TMatrix_as.c:135
SEXP dtpMatrix_setDiag(SEXP x, SEXP d)
Definition: dtpMatrix.c:89
SEXP Csparse_to_nz_pattern(SEXP x, SEXP tri)
Definition: Csparse.c:210
SEXP lsyMatrix_as_lgeMatrix(SEXP from, SEXP kind)
Definition: ldense.c:120
SEXP Matrix_expand_pointers(SEXP pP)
Definition: Mutils.c:571
SEXP Matrix_xSym
Definition: Syms.h:2
SEXP dense_to_symmetric(SEXP x, SEXP uplo, SEXP symm_test)
Definition: dense.c:341
SEXP Matrix_lengthSym
Definition: Syms.h:2
SEXP R_to_CMatrix(SEXP x)
Definition: dgCMatrix.c:76
SEXP nCsparse_subassign(SEXP x, SEXP i_, SEXP j_, SEXP value)
SEXP m_encodeInd(SEXP ij, SEXP di, SEXP orig_1, SEXP chk_bnds)
Encode Matrix index (i,j) |–> i + j * nrow {i,j : 0-origin}.
Definition: Mutils.c:880
SEXP Tsparse_to_Csparse(SEXP x, SEXP tri)
Definition: Tsparse.c:34
SEXP dsCMatrix_Cholesky(SEXP Ap, SEXP perm, SEXP LDL, SEXP super, SEXP Imult)
Definition: dsCMatrix.c:149
SEXP sparseQR_qty(SEXP qr, SEXP y, SEXP trans, SEXP keep_dimnames)
Given a sparse QR decomposition and y, compute Q y or Q'y.
Definition: sparseQR.c:84
SEXP R_all0(SEXP x)
Definition: Mutils.c:1180
SEXP R_any0(SEXP x)
Definition: Mutils.c:1222
SEXP Matrix_factorSym
Definition: Syms.h:2
SEXP geMatrix_geMatrix_crossprod(SEXP x, SEXP y, SEXP trans)
Definition: dgeMatrix.c:202
SEXP sparseQR_validate(SEXP x)
Definition: sparseQR.c:3
SEXP Mmatrix(SEXP args)
Definition: Mutils.c:980
SEXP Matrix_DimNamesSym
Definition: Syms.h:2
SEXP CHM_set_common_env(SEXP rho)
Definition: chm_common.c:74
SEXP dspMatrix_validate(SEXP obj)
Definition: dspMatrix.c:4
CHM_DN as_cholmod_dense(CHM_DN ans, SEXP x)
Populate ans with the pointers from x and modify its scalar elements accordingly. ...
Definition: chm_common.c:672
SEXP dpoMatrix_matrix_solve(SEXP a, SEXP b)
Definition: dpoMatrix.c:109
SEXP CHMfactor_to_sparse(SEXP x)
Definition: CHMfactor.c:4
SEXP Matrix_betaSym
Definition: Syms.h:2
SEXP dsyMatrix_as_dspMatrix(SEXP from)
Definition: dsyMatrix.c:170
SEXP chm_sparse_to_SEXP(CHM_SP a, int dofree, int uploT, int Rkind, const char *diag, SEXP dn)
Copy the contents of a to an appropriate CsparseMatrix object and, optionally, free a or free both a ...
Definition: chm_common.c:335
SEXP Csparse_validate(SEXP x)
Definition: Csparse.c:39
SEXP dtrMatrix_chol2inv(SEXP a)
Definition: dtrMatrix.c:65
SEXP Csparse_Csparse_crossprod(SEXP a, SEXP b, SEXP trans, SEXP bool_arith)
[t]crossprod (, )
Definition: Csparse.c:520
SEXP Matrix_uploSym
Definition: Syms.h:2
SEXP dtrMatrix_norm(SEXP obj, SEXP type)
Definition: dtrMatrix.c:36
SEXP Cholesky_validate(SEXP obj)
SEXP Csparse_to_Tsparse(SEXP x, SEXP tri)
Definition: Csparse.c:305
SEXP dgeMatrix_matrix_mm(SEXP a, SEXP bP, SEXP right)
Definition: dgeMatrix.c:299
SEXP dup_mMatrix_as_dgeMatrix(SEXP A)
Definition: Mutils.c:852
SEXP dsyMatrix_matrix_solve(SEXP a, SEXP b)
Definition: dsyMatrix.c:70
SEXP dspMatrix_setDiag(SEXP x, SEXP d)
Definition: dspMatrix.c:108
SEXP Csparse_submatrix(SEXP x, SEXP i, SEXP j)
SEXP dtpMatrix_matrix_solve(SEXP a, SEXP b)
Definition: dtpMatrix.c:142
SEXP dtpMatrix_rcond(SEXP obj, SEXP type)
Definition: dtpMatrix.c:42
SEXP Csparse_crossprod(SEXP x, SEXP trans, SEXP triplet, SEXP bool_arith)
SEXP dense_band(SEXP x, SEXP k1P, SEXP k2P)
Definition: dense.c:279
SEXP geMatrix_crossprod(SEXP x, SEXP trans)
Definition: dgeMatrix.c:137
SEXP dsCMatrix_chol(SEXP x, SEXP pivot)
Definition: dsCMatrix.c:121
SEXP dspMatrix_getDiag(SEXP x)
Definition: dspMatrix.c:87
SEXP dtpMatrix_addDiag(SEXP x, SEXP d)
Definition: dtpMatrix.c:101
SEXP CHMfactor_validate(SEXP obj)
Definition: chm_common.c:1259
SEXP pBunchKaufman_validate(SEXP obj)
SEXP Csparse_to_matrix(SEXP x, SEXP chk, SEXP symm)
Definition: Csparse.c:284
SEXP Csparse_MatrixMarket(SEXP x, SEXP fname)
SEXP get_SuiteSparse_version()
Definition: chm_common.c:8
SEXP ntTMatrix_as_ntrMatrix(SEXP x)
Definition: TMatrix_as.c:160
SEXP compressed_non_0_ij(SEXP x, SEXP colP)
Return a 2 column matrix '' cbind(i, j) '' of 0-origin index vectors (i,j) which entirely correspond ...
Definition: dgCMatrix.c:122
SEXP lapack_qr(SEXP Xin, SEXP tl)
Definition: dense.c:171
SEXP dsCMatrix_LDL_D(SEXP Ap, SEXP permP, SEXP resultKind)
Fast version of getting at the diagonal matrix D of the (generalized) simplicial Cholesky LDL' decomp...
Definition: dsCMatrix.c:178
SEXP R_chm_factor_name(SEXP perm, SEXP LDL, SEXP super)
Definition: dsCMatrix.c:35
SEXP lgTMatrix_to_lgeMatrix(SEXP x)
SEXP lsyMatrix_as_lspMatrix(SEXP from, SEXP kind)
Definition: ldense.c:29
SEXP dgeMatrix_norm(SEXP obj, SEXP type)
Definition: dgeMatrix.c:49
SEXP dtrMatrix_getDiag(SEXP x)
Definition: dtrMatrix.c:267
SEXP dgCMatrix_colSums(SEXP x, SEXP NArm, SEXP spRes, SEXP trans, SEXP means)
SEXP dgeMatrix_solve(SEXP a)
Definition: dgeMatrix.c:535
SEXP ltrMatrix_setDiag(SEXP x, SEXP d)
Definition: dtrMatrix.c:300
SEXP dgeMatrix_dtpMatrix_mm(SEXP x, SEXP y)
Definition: dtpMatrix.c:172
SEXP Csparse_to_vector(SEXP x)
Definition: Csparse.c:300
SEXP Matrix_jSym
Definition: Syms.h:2
SEXP dsCMatrix_matrix_solve(SEXP a, SEXP b, SEXP LDL)
Definition: dsCMatrix.c:219
SEXP Csparse_sort(SEXP x)
Definition: Csparse.c:56
static R_INLINE SEXP inv_permutation(SEXP p_, SEXP zero_p, SEXP zero_res)
Inverse Permutation C version of .inv.perm.R <- function(p) { p[p] <- seq_along(p) ; p }...
Definition: Mutils.h:293
SEXP sparseQR_resid_fitted(SEXP qr, SEXP y, SEXP want_resid)
Compute qr.resid(qr, y) or qr.fitted(qr, y)
Definition: sparseQR.c:186
SEXP lgeMatrix_getDiag(SEXP x)
Definition: dgeMatrix.c:396
SEXP dtrMatrix_matrix_solve(SEXP a, SEXP b)
Definition: dtrMatrix.c:82
SEXP igCMatrix_colSums(SEXP x, SEXP NArm, SEXP spRes, SEXP trans, SEXP means)
SEXP dgeMatrix_validate(SEXP obj)
Definition: dgeMatrix.c:16
SEXP dppMatrix_matrix_solve(SEXP a, SEXP b)
Definition: dppMatrix.c:71
int R_cholmod_start(CHM_CM c)
Initialize the CHOLMOD library and replace the print and error functions by R-specific versions...
Definition: chm_common.c:810
SEXP dtpMatrix_validate(SEXP obj)
Definition: dtpMatrix.c:7
SEXP CHMfactor_spsolve(SEXP a, SEXP b, SEXP system)
Definition: CHMfactor.c:51
SEXP lspMatrix_getDiag(SEXP x)
Definition: dspMatrix.c:98
SEXP ltrMatrix_as_lgeMatrix(SEXP from, SEXP kind)
Definition: ldense.c:103
SEXP dtrMatrix_rcond(SEXP obj, SEXP type)
Definition: dtrMatrix.c:41
SEXP xCMatrix_validate(SEXP x)
Definition: dgCMatrix.c:11
SEXP dtpMatrix_norm(SEXP obj, SEXP type)
Definition: dtpMatrix.c:37
SEXP dtrMatrix_as_dtpMatrix(SEXP from)
Definition: dtrMatrix.c:319
SEXP destructive_CHM_update(SEXP object, SEXP parent, SEXP mult)
Definition: CHMfactor.c:160
SEXP MatrixFactorization_validate(SEXP obj)
Definition: factorizations.c:3
SEXP xRMatrix_validate(SEXP x)
Definition: dgCMatrix.c:23
SEXP Matrix_rle_i(SEXP x_, SEXP force_)
SEXP dpoMatrix_solve(SEXP x)
Definition: dpoMatrix.c:68
SEXP Csparse_horzcat(SEXP x, SEXP y)
SEXP Csparse_symmetric_to_general(SEXP x)
Definition: Csparse.c:343
SEXP dtrMatrix_setDiag(SEXP x, SEXP d)
Definition: dtrMatrix.c:296
SEXP dCsparse_subassign(SEXP x, SEXP i_, SEXP j_, SEXP value)
SEXP sparseQR_coef(SEXP qr, SEXP y)
Definition: sparseQR.c:144
void R_unload_Matrix(DllInfo *dll)
Definition: init.c:384
SEXP Csparse_general_to_symmetric(SEXP x, SEXP uplo, SEXP sym_dmns)
Definition: Csparse.c:357
SEXP lgCMatrix_colSums(SEXP x, SEXP NArm, SEXP spRes, SEXP trans, SEXP means)
Definition: dgCMatrix.c:612
CHM_TR as_cholmod_triplet(CHM_TR ans, SEXP x, Rboolean check_Udiag)
Populate ans with the pointers from x and modify its scalar elements accordingly. ...
Definition: chm_common.c:480
SEXP Csparse_band(SEXP x, SEXP k1, SEXP k2)
SEXP dspMatrix_rcond(SEXP obj, SEXP type)
Definition: dspMatrix.c:37
SEXP m_encodeInd2(SEXP i, SEXP j, SEXP di, SEXP orig_1, SEXP chk_bnds)
Encode Matrix index (i,j) |–> i + j * nrow {i,j : 0-origin}.
Definition: Mutils.c:945
SEXP lgTMatrix_to_matrix(SEXP x)
SEXP dtpMatrix_as_dtrMatrix(SEXP from)
Definition: dtpMatrix.c:192
double chm_factor_ldetL2(CHM_FR f)
Evaluate the logarithm of the square of the determinant of L.
Definition: CHMfactor.c:80
SEXP dgeMatrix_matrix_crossprod(SEXP x, SEXP y, SEXP trans)
Definition: dgeMatrix.c:211
SEXP lsq_dense_QR(SEXP X, SEXP y)
Definition: dense.c:132
SEXP Matrix_permSym
Definition: Syms.h:2
SEXP ltpMatrix_as_ltrMatrix(SEXP from, SEXP kind)
Definition: ldense.c:53
SEXP dtrMatrix_addDiag(SEXP x, SEXP d)
Definition: dtrMatrix.c:304
SEXP dgTMatrix_to_dgeMatrix(SEXP x)
SEXP lsq_dense_Chol(SEXP X, SEXP y)
Definition: dense.c:99
SEXP ltTMatrix_as_ltrMatrix(SEXP x)
Definition: TMatrix_as.c:58
CHM_SP as_cholmod_sparse(CHM_SP ans, SEXP x, Rboolean check_Udiag, Rboolean sort_in_place)
Populate ans with the pointers from x and modify its scalar elements accordingly. ...
Definition: chm_common.c:245
SEXP Csparse_Csparse_prod(SEXP a, SEXP b, SEXP bool_arith)
A %*% B - for matrices of class CsparseMatrix (R package "Matrix")
Definition: Csparse.c:446
#define _(String)
Definition: Mutils.h:32
SEXP dpoMatrix_chol(SEXP x)
Definition: dpoMatrix.c:20
SEXP ddense_skewpart(SEXP x)
Definition: dense.c:481
SEXP lsTMatrix_as_lsyMatrix(SEXP x)
Definition: TMatrix_as.c:39
SEXP Matrix_iSym
Definition: Syms.h:2
SEXP dgCMatrix_qrsol(SEXP x, SEXP y, SEXP ord)
Definition: dgCMatrix.c:169
SEXP dup_mMatrix_as_geMatrix(SEXP A)
Duplicate a [dln]denseMatrix or a numeric matrix or even a vector as a [dln]geMatrix.
Definition: Mutils.c:648
SEXP dtrMatrix_matrix_mm(SEXP a, SEXP b, SEXP right, SEXP trans)
Matrix products dense triangular Matrices o
Definition: dtrMatrix.c:110
SEXP dgeMatrix_crossprod(SEXP x, SEXP trans)
Definition: dgeMatrix.c:76
SEXP dsCMatrix_to_dgTMatrix(SEXP x)
Definition: dsCMatrix.c:242
SEXP lspMatrix_as_lsyMatrix(SEXP from, SEXP kind)
Definition: ldense.c:8
SEXP dense_to_Csparse(SEXP x)
Definition: dense.c:248
SEXP nsTMatrix_as_nsyMatrix(SEXP x)
Definition: TMatrix_as.c:152
SEXP dtrMatrix_dtrMatrix_mm(SEXP a, SEXP b, SEXP right, SEXP trans)
Matrix products of dense triangular Matrices.
Definition: dtrMatrix.c:160
SEXP LU_expand(SEXP x)
SEXP dtpMatrix_getDiag(SEXP x)
Definition: dtpMatrix.c:68
SEXP CHMfactor_update(SEXP object, SEXP parent, SEXP mult)
Definition: CHMfactor.c:150
SEXP dgeMatrix_exp(SEXP x)
Matrix exponential - based on the corrected code for Octave's expm function.
Definition: dgeMatrix.c:662
SEXP zCsparse_subassign(SEXP x, SEXP i_, SEXP j_, SEXP value)
SEXP BunchKaufman_validate(SEXP obj)
SEXP triangularMatrix_validate(SEXP obj)
Definition: dtrMatrix.c:5
SEXP ltrMatrix_as_ltpMatrix(SEXP from, SEXP kind)
Definition: ldense.c:78
SEXP chm_factor_to_SEXP(CHM_FR f, int dofree)
Copy the contents of f to an appropriate CHMfactor object and, optionally, free f or free both f and ...
Definition: chm_common.c:1106
SEXP R_chkName_Cholesky(SEXP nm, SEXP perm, SEXP LDL, SEXP super)
Definition: dsCMatrix.c:16
SEXP nsTMatrix_as_ngTMatrix(SEXP x)
Definition: TMatrix_as.c:169
SEXP ngC_to_matrix(SEXP x)
Definition: lgCMatrix.c:30
CHM_FR as_cholmod_factor(CHM_FR ans, SEXP x)
Populate ans with the pointers from x and modify its scalar elements accordingly. ...
Definition: chm_common.c:1031
SEXP Csparse_to_tTsparse(SEXP x, SEXP uplo, SEXP diag)
Definition: Csparse.c:330
SEXP ngCMatrix_colSums(SEXP x, SEXP NArm, SEXP spRes, SEXP trans, SEXP means)
Definition: dgCMatrix.c:620
SEXP dimNames_validate(SEXP obj)
Definition: Mutils.c:343
SEXP dsyMatrix_matrix_mm(SEXP a, SEXP b, SEXP rtP)
Definition: dsyMatrix.c:103
SEXP dspMatrix_matrix_mm(SEXP a, SEXP b)
Definition: dspMatrix.c:139
SEXP dtCMatrix_matrix_solve(SEXP a, SEXP b, SEXP classed)
Definition: dtCMatrix.c:77
SEXP iCsparse_subassign(SEXP x, SEXP i_, SEXP j_, SEXP value)
SEXP dpoMatrix_validate(SEXP obj)
Definition: dpoMatrix.c:3
static const R_ExternalMethodDef ExtEntries[]
Definition: init.c:278
SEXP dgeMatrix_matrix_solve(SEXP a, SEXP b)
Definition: dgeMatrix.c:583
SEXP dgCMatrix_cholsol(SEXP x, SEXP y)
Definition: dgCMatrix.c:523
SEXP geMatrix_matrix_crossprod(SEXP x, SEXP y, SEXP trans)
Definition: dgeMatrix.c:291
SEXP dgeMatrix_determinant(SEXP x, SEXP logarithm)
Definition: dgeMatrix.c:502
SEXP diag_tC(SEXP obj, SEXP resultKind)
SEXP dsTMatrix_as_dgTMatrix(SEXP x)
Definition: TMatrix_as.c:128
SEXP Matrix_pSym
Definition: Syms.h:2
SEXP dgCMatrix_QR(SEXP Ap, SEXP order, SEXP keep_dimnames)
Definition: dgCMatrix.c:214
SEXP Matrix_NS
Definition: Syms.h:2
SEXP dgTMatrix_to_matrix(SEXP x)
SEXP Csparse_validate2(SEXP x, SEXP maybe_modify)
Definition: Csparse.c:51
SEXP dspMatrix_norm(SEXP obj, SEXP type)
Definition: dspMatrix.c:32
SEXP compressed_to_TMatrix(SEXP x, SEXP colP)
Definition: dgCMatrix.c:36
SEXP dgeMatrix_dgeMatrix_crossprod(SEXP x, SEXP y, SEXP trans)
Definition: dgeMatrix.c:145
SEXP dppMatrix_chol(SEXP x)
Definition: dppMatrix.c:15
SEXP Csparse_diagN2U(SEXP x)
SEXP dgeMatrix_Schur(SEXP x, SEXP vectors, SEXP isDGE)
Definition: dgeMatrix.c:792
#define EXTDEF(name, n)
Definition: init.c:30
SEXP Tsparse_diagU2N(SEXP x)
Definition: Tsparse.c:63
SEXP Csparse_transpose(SEXP x, SEXP tri)
Definition: Csparse.c:402
SEXP Matrix_diagSym
Definition: Syms.h:2
SEXP dspMatrix_solve(SEXP a)
Definition: dspMatrix.c:52
SEXP nz_pattern_to_Csparse(SEXP x, SEXP res_kind)
Definition: Csparse.c:221
SEXP lspMatrix_setDiag(SEXP x, SEXP d)
Definition: dspMatrix.c:114
SEXP tCMatrix_validate(SEXP x)
Definition: dtCMatrix.c:8
SEXP Dim_validate(SEXP obj, SEXP name)
Definition: Mutils.c:337
SEXP Csparse_diagU2N(SEXP x)
SEXP R_rbind2_vector(SEXP a, SEXP b)
From the two 'x' slots of two dense matrices a and b, compute the 'x' slot of rbind(a, b)
Definition: Mutils.c:1120
SEXP lCsparse_subassign(SEXP x, SEXP i_, SEXP j_, SEXP value)
SEXP pCholesky_validate(SEXP obj)
SEXP dgCMatrix_LU(SEXP Ap, SEXP orderp, SEXP tolp, SEXP error_on_sing, SEXP keep_dimnames)
Definition: dgCMatrix.c:446
SEXP Csparse_to_dense(SEXP x, SEXP symm_or_tri)
From a CsparseMatrix, produce a dense one.
Definition: Csparse.c:121
SEXP R_set_factors(SEXP obj, SEXP val, SEXP name, SEXP warn)
Definition: Mutils.c:166
SEXP Csparse_to_tCsparse(SEXP x, SEXP uplo, SEXP diag)
Definition: Csparse.c:319
SEXP dpoMatrix_dgeMatrix_solve(SEXP a, SEXP b)
Definition: dpoMatrix.c:86
SEXP dppMatrix_validate(SEXP obj)
Definition: dppMatrix.c:3
cholmod_common c
Definition: chm_common.c:15
SEXP symmetricMatrix_validate(SEXP obj)
Definition: dsyMatrix.c:3
SEXP dsTMatrix_as_dsyMatrix(SEXP x)
Definition: TMatrix_as.c:31
SEXP dsyMatrix_norm(SEXP obj, SEXP type)
Definition: dsyMatrix.c:30
SEXP CHMfactor_ldetL2(SEXP x)
Definition: CHMfactor.c:112
SEXP ltpMatrix_setDiag(SEXP x, SEXP d)
Definition: dtpMatrix.c:95
SEXP CHMsuper_validate(SEXP obj)
Definition: chm_common.c:1269
SEXP dgeMatrix_setDiag(SEXP x, SEXP d)
Definition: dgeMatrix.c:411
SEXP dsyMatrix_rcond(SEXP obj, SEXP type)
Definition: dsyMatrix.c:36
SEXP geMatrix_matrix_mm(SEXP a, SEXP b, SEXP right)
%*% – generalized from dge to *ge():
Definition: dgeMatrix.c:363
SEXP dpoMatrix_rcond(SEXP obj, SEXP type)
Definition: dpoMatrix.c:53
SEXP CHMfactor_solve(SEXP a, SEXP b, SEXP system)
Definition: CHMfactor.c:20
SEXP xTMatrix_validate(SEXP x)
Definition: dgTMatrix.c:9
SEXP CHMsimpl_validate(SEXP obj)
Definition: chm_common.c:1264
SEXP dtrMatrix_solve(SEXP a)
Definition: dtrMatrix.c:55
CHM_FR chm_factor_update(CHM_FR f, CHM_SP A, double mult)
Update the numerical values in the factor f as A + mult * I, if A is symmetric, otherwise AA' + mult ...
Definition: CHMfactor.c:133
SEXP dsyMatrix_solve(SEXP a)
Definition: dsyMatrix.c:52
SEXP Rsparse_validate(SEXP x)
Definition: Csparse.c:62
SEXP dsyMatrix_as_matrix(SEXP from, SEXP keep_dimnames)
Definition: dsyMatrix.c:89
SEXP Csparse_vertcat(SEXP x, SEXP y)
SEXP Csparse_dense_prod(SEXP a, SEXP b, SEXP transp)
SEXP Tsparse_validate(SEXP x)
Definition: Tsparse.c:5
SEXP Matrix_rle_d(SEXP x_, SEXP force_)
#define CALLDEF(name, n)
Definition: init.c:29
SEXP chm_triplet_to_SEXP(CHM_TR a, int dofree, int uploT, int Rkind, const char *diag, SEXP dn)
Copy the contents of a to an appropriate TsparseMatrix object and, optionally, free a or free both a ...
Definition: chm_common.c:573
SEXP dtpMatrix_solve(SEXP a)
Definition: dtpMatrix.c:56
SEXP dtpMatrix_matrix_mm(SEXP x, SEXP y, SEXP right, SEXP trans)
Definition: dtpMatrix.c:108
SEXP Csparse_dense_crossprod(SEXP a, SEXP b, SEXP transp)
SEXP R_symmetric_Dimnames(SEXP x)
Even if the Dimnames slot is list(NULL, ) etc, return symmetric dimnames: Get ...
Definition: Mutils.c:1315
SEXP dMatrix_validate(SEXP obj)
Definition: dgeMatrix.c:4
SEXP dspMatrix_matrix_solve(SEXP a, SEXP b)
Definition: dspMatrix.c:69
SEXP dgeMatrix_LU(SEXP x, SEXP warn_singularity)
Definition: dgeMatrix.c:497
SEXP dgeMatrix_addDiag(SEXP x, SEXP d)
Definition: dgeMatrix.c:447
SEXP Matrix_VSym
Definition: Syms.h:2
SEXP dense_nonpacked_validate(SEXP obj)
Definition: Mutils.c:310
SEXP dspMatrix_as_dsyMatrix(SEXP from)
Definition: dspMatrix.c:121
SEXP tRMatrix_validate(SEXP x)
Definition: dtCMatrix.c:43
SEXP ddense_symmpart(SEXP x)
Definition: dense.c:423
SEXP Tsparse_to_tCsparse(SEXP x, SEXP uplo, SEXP diag)
Definition: Tsparse.c:49
CHM_DN numeric_as_chm_dense(CHM_DN ans, double *v, int nr, int nc)
Definition: chm_common.c:1007
void R_init_Matrix(DllInfo *dll)
Definition: init.c:287
SEXP dsyMatrix_trf(SEXP x)
Definition: dsyMatrix.c:137
SEXP dgeMatrix_getDiag(SEXP x)
Definition: dgeMatrix.c:374
SEXP LU_validate(SEXP obj)
SEXP dgCMatrix_matrix_solve(SEXP Ap, SEXP b, SEXP give_sparse)
Definition: dgCMatrix.c:467
SEXP dtTMatrix_as_dtrMatrix(SEXP x)
Definition: TMatrix_as.c:49
static R_CallMethodDef CallEntries[]
Definition: init.c:33
SEXP dgeMatrix_rcond(SEXP obj, SEXP type)
Definition: dgeMatrix.c:54
SEXP dppMatrix_rcond(SEXP obj, SEXP type)
Definition: dppMatrix.c:42