#NEWLINE# @ staticmethod #NEWLINE# def _build_alignment_h_matrix( source , target ) : #NEWLINE# #INDENT# '\n        Returns the optimal alignment of `source` to `target`.\n\n        Parameters\n        ----------\n        source : :map:`PointCloud`\n            The source pointcloud instance used in the alignment\n        target : :map:`PointCloud`\n            The target pointcloud instance used in the alignment\n        ' #NEWLINE# a = source . h_points ( ) #NEWLINE# b = target . h_points ( ) #NEWLINE# return np . linalg . solve ( np . dot ( source , a . T ) , np . dot ( a , b . T ) ) . T