[Feat] Successors and Predecessors methods out of the box
Tochemey opened this issue · comments
Arsene commented
We all know that in a dag the edges are directed: that is, they have a direction, proceeding from a source vertex to a destination vertex. The destination vertex is a successor of the source, and the the source is a predecessor of the destination. So given a vertex, I think it will be nice to know all its successors and predecessors. This is the template for both functions:
Successors(ctx context.Context, source Vertex) []Vertex
Predecessors(ctx context.Context, source Vertex) []Vertex
@hmdsefi I hope this help.
Hamed Yousefi commented
@Tochemey thank you for creating the issue. Could you please add a description? it would be great if you add method names, inputs, and expected output with example.