largestPartialIntersectionWeighted
fn
void largestPartialIntersectionWeighted(alias less = "a < b", RangeOfRanges, Range, WeightsAA)(RangeOfRanges ror, Range tgt, WeightsAA weights, SortOutput sorted = No.sortOutput)Similar to largestPartialIntersection, but associates a weight with each distinct element in the intersection.
If at least one of the ranges is a multiset, then all occurences of a duplicate element are taken into account. The result is equivalent to merging all input ranges and picking the highest tgt.length, weight-based ranking elements.
Parameters
less | The predicate the ranges are sorted by. |
ror | A range of forward ranges sorted by less. |
tgt | The target range to copy common elements to. |
weights | An associative array mapping elements to weights. |
sorted | Whether the elements copied should be in sorted order. |