integrating transition matrix distance for edge lengths