Compute the intersection of two sequences in (strictly) ascending order.
Compute the intersection of two sequences in (strictly) ascending
order. The procedure uses binary search on the second list, and
should in particular perform well if the second list is much bigger
than the first list.
compare should return a negative number of the
a argument is smaller than the b argument,
a positive number if a argument is bigger than
b, 0 otherwise.
Binary search for an element in a sorted random-access sequent.
Binary search for an element in a sorted random-access sequent. The result
is either Found(i), where i is the index of some
occurrence of wanted in seq, or
NotFound(i), where i is the index of the
next-bigger element in seq. Note, that elements are never
compared with ==, only with (a compare b) == 0
Compute a polynomial hashcode for a sequence of things
Given to sequences that are totally sorted in the same descending order,
determine those elements in newSeq that also occur in
oldSeq, and those elements in newSeq that do not
occur in oldSeq.
Given to sequences that are totally sorted in the same descending order,
determine those elements in newSeq that also occur in
oldSeq, and those elements in newSeq that do not
occur in oldSeq.
Given to sequences that are totally sorted in the same descending order,
determine those elements that only occur in seq0, those that
occur in both sequences, and those that only occur in seq1.
Given to sequences that are totally sorted in the same descending order,
determine those elements that only occur in seq0, those that
occur in both sequences, and those that only occur in seq1.
Determine whether 3 given sets have any elements in common
Iterator over exactly two elements
Filter a sequence of objects in order to detect the existence of certain
bad objects (badEl) and to remove certain unnecessary objects
(skipEl).
Filter a sequence of objects in order to detect the existence of certain
bad objects (badEl) and to remove certain unnecessary objects
(skipEl). If a bad element is found,
FoundBadElement is returned, otherwise a sorted array with the
elements that were kept is created and returned.
Determine all elements that occur in more than one of the given collections
Determine whether the two given sequences/iterables contain reference-identical objects.
Interpret the given integers as results of a compare
function (negative, zero, positive for less, equal, greater) and combine
them lexicographically
Interpret the given integers as results of a compare
function (negative, zero, positive for less, equal, greater) and combine
them lexicographically
Lexicographic comparison of two lists of things
Determine a maximum element of a sequence of things under a given measure
Compute the maximum of a sequence of ints.
Compute the maximum of a sequence of ints. If the sequence
is empty, 0 is returned
Compute the maximum of a sequence of ints.
Compute the maximum of a sequence of ints. If the sequence
is empty, 0 is returned
Merge two sequences that are sorted in strictly descending order and produce a descending sequence with all elements occurring in at least one of the sequences
Merge two sequences that are sorted in strictly descending order and produce a descending sequence with all elements occurring in at least one of the sequences
Determine a minimum element of a sequence of things under a given measure
Determine a minimum element of a sequence of things under a given measure
Compute the minimum of a sequence of ints.
Compute the minimum of a sequence of ints. If the sequence
is empty, 0 is returned
Max on optional integers
Min on optional integers
Return the sum of the given numbers if all numbers are defined,
None otherwise.
Return the sum of the given numbers if all numbers are defined,
None otherwise.
Determine a minimum element of a sequence of things under a given measure
Prepend some elements in front of a list
reduceLeft that also works for empty sequences
reduceLeft that also works for empty sequences
Remove all duplicates from a sorted sequence.
Remove all duplicates from a sorted sequence. It is assumed that duplicates can only occur immediately following each other
Find the first index ind with p(ar(ind));
return 0 if p is true on
the whole sequence, and end if p is
false on the whole sequence.
Find the first index ind with p(ar(ind));
return 0 if p is true on
the whole sequence, and end if p is
false on the whole sequence.
p has to be monotonic on ar, i.e.,
if p(ar(ind)) then p(ar(ind + 1)).
Going backward, find the first index ind in the range
[0, start) with p(ar(ind));
return 0 if p is true on
[0, start),
and start if p is false on
[0, start).
Going backward, find the first index ind in the range
[0, start) with p(ar(ind));
return 0 if p is true on
[0, start),
and start if p is false on
[0, start).
p has to be monotonic on ar, i.e.,
if p(ar(ind)) then p(ar(ind + 1)).
Going backward, find the first index ind in the range
[begin, start) with p(ar(ind));
return begin if p is true on
[begin, start),
and start if p is false on
[begin, start).
Going backward, find the first index ind in the range
[begin, start) with p(ar(ind));
return begin if p is true on
[begin, start),
and start if p is false on
[begin, start).
p has to be monotonic on ar, i.e.,
if p(ar(ind)) then p(ar(ind + 1)).
Find the first index ind in the range
[begin, end) with p(ar(ind));
return begin if p is true on
[begin, end),
and end if p is false on
[begin, end).
Find the first index ind in the range
[begin, end) with p(ar(ind));
return begin if p is true on
[begin, end),
and end if p is false on
[begin, end).
p has to be monotonic on ar, i.e.,
if p(ar(ind)) then p(ar(ind + 1)).
Going forward, find the first index ind in the range
[start, ar.size) with p(ar(ind));
return start if p is true on
[start, ar.size),
and ar.size if p is false on
[start, ar.size).
Going forward, find the first index ind in the range
[start, ar.size) with p(ar(ind));
return start if p is true on
[start, ar.size),
and ar.size if p is false on
[start, ar.size).
p has to be monotonic on ar, i.e.,
if p(ar(ind)) then p(ar(ind + 1)).
Going forward, find the first index ind in the range
[start, end) with p(ar(ind));
return start if p is true on
[start, end),
and end if p is false on
[start, end).
Going forward, find the first index ind in the range
[start, end) with p(ar(ind));
return start if p is true on
[start, end),
and end if p is false on
[start, end).
p has to be monotonic on ar, i.e.,
if p(ar(ind)) then p(ar(ind + 1)).
Convert a sequence of options to an optional sequence.
Return the first Some(x) of the given sequence, or
None if none exists
Return the first Some(x) of the given sequence, or
None if none exists
Split a sequence of things into two sequences, one with all the elements for which certain predicate holds, and one with the elements for which the predicate does not hold
Determine whether a occurs in b as a sub-sequence
Determine whether a occurs in b as a sub-sequence
Determine whether a occurs in b as a sub-sequence
Determine whether a occurs in b as a sub-sequence
Lazily convert a function (over naturals) to a stream
Iterator over exactly three elements
Compute union of a sequence of sets.
Compute union of a sequence of sets.
(Since version ) see corresponding Javadoc for more information.