pyFM.optimize.base_functions.LB_commutation_and_grad¶
- pyFM.optimize.base_functions.LB_commutation_and_grad(C, ev_sqdiff)¶
Compute the LB commutativity constraint and its gradient.
- Parameters:
C ((K2, K1) np.ndarray) – Functional map.
ev_sqdiff ((K2, K1) np.ndarray) – [normalized] matrix of squared eigenvalue differences.
- Returns:
energy (float) – LB commutativity squared norm.
gradient ((K2, K1) np.ndarray) – Gradient of the LB commutativity squared norm.