calcAndCountDist: Count frequency of differences between values in integer...

View source: R/RcppExports.R

calcAndCountDistR Documentation

Count frequency of differences between values in integer vectors.

Description

Given 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 calcPhasogram, which provides a higher level, more conventient interface.

Usage

calcAndCountDist(query, reference, cnt)

Arguments

query

first integer vector.

reference

second integer vector. Distances are calculated from each element in query to each greater element in reference.

cnt

NumericVector to store the result in. The length of cnt defines the maximal distance that will be included in the analysis, and new counts will be added to the values of cnt.

Value

numeric vector cnt, where cnt[d] correspond to the number of observed distances d.

Author(s)

Michael Stadler


fmicompbio/swissknife documentation built on June 11, 2025, 4:17 p.m.