MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / runit_NumericMatrix_cumsum

Function runit_NumericMatrix_cumsum

inst/tinytest/cpp/Matrix.cpp:161–171  ·  view source on GitHub ↗

[[Rcpp::export]]

Source from the content-addressed store, hash-verified

159
160// [[Rcpp::export]]
161NumericMatrix runit_NumericMatrix_cumsum( NumericMatrix input ){
162 int nr = input.nrow(), nc = input.ncol() ;
163 NumericMatrix output(nr, nc) ;
164 NumericVector tmp( nr );
165 for( int i=0; i<nc; i++){
166 tmp = tmp + input.column(i) ;
167 NumericMatrix::Column target( output, i ) ;
168 std::copy( tmp.begin(), tmp.end(), target.begin() ) ;
169 }
170 return output ;
171}
172
173// [[Rcpp::export]]
174std::string runit_CharacterMatrix_column( CharacterMatrix m){

Callers

nothing calls this directly

Calls 5

columnMethod · 0.80
nrowMethod · 0.45
ncolMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected