SCM Repository
[matrix] Diff of /pkg/Matrix/R/Csparse.R
Diff of /pkg/Matrix/R/Csparse.R
Parent Directory
|
Revision Log
|
Patch
268 |
} |
} |
269 |
} |
} |
270 |
|
|
271 |
|
if(extends(clDx, "dMatrix")) { |
272 |
|
has.x <- TRUE |
273 |
|
x <- .Call(Csparse_subassign, |
274 |
|
if(clx == "dgCMatrix")x else as(x, "dgCMatrix"), |
275 |
|
i1, i2, |
276 |
|
as(value, "dsparseVector")) |
277 |
|
} |
278 |
|
else { |
279 |
xj <- .Call(Matrix_expand_pointers, x@p) |
xj <- .Call(Matrix_expand_pointers, x@p) |
280 |
sel <- (!is.na(match(x@i, i1)) & |
sel <- (!is.na(match(x@i, i1)) & |
281 |
!is.na(match( xj, i2))) |
!is.na(match( xj, i2))) |
317 |
x[i, ] <- value |
x[i, ] <- value |
318 |
else |
else |
319 |
x[i,j] <- value |
x[i,j] <- value |
|
|
|
320 |
if(extends(clDx, "compMatrix") && length(x@factors)) # drop cashed ones |
if(extends(clDx, "compMatrix") && length(x@factors)) # drop cashed ones |
321 |
x@factors <- list() |
x@factors <- list() |
322 |
|
}# else{ not using new memory-sparse code |
323 |
if(has.x && any(is0(x@x))) ## drop all values that "happen to be 0" |
if(has.x && any(is0(x@x))) ## drop all values that "happen to be 0" |
324 |
drop0(x) |
as_CspClass(drop0(x), clx) |
325 |
else as_CspClass(x, clx) |
else as_CspClass(x, clx) |
326 |
} ## replCmat |
} ## replCmat |
327 |
|
|
|
Legend:
Removed from v.2676 |
|
changed lines |
|
Added in v.2677 |
|
|