Readonly
edgesReadonly
stackafter a source id is fired, this stack will get filled up with dependent node ids in topological order.
the top item in the stack will correspond to the first node id that must be processed (least dependency),
while the bottom one will be the last to be resolved (most dependencies).
use the pop method to pop out the top from this stack, or use the seek method just to view the top without popping.
declare ids that need to be fired simultaneously.
once the ids are fired, the function will topologically traverse the edges (via DFS),
and eventually push the order of resoluion into the stack.
make sure that the source ids are NOT dependent on one another, because that will break the topological ordering of the output stack.
clear the topologically ordered stack, perhaps to restart the traversal.
pop the top element from the topologically ordered stack.
view the top element from the topologically ordered stack without popping it.
iterate over the topologically ordered stack of ids
the edges depict the directed edge from an id (
key: FROM
) to a set of ids (value: Set<TO>
)