pythagorean_trigonometric_identity_1d

mdhelper.algorithm.accelerated.pythagorean_trigonometric_identity_1d(r: ndarray[float]) float[source]

Serial Numba-accelerated evaluation of the Pythagorean trigonometric identity for a one-dimensional NumPy array \(\mathbf{r}\).

\[\left(\sum_{i=1}^3\cos(r_i)\right)^2 +\left(\sum_{i=1}^3\sin(r_i)\right)^2\]
Parameters:
rnp.ndarray

Vector \(\mathbf{r}\).

Shape: \((N_r,)\).

Returns:
c2_s2float

Pythagorean trigonometric identity for the vector \(\mathbf{r}\).