You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
can i find the leader/source vertex of a directed acyclic graph ? #166
changed the title [-]can i find the leader vertex of a directed acyclic graph ?[/-][+]can i find the leader/source vertex of a directed acyclic graph ?[/+]on Feb 9, 2024
Hi, thanks for the late response! Using PredecessorMap and then backtrack to the root seems to be the correct approach. Is this issue then clarified for you? 😄
Activity
[-]can i find the leader vertex of a directed acyclic graph ?[/-][+]can i find the leader/source vertex of a directed acyclic graph ?[/+]AkashKumar7902 commentedon Feb 9, 2024
A more wide application for implementing this would be to merge two graphs
doing this will merge DAG into graph g on its vertex v.
UPD:
Found a solution for this,
first you must implement
findsourcefunction, I have provided the implementation just below this comment.To merge two graphs, follow these steps:
AkashKumar7902 commentedon Feb 11, 2024
To all those who might be looking for a solution:
dominikbraun commentedon Mar 6, 2024
Hi, thanks for the late response! Using
PredecessorMapand then backtrack to the root seems to be the correct approach. Is this issue then clarified for you? 😄AkashKumar7902 commentedon Mar 6, 2024
@dominikbraun
Yes. I was wondering will there be a function
getSourcein the package itself. I can send a PR for it.dominikbraun commentedon Mar 6, 2024
@AkashKumar7902 Yes, that sounds reasonable. Feel free to submit a PR!