def
Array.mergeDedupWith
{α : Type u_1}
[ord : Ord α]
(xs ys : Array α)
(merge : α → α → α)
:
Array α
O(|xs| + |ys|). Merge arrays xs and ys, which must be sorted according to compare and must
not contain duplicates. Equal elements are merged using merge. If merge respects the order
(i.e. for all x, y, y', z, if x < y < z and x < y' < z then x < merge y y' < z)
then the resulting array is again sorted.
Equations
Instances For
@[irreducible]
def
Array.mergeDedupWith.go
{α : Type u_1}
[ord : Ord α]
(xs ys : Array α)
(merge : α → α → α)
(acc : Array α)
(i j : Nat)
:
Array α
Auxiliary definition for mergeDedupWith.
Equations
Instances For
O(|xs| * |ys|). Merge xs and ys, which do not need to be sorted. Elements which occur in
both xs and ys are only added once. If xs and ys do not contain duplicates, then neither
does the result.
Equations
Instances For
@[irreducible]
def
Array.mergeAdjacentDups.go
{α : Type u_1}
[eq : BEq α]
(f : α → α → α)
(xs acc : Array α)
(i : Nat)
(hd : α)
:
Array α
Auxiliary definition for mergeAdjacentDups.