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)

Arguments

exp.int

A numeric vector representing the intensity values of the experimental spectrum.

lib.int

A numeric vector representing the intensity values of the library spectrum.

Value

A numeric value representing the weighted dot product between

exp.int and lib.int.

Details

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.

Examples

get_dp(exp.int = 1:10, lib.int = 1:10)
#> [1] 1