|
Algorithm 1 A recursive algorithm for DAG clustering |
| Input :iter—map that stores the iteration count of the corresponding dataset or cluster |
| root—top node in DAG
|
|
Output: clusters—a set of clustered nodes
|
| 1: function clustering
|
| 2: ▹ Recursively traverse all nodes in DAG
|
| 3: cluster
|
| 4: descs
|
| 5: while
descs
do
|
| 6: desc = descs.pop
|
| 7: if
iter[desc] == iter[cluster] then
|
| 8: descs
|
| 9: cluster
|
| 10: else
|
| 11: clusters
|
| 12: clusters
|
| 13: cluster
|
| 14: end if
|
| 15: end while
|
| 16: return
clusters
|
| 17: end function
|