SCM Repository
[matrix] Diff of /pkg/src/Csparse.c
Diff of /pkg/src/Csparse.c
Parent Directory
|
Revision Log
|
Patch
312 |
|
|
313 |
SEXP Csparse_diagU2N(SEXP x) |
SEXP Csparse_diagU2N(SEXP x) |
314 |
{ |
{ |
315 |
|
if (*diag_P(x) != 'U') {/* "trivially fast" when there's no 'diag' slot at all */ |
316 |
|
return (x); |
317 |
|
} |
318 |
|
else { |
319 |
cholmod_sparse *chx = as_cholmod_sparse(x); |
cholmod_sparse *chx = as_cholmod_sparse(x); |
320 |
cholmod_sparse *eye = cholmod_speye(chx->nrow, chx->ncol, chx->xtype, &c); |
cholmod_sparse *eye = cholmod_speye(chx->nrow, chx->ncol, chx->xtype, &c); |
321 |
double one[] = {1, 0}; |
double one[] = {1, 0}; |
328 |
return chm_sparse_to_SEXP(ans, 1, uploT, Rkind, "N", |
return chm_sparse_to_SEXP(ans, 1, uploT, Rkind, "N", |
329 |
duplicate(GET_SLOT(x, Matrix_DimNamesSym))); |
duplicate(GET_SLOT(x, Matrix_DimNamesSym))); |
330 |
} |
} |
331 |
|
} |
332 |
|
|
333 |
SEXP Csparse_submatrix(SEXP x, SEXP i, SEXP j) |
SEXP Csparse_submatrix(SEXP x, SEXP i, SEXP j) |
334 |
{ |
{ |
|
Legend:
Removed from v.1660 |
|
changed lines |
|
Added in v.1708 |
|
|