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

Method get

inst/include/Rcpp/sugar/functions/rowSums.h:521–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519 {}
520
521 return_vector get() const {
522 R_xlen_t i, j, nr = ref.nrow(), nc = ref.ncol();
523 return_vector res(nr);
524
525 for (j = 0; j < nc; j++) {
526 for (i = 0; i < nr; i++) {
527 detail::incr(&res[i], ref(i, j));
528 }
529 }
530
531 for (i = 0; i < nr; i++) {
532 detail::div(&res[i], nc);
533 }
534
535 return res;
536 }
537};
538
539// RowMeans

Callers

nothing calls this directly

Calls 4

incrFunction · 0.85
divFunction · 0.85
nrowMethod · 0.45
ncolMethod · 0.45

Tested by

no test coverage detected