Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
reduce[x_] :=
|
||||
Block[{pairs, unique},
|
||||
pairs =
|
||||
DeleteCases[
|
||||
Subsets[Range@
|
||||
Length@x, {2}], _?(Intersection @@ x[[#]] == {} &)];
|
||||
unique = Complement[Range@Length@x, Flatten@pairs];
|
||||
Join[Union[Flatten[x[[#]]]] & /@ pairs, x[[unique]]]]
|
||||
consolidate[x__] := FixedPoint[reduce, {x}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue