@cached<EOL><INDENT>def distances(self):<DEDENT>
from molmod.ext import graphs_floyd_warshall<EOL>distances = np.zeros((self.num_vertices,)*<NUM_LIT:2>, dtype=int)<EOL>for i, j in self.edges: <EOL><INDENT>distances[i, j] = <NUM_LIT:1><EOL>distances[j, i] = <NUM_LIT:1><EOL><DEDENT>graphs_floyd_warshall(distances)<EOL>return distances<EOL>
The matrix with the all-pairs shortest path lenghts