pyFM.optimize.base_functions.op_commutation_and_grad

pyFM.optimize.base_functions.op_commutation_and_grad(C, op1, op2)

Compute the operator commutativity constraint and its gradient.

Can be used with a descriptor multiplication operator.

Parameters:
  • C ((K2, K1) np.ndarray) – Functional map.

  • op1 ((K1, K1) np.ndarray) – Operator on the first basis.

  • op2 ((K2, K2) np.ndarray) – Operator on the second basis.

Returns:

  • energy (float) – Operator commutativity squared norm.

  • gradient ((K2, K1) np.ndarray) – Gradient of the operator commutativity squared norm.