SCM

SCM Repository

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

Diff of /pkg/src/ssclme.c

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

revision 10, Mon Mar 22 20:20:05 2004 UTC revision 11, Tue Mar 23 13:15:04 2004 UTC
# Line 988  Line 988 
988          }          }
989      }      }
990      status[0] = status[1] = 0;      status[0] = status[1] = 0;
991      return R_NilValue;      return x;
992  }  }
993    
994  SEXP ssclme_EMstepsGets(SEXP x, SEXP nsteps, SEXP REMLp, SEXP verb)  SEXP ssclme_EMsteps(SEXP x, SEXP nsteps, SEXP REMLp, SEXP verb)
995  {  {
996      SEXP      SEXP
997          Omega = GET_SLOT(x, Matrix_OmegaSym),          Omega = GET_SLOT(x, Matrix_OmegaSym),
# Line 1064  Line 1064 
1064      ssclme_factor(x);      ssclme_factor(x);
1065      return R_NilValue;      return R_NilValue;
1066  }  }
1067    
1068    SEXP ssclme_asSscMatrix(SEXP x)
1069    {
1070        SEXP val = PROTECT(NEW_OBJECT(MAKE_CLASS("sscMatrix")));
1071        int *dims = INTEGER(GET_SLOT(val, Matrix_DimSym));
1072    
1073        dims[0] = dims[1] = INTEGER(GET_SLOT(x, Matrix_DimSym))[1];
1074        SET_SLOT(val, Matrix_pSym, duplicate(GET_SLOT(x, Matrix_pSym)));
1075        SET_SLOT(val, Matrix_iSym, duplicate(GET_SLOT(x, Matrix_iSym)));
1076        SET_SLOT(val, Matrix_xSym, duplicate(GET_SLOT(x, Matrix_xSym)));
1077        CHAR(STRING_ELT(GET_SLOT(x, Matrix_uploSym), 0))[0] = 'U';
1078        UNPROTECT(1);
1079        return val;
1080    }
1081    
1082    SEXP ssclme_asTscMatrix(SEXP x)
1083    {
1084        SEXP val = PROTECT(NEW_OBJECT(MAKE_CLASS("tscMatrix")));
1085        int *dims = INTEGER(GET_SLOT(val, Matrix_DimSym));
1086    
1087        dims[0] = dims[1] = INTEGER(GET_SLOT(x, Matrix_DimSym))[1];
1088        SET_SLOT(val, Matrix_pSym, duplicate(GET_SLOT(x, Matrix_LpSym)));
1089        SET_SLOT(val, Matrix_iSym, duplicate(GET_SLOT(x, Matrix_LiSym)));
1090        SET_SLOT(val, Matrix_xSym, duplicate(GET_SLOT(x, Matrix_LxSym)));
1091        CHAR(STRING_ELT(GET_SLOT(x, Matrix_uploSym), 0))[0] = 'U';
1092        CHAR(STRING_ELT(GET_SLOT(x, Matrix_diagSym), 0))[0] = 'U';
1093        UNPROTECT(1);
1094        return val;
1095    }
1096    

Legend:
Removed from v.10  
changed lines
  Added in v.11

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