Changed the standard algorithm for computing the smallest cycles from floyed-warshall to the depth-first search.