Shrinking and unfolding mechanism of directed acyclic graph
- Count the number of times a node is marked for deletion by the upstream link: According to the node out-degree adjacency table, count the number of times that all child nodes flowing down from the target node (target) are marked for deletion by the upstream link.
- Count the points that are actually to be hidden and deleted: When the number of times a node is notified of deletion is equal to the number of in-degrees of the node in the in-degree table, it proves that this point needs to be removed.
- Count the edges to be hidden and deleted: When an edge is on the way to send a signal to a point, the edge will be removed.
- Filter the full graph cache to obtain the required points and edges: The points and edges presented in the final graph are Among the vertex edges of the currently displayed graph, filter out the vertex edges to be deleted.
Click the nodes directly will trigger the shrinking or unfolding mechanism of this node.