File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -168,14 +168,15 @@ namespace CXXGRAPH
168168 /* *
169169 * @brief Function runs the bellman-ford algorithm for some source node and
170170 * target node in the graph and returns the shortest distance of target
171- * from the source.
171+ * from the source. It can also detect if a negative cycle exists in the graph.
172172 * Note: No Thread Safe
173173 *
174174 * @param source source vertex
175175 * @param target target vertex
176176 *
177177 * @return shortest distance if target is reachable from source else ERROR in
178- * case if target is not reachable from source or there is negative cycle.
178+ * case if target is not reachable from source. If there is no error then also
179+ * returns if the graph contains a negative cycle.
179180 */
180181 virtual const BellmanFordResult bellmanford (const Node<T> &source, const Node<T> &target) const ;
181182 /* *
You can’t perform that action at this time.
0 commit comments