SCM

SCM Repository

[matrix] Diff of /branches/Matrix-mer2/src/ltCMatrix.c
ViewVC logotype

Diff of /branches/Matrix-mer2/src/ltCMatrix.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 885, Tue Aug 30 20:54:55 2005 UTC revision 896, Sat Sep 3 21:57:18 2005 UTC
# Line 11  Line 11 
11   */   */
12  SEXP ltCMatrix_validate(SEXP x)  SEXP ltCMatrix_validate(SEXP x)
13  {  {
14      SEXP val = check_scalar_string(GET_SLOT(x, Matrix_uploSym),      SEXP val = triangularMatrix_validate(x);
15                                     "LU", "uplo");      if(isString(val))
16      int *Dim = INTEGER(GET_SLOT(x, Matrix_DimSym));          return(val);
17        else {
18            /* FIXME needed? ltC* inherits from lgC* which does this in validate*/
19            SEXP pslot = GET_SLOT(x, Matrix_pSym),
20                islot = GET_SLOT(x, Matrix_iSym);
21            int
22                ncol = length(pslot) - 1,
23                *xp = INTEGER(pslot),
24                *xi = INTEGER(islot);
25    
26      if (isString(val)) return val;          if (csc_unsorted_columns(ncol, xp, xi))
27      if (isString(val = check_scalar_string(GET_SLOT(x, Matrix_diagSym),              csc_sort_columns(ncol, xp, xi, (double *) NULL);
                                            "NU", "diag"))) return val;  
     if (Dim[0] != Dim[1])  
         return mkString(_("Triangular matrix must be square"));  
     csc_check_column_sorting(x);  
28      return ScalarLogical(1);      return ScalarLogical(1);
29  }  }
30    }
31    
32  /**  /**
33   * Transpose an ltCMatrix   * Transpose an ltCMatrix

Legend:
Removed from v.885  
changed lines
  Added in v.896

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