From b2b225f4ae2a925cbc9821b2ec6fde2115748574 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 30 May 2024 21:07:23 -0700 Subject: [PATCH] Create only undirected edges from smaller node ID to higher node ID Signed-off-by: Danila Fedorin --- analyze.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/analyze.rb b/analyze.rb index e545c66..881112b 100644 --- a/analyze.rb +++ b/analyze.rb @@ -103,6 +103,7 @@ series.each do |series, files| end edges.uniq! # edges.filter! { |e| e[:from] < e[:to] } +edges.map! { |e| { :from => [e[:from], e[:to]].min, :to => [e[:from], e[:to]].max } }.uniq! puts ("export const nodes = " + JSON.pretty_unparse(data.values) + ";") puts ("export const edges = " + JSON.pretty_unparse(edges) + ";")