Matrix  $Rev: 3071 $ at $LastChangedDate: 2015-03-26 15:35:47 +0100 (Thu, 26 Mar 2015) $
t_Csparse_subassign.c File Reference

Go to the source code of this file.




SEXP Csparse_subassign (SEXP x, SEXP i_, SEXP j_, SEXP value)
 Subassignment: x[i,j] <- value. More...

Macro Definition Documentation


Function Documentation

SEXP Csparse_subassign ( SEXP  x,
SEXP  i_,
SEXP  j_,
SEXP  value 

Subassignment: x[i,j] <- value.

i_integer row index 0-origin vector (as returned from R .ind.prep2())
j_integer column index 0-origin vector
valuemust be a [dln]sparseVector {which is recycled if needed}
a Csparse matrix like x, but with the values replaced

but — in the case of x slot put a 0 zero there, and only at the very end drop them,

Definition at line 124 of file t_Csparse_subassign.c.

References _, ALLOC_SLOT(), Matrix_diagSym, Matrix_DimNamesSym, Matrix_DimSym, Matrix_iSym, Matrix_lengthSym, Matrix_pSym, Matrix_uploSym, Matrix_xSym, slot_dup, x_complex, x_double, x_integer, x_logical, and x_pattern.

Here is the call graph for this function: