The input should be a directed graph in compressed sparse row (CSR) format. The result is an array which shows the shortest distance from the source vertex to each vertex. The vertex ID can be used to index of the result array.