The R Project SVN R-packages

Rev

Rev 4573 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4573 Rev 4685
Line 85... Line 85...
85
	val = PROTECT(NEW_OBJECT(MAKE_CLASS("dgeMatrix")));
85
	val = PROTECT(NEW_OBJECT(MAKE_CLASS("dgeMatrix")));
86
    int *adims = INTEGER(GET_SLOT(a, Matrix_DimSym)),
86
    int *adims = INTEGER(GET_SLOT(a, Matrix_DimSym)),
87
	*bdims = INTEGER(GET_SLOT(b, Matrix_DimSym)),
87
	*bdims = INTEGER(GET_SLOT(b, Matrix_DimSym)),
88
	info;
88
	info;
89
 
89
 
90
    if (*adims != *bdims || bdims[1] < 1 || *adims < 1)
90
    if (adims[1] != bdims[0])
91
	error(_("Dimensions of system to be solved are inconsistent"));
91
	error(_("Dimensions of system to be solved are inconsistent"));
-
 
92
    if (adims[0] < 1 || bdims[1] < 1)
-
 
93
	error(_("Cannot solve() for matrices with zero extents"));
92
    SET_SLOT(val, Matrix_factorSym, allocVector(VECSXP, 0));
94
    SET_SLOT(val, Matrix_factorSym, allocVector(VECSXP, 0));
93
    slot_dup(val, b, Matrix_DimSym);
95
    slot_dup(val, b, Matrix_DimSym);
94
    slot_dup(val, b, Matrix_xSym);
96
    slot_dup(val, b, Matrix_xSym);
95
    F77_CALL(dpotrs)(uplo_P(Chol), adims, bdims + 1,
97
    F77_CALL(dpotrs)(uplo_P(Chol), adims, bdims + 1,
96
		     REAL(GET_SLOT(Chol, Matrix_xSym)), adims,
98
		     REAL(GET_SLOT(Chol, Matrix_xSym)), adims,