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

Method prod

inst/include/Rcpp/Dimension.h:59–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 return (int) dims.size() ;
58 }
59 inline R_xlen_t prod() const {
60 return std::accumulate( dims.begin(), dims.end(), static_cast<R_xlen_t>(1), std::multiplies<R_xlen_t>() );
61 }
62
63 inline reference operator[](int i){
64 if( i < 0 || i>=static_cast<int>(dims.size()) ) throw std::range_error("index out of bounds") ;

Callers 1

VectorMethod · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected