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

Method SelfHash

inst/include/Rcpp/hash/SelfHash.h:38–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 typedef Vector<RTYPE> VECTOR ;
37
38 SelfHash( SEXP table ) : n(Rf_length(table)), m(2), k(1),
39 src( (STORAGE*)dataptr(table) ), data(), indices(), size_(0)
40 {
41 int desired = n*2 ;
42 while( m < desired ){ m *= 2 ; k++ ; }
43 data.resize( m ) ;
44 indices.resize( m ) ;
45 }
46
47 inline IntegerVector fill_and_self_match(){
48 IntegerVector result = no_init(n) ;

Callers

nothing calls this directly

Calls 1

dataptrFunction · 0.50

Tested by

no test coverage detected