SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/src/factorizations.c
ViewVC logotype

Diff of /pkg/Matrix/src/factorizations.c

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

revision 3105, Fri May 8 06:48:01 2015 UTC revision 3114, Tue May 19 16:33:13 2015 UTC
# Line 1  Line 1 
1  #include "factorizations.h"  #include "factorizations.h"
2    
3  SEXP LU_validate(SEXP obj)  SEXP MatrixFactorization_validate(SEXP obj)
4  {  {
5        SEXP Dim = GET_SLOT(obj, Matrix_DimSym), val;
6        if (isString(val = dim_validate(Dim, "MatrixFactorization")))
7            return(val);
8      return ScalarLogical(1);      return ScalarLogical(1);
9  }  }
10    
11    SEXP LU_validate(SEXP obj)
12    {
13        SEXP x = GET_SLOT(obj, Matrix_xSym),
14            Dim = GET_SLOT(obj, Matrix_DimSym);
15        int m = INTEGER(Dim)[0], n = INTEGER(Dim)[1]; // checked already in MatrixF.._validate()
16        if(TYPEOF(x) != REALSXP)
17            return mkString(_("x slot is not \"double\""));
18        if(XLENGTH(x) != ((double) m) * n)
19            return mkString(_("x slot is not of correct length"));
20        return dimNames_validate(obj);
21    }
22    
23  SEXP BunchKaufman_validate(SEXP obj)  SEXP BunchKaufman_validate(SEXP obj)
24  {  {
25        // TODO
26      return ScalarLogical(1);      return ScalarLogical(1);
27  }  }
28    
29  SEXP pBunchKaufman_validate(SEXP obj)  SEXP pBunchKaufman_validate(SEXP obj)
30  {  {
31        // TODO
32      return ScalarLogical(1);      return ScalarLogical(1);
33  }  }
34    
35  SEXP Cholesky_validate(SEXP obj)  SEXP Cholesky_validate(SEXP obj)
36  {  {
37        // TODO
38      return ScalarLogical(1);      return ScalarLogical(1);
39  }  }
40    
41  SEXP pCholesky_validate(SEXP obj)  SEXP pCholesky_validate(SEXP obj)
42  {  {
43        // TODO
44      return ScalarLogical(1);      return ScalarLogical(1);
45  }  }
46    
47    #ifdef _Matrix_has_SVD_
48  SEXP SVD_validate(SEXP obj)  SEXP SVD_validate(SEXP obj)
49  {  {
50      return ScalarLogical(1);      return ScalarLogical(1);
51  }  }
52    #endif
53    
54  SEXP LU_expand(SEXP x)  SEXP LU_expand(SEXP x)
55  {  {

Legend:
Removed from v.3105  
changed lines
  Added in v.3114

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