A Path-Deformation Framework for Determining Weighted Genome Rearrangement Distance