SCM

SCM Repository

[matrix] Annotation of /pkg/src/lsCMatrix.c
ViewVC logotype

Annotation of /pkg/src/lsCMatrix.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1555 - (view) (download) (as text)

1 : bates 737 #include "lsCMatrix.h"
2 :    
3 : maechler 896 /**
4 : bates 737 * Check the validity of the slots of an lsCMatrix object
5 : maechler 896 *
6 : bates 737 * @param x Pointer to an lsCMatrix object
7 : maechler 896 *
8 : bates 737 * @return an SEXP that is either TRUE or a character string
9 :     * describing the way in which the object failed the validity check
10 :     */
11 :     SEXP lsCMatrix_validate(SEXP x)
12 :     {
13 : maechler 896 SEXP val = symmetricMatrix_validate(x);
14 :     if(isString(val))
15 :     return(val);
16 :     else {
17 :     /* FIXME needed? ltC* inherits from lgC* which does this in validate*/
18 :     SEXP pslot = GET_SLOT(x, Matrix_pSym),
19 :     islot = GET_SLOT(x, Matrix_iSym);
20 :     int
21 :     ncol = length(pslot) - 1,
22 :     *xp = INTEGER(pslot),
23 :     *xi = INTEGER(islot);
24 : bates 1555 /* column sorting now done in Csparse_validate */
25 :     /* if (csc_unsorted_columns(ncol, xp, xi)) */
26 :     /* csc_sort_columns(ncol, xp, xi, (double *) NULL); */
27 : bates 737
28 : maechler 896 return ScalarLogical(1);
29 :     }
30 : bates 737 }

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge