This function computes the weighted dot product between two intensity vectors from experimental and library spectra, taking into account weights for each intensity.
get_dp(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 weighted dot product between
exp.int
and lib.int
.
For each intensity in both the experimental and library spectra, weights are computed based on their relative contribution to the total intensity. The dot product is then calculated using these weighted intensity values.
get_dp(exp.int = 1:10, lib.int = 1:10)
#> [1] 1