kaknikhil commented on code in PR #592: URL: https://github.com/apache/madlib/pull/592#discussion_r1113499040
########## src/ports/postgres/modules/graph/sssp.py_in: ########## @@ -325,7 +325,10 @@ def graph_sssp(schema_madlib, vertex_table, vertex_id, edge_table, WHERE {vertex_id} IS NOT NULL """.format(**locals()))[0]['count'] - for i in range(0, v_cnt + 1): + # The algorithm should converge in less than |V|+1 iterations. + # Otherwise there is a negative cycle in the graph. + # We check for v_cnt+1 because the first iteration is spent on the setup Review Comment: shouldn't this comment be `We check for v_cnt+2` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@madlib.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org