pythagorean_trigonometric_identity_1d_1d¶
- mdhelper.algorithm.accelerated.pythagorean_trigonometric_identity_1d_1d(r: ndarray[float], s: ndarray[float]) float [source]¶
Serial Numba-accelerated evaluation of the cross Pythagorean trigonometric identity for two one-dimensional NumPy arrays \(\mathbf{r}\) and \(\mathbf{s}\).
\[2\left(\sum_{i=1}^3\cos(r_i)\sum_{j=1}^3\cos(s_j) +\sum_{i=1}^3\sin(r_i)\sum_{j=1}^3\sin(s_j)\right)\]- Parameters:
- rnp.ndarray
First vector \(\mathbf{r}\).
Shape: \((N_r,)\).
- snp.ndarray
Second vector \(\mathbf{s}\).
Shape: \((N_s,)\).
- Returns:
- c2_s2float
Cross Pythagorean trigonometric identity for the vectors \(\mathbf{r}\) and \(\mathbf{s}\).