This function computes the weighted dot product between two intensity vectors from experimental and library spectra, considering weights for each intensity.
getDP(exp.int, lib.int)
A numeric vector representing the intensity values of the experimental spectrum.
A numeric vector representing the intensity values of the library spectrum.
A numeric value representing the dot product between
exp.int
and lib.int
.
The function computes weights for each intensity value in both vectors based on their relative contribution to the total intensity. The dot product is then computed using these weighted intensity values.
getDP(exp.int = 1:10, lib.int = 1:10)
#> Warning: `getDP()` was deprecated in masstools 0.99.9.
#> ℹ Please use `get_dp()` instead.
#> [1] 1