Count frequency of differences between values in integer vectors.
Source:R/RcppExports.R
calcAndCountDist.RdGiven two ascendingly sorted integer vectors query and
reference, calculate and count the differences between their
elements that are greater than zero and less than maxd. The
number of observed distances d are reported in cnt[d],
and maxd corresponds to the length(cnt). The function is
called by calcModbaseSpacing, which provides a higher level,
more convenient interface.
Arguments
- query
first
integervector.- reference
second
integervector. Distances are calculated from each element inqueryto each greater element inreference.- cnt
NumericVectorto store the result in. The length ofcntdefines the maximal distance that will be included in the analysis, and new counts will be added to the values ofcnt(repeated calls tocalcAndCountDistwill increment existing counts).