pyFM.spectral.convert.p2p_to_FM

pyFM.spectral.convert.p2p_to_FM(p2p_21, evects1, evects2, A2=None)

Compute a functional map from a vertex to vertex map (with possible subsampling).

Can be computed with the pseudo inverse of the eigenvectors (if no subsampling) or with a least square solve.

Parameters:
  • p2p_21 ((n2,) np.ndarray) – Vertex to vertex map from target to source. For each vertex on the target shape, gives the index of the corresponding vertex on mesh 1. Can also be given as a (n2, n1) sparse matrix.

  • evects1 ((n1, k1) np.ndarray) – Eigenvectors on the source mesh. Possibly subsampled on the first dimension.

  • evects2 ((n2, k2) np.ndarray) – Eigenvectors on the target mesh. Possibly subsampled on the first dimension.

  • A2 ((n2, n2) np.ndarray or (n2,) np.ndarray, optional) – Area matrix of the target mesh. If specified, the eigenvectors can’t be subsampled.

Returns:

FM_12 – Functional map corresponding to the p2p map given. Solved with the pseudo inverse if A2 is given, else using a least square solve.

Return type:

(k2, k1) np.ndarray