The R Project SVN R-packages

Rev

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

Rev 3769 Rev 3791
Line 7... Line 7...
7
 * @param x Pointer to an ltCMatrix object
7
 * @param x Pointer to an ltCMatrix object
8
 *
8
 *
9
 * @return an SEXP that is either TRUE or a character string
9
 * @return an SEXP that is either TRUE or a character string
10
 * describing the way in which the object failed the validity check
10
 * describing the way in which the object failed the validity check
11
 */
11
 */
-
 
12
 
12
SEXP ltCMatrix_validate(SEXP x)
13
SEXP ltCMatrix_validate(SEXP x)
13
{
14
{
14
    /* Because ltCMatrix inherits from triangularMatrix this is not necessary */
15
/* ltCMatrix extends both CsparseMatrix and triangularMatrix
15
/*     SEXP val = triangularMatrix_validate(x); */
16
 * which have their own _validate() each  */
-
 
17
 
16
/*     if(isString(val)) */
18
    /* Almost all is now done in Csparse_validate
17
/* 	return(val); */
-
 
18
/*     else { */
-
 
19
	/* FIXME needed? ltC* inherits from lgC* which does this in validate*/
19
     * *but* the checking of the 'x' slot */
20
/* 	SEXP pslot = GET_SLOT(x, Matrix_pSym), */
20
    SEXP islot = GET_SLOT(x, Matrix_iSym),
21
/* 	    islot = GET_SLOT(x, Matrix_iSym); */
21
	xslot = GET_SLOT(x, Matrix_xSym);
22
/* 	int */
22
 
23
/* 	    ncol = length(pslot) - 1, */
23
    if (length(islot) != length(xslot))
24
/* 	    *xp = INTEGER(pslot), */
-
 
25
/* 	    *xi = INTEGER(islot); */
-
 
26
	/* column sorting now done in Csparse_validate */
24
	return mkString(_("lengths of slots 'i' and 'x' must match"));
27
/* 	if (csc_unsorted_columns(ncol, xp, xi)) */
-
 
28
/* 	    csc_sort_columns(ncol, xp, xi, (double *) NULL); */
-
 
-
 
25
 
29
	return ScalarLogical(1);
26
    return ScalarLogical(1);
30
/*     } */
-
 
31
}
27
}