Skip to content

Commit c795f4d

Browse files
committed
update docs
1 parent 070bfbe commit c795f4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/Graph/Graph.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)