SCM

SCM Repository

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

Annotation of /pkg/src/dgBCMatrix.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 298 - (view) (download) (as text)
Original Path: pkg/src/cscBlocked.c

1 : bates 298 #include "cscBlocked.h"
2 :    
3 :     SEXP cscBlocked_validate(SEXP x)
4 :     {
5 :     SEXP pp = GET_SLOT(x, Matrix_pSym),
6 :     ip = GET_SLOT(x, Matrix_iSym),
7 :     xp = GET_SLOT(x, Matrix_xSym),
8 :     dp = getAttrib(xp, R_DimSymbol);
9 :     int *pv = INTEGER(pp),
10 :     *iv = INTEGER(ip),
11 :     *dim = INTEGER(dp),
12 :     ncol = length(pp) - 1;
13 :     int nnz = pv[ncol];
14 :    
15 :     if (!isReal(xp))
16 :     return ScalarString(mkChar("slot x should be a real array"));
17 :     if (length(dp) != 3)
18 :     return ScalarString(mkChar("slot x should be a 3-dimensional array"));
19 :     if (length(ip) != nnz)
20 :     return ScalarString(mkChar("length of slot i does not matck last element of slot p"));
21 :     if (dim[2] != nnz)
22 :     return ScalarString(mkChar("third dimension of slot x does not match number of nonzeros"));
23 :     return ScalarLogical(1);
24 :     }
25 :    
26 :    

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