fimpy.utils.comp

This file contains small custom functions to compute \(\left<A \mathbf{x}_1, \mathbf{x}_2 \right>\) for general and special dimensions \(d\). Note that all custom, efficient implementations assume that \(A\) is a symmetric matrix.

Functions

metric_norm_matrix(A, x1, x2[, lib])

Computes \(\sqrt{\left<A \mathbf{x}_1, \mathbf{x}_2 \right>}\) in a broadcasted fashion for arbitrary \(d\)

metric_norm_matrix_2D_cython(A, x1, x2[, ...])

Custom implementation of metric_sqr_norm_matrix() for lib = np and \(d = 2\).

metric_norm_matrix_3D_cython(A, x1, x2[, ...])

Custom implementation of metric_sqr_norm_matrix() for lib = np and \(d = 3\).

metric_sqr_norm_matrix(A, x1, x2[, lib])

Computes \(\left<A \mathbf{x}_1, \mathbf{x}_2\right>\) in a broadcasted fashion for arbitrary \(d\).