Skip to main content
. Author manuscript; available in PMC: 2024 Nov 21.
Published in final edited form as: Int J Data Sci Anal. 2023 Jun 27;17(3):289–304. doi: 10.1007/s41060-023-00399-4

Algorithm 1.

Randomly Select Edges For DAG

Require: V ariables, NumEdges
 1: OrderedV ariablesRandSort(V ariables)
 2: for i ⟵ 1, |OrderedV ariables| — 1 do
 3:  for ji + 1, |OrderedV ariables| do
 4:   EdgeSet.append((OrderedV ariables[i], OrderedV ariables[j]))
 5:  end for
 6: end for
 7: EdgesRandomSelection(EdgeSet, NumEdges)
 8: return Edges