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

Method normalize

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

Source from the content-addressed store, hash-verified

99
100 template <>
101 inline double SelfHash<REALSXP>::normalize(double val) const {
102 /* double is a bit tricky - we have to normalize 0.0, NA and NaN */
103 if (val == 0.0) val = 0.0;
104 if (internal::Rcpp_IsNA(val)) val = NA_REAL;
105 else if (internal::Rcpp_IsNaN(val)) val = R_NaN;
106 return val;
107 }
108
109 template <>
110 inline unsigned int SelfHash<INTSXP>::get_addr(int value) const {

Callers

nothing calls this directly

Calls 2

Rcpp_IsNAFunction · 0.50
Rcpp_IsNaNFunction · 0.50

Tested by

no test coverage detected