SCM

SCM Repository

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

Diff of /pkg/src/sscCrosstab.c

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

revision 10, Mon Mar 22 20:20:05 2004 UTC revision 73, Tue Apr 13 15:53:38 2004 UTC
# Line 85  Line 85 
85      UNPROTECT(1);      UNPROTECT(1);
86      return val;      return val;
87  }  }
88    
89    extern void ssclme_fill_LIp(int n, const int Parent[], int LIp[]);
90    
91    SEXP sscCrosstab_L_LI_sizes(SEXP ctab, SEXP permexp)
92    {
93        SEXP ans = PROTECT(allocVector(INTSXP, 4));
94        int *Ai = INTEGER(GET_SLOT(ctab, Matrix_iSym)),
95            *Ap = INTEGER(GET_SLOT(ctab, Matrix_pSym)),
96            *aa = INTEGER(ans),
97            *perm = INTEGER(permexp),
98            n = INTEGER(GET_SLOT(ctab, Matrix_DimSym))[1],
99            *Lp = Calloc(n + 1, int),
100            *Parent = Calloc(n, int),
101            *Lnz = Calloc(n, int),
102            *Flag = Calloc(n, int);
103    
104        ldl_symbolic(n, Ap, Ai, Lp, Parent, Lnz, Flag,
105                     (int *) NULL, (int *) NULL); /* P & Pinv */
106        aa[0] = Lp[n];
107        ssclme_fill_LIp(n, Parent, Lp);
108        aa[1] = Lp[n];
109        ssc_symbolic_permute(n, 1, perm, Ap, Ai);
110        ldl_symbolic(n, Ap, Ai, Lp, Parent, Lnz, Flag,
111                     (int *) NULL, (int *) NULL); /* P & Pinv */
112        aa[2] = Lp[n];
113        ssclme_fill_LIp(n, Parent, Lp);
114        aa[3] = Lp[n];
115        Free(Flag); Free(Lnz); Free(Parent); Free(Lp);
116        UNPROTECT(1);
117        return ans;
118    }

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

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