9 cholmod_factor *L =
M2CHF(s_trf, 1);
10 cholmod_sparse *A =
M2CHS(s_obj, 1);
12 L = cholmod_copy_factor(L, &
c);
13 cholmod_updown(Rf_asLogical(s_update) != 0, A, L, &
c);
15#define UPDOWN_FINISH \
17 SEXP dimnames = PROTECT(DIMNAMES(s_trf, 0)); \
18 PROTECT(s_trf = CHF2M(L, 1)); \
19 cholmod_free_factor(&L, &c); \
20 if (TYPEOF(s_trf) == CHARSXP) \
21 Rf_error("%s", CHAR(s_trf)); \
22 SET_DIMNAMES(s_trf, 0, dimnames); \
32 Rcomplex beta = Rf_asComplex(s_beta);
33 if (!R_FINITE(beta.r) || !R_FINITE(beta.i))
34 Rf_error(
_(
"'%s' is not a number or not finite"),
"beta");
36 cholmod_factor *L =
M2CHF(s_trf, 1);
37 cholmod_sparse *A =
M2CHS(s_obj, 1);
38 double b[2]; b[0] = beta.r; b[1] = beta.i;
43 A->stype = (
UPLO(s_obj) ==
'U') ? 1 : -1;
45 L = cholmod_copy_factor(L, &
c);
48 c.final_ll = L->is_ll;
49 c.final_super = L->is_super;
51 c.final_monotonic = 1;
53 cholmod_factorize_p(A, b, NULL, 0, L, &
c);