License:
BSD style: see license.txtAuthors:
Sean KellyParams:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pred | The evaluation predicate, which should return true if the element is a valid match and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pred | The evaluation predicate, which should return true if the element is a valid match and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to scan. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
True if an element equivalent to pat is found, false if not.Params:
buf | The array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
True if an element equivalent to pat is found, false if not.Params:
bufA | The array to evaluate. |
bufB | The array to match against. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first mismatch or N if the first N elements of bufA and bufB match, where N = min(bufA.length, bufB.length).Params:
buf | The array to scan. |
pat | The pattern to match. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The number of elements matching pat.Params:
buf | The array to scan. |
pred | The evaluation predicate, which should return true if the element is a valid match and false if not. This predicate may be any callable type. |
Returns:
The number of elements where pred returns true.Params:
buf | The array to scan. |
pat | The pattern to match. |
val | The value to substitute. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The number of elements replaced.Params:
buf | The array to scan. |
val | The value to substitute. |
pred | The evaluation predicate, which should return true if the element is a valid match and false if not. This predicate may be any callable type. |
Returns:
The number of elements replaced.Params:
buf | The array to scan. This parameter is not marked 'ref' to allow temporary slices to be modified. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
pat | The pattern to match against. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The number of elements that do not match pat.Params:
buf | The array to scan. This parameter is not marked 'ref' to allow temporary slices to be modified. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
pat | The pattern to match against. |
Returns:
The number of elements that do not match pat.Params:
buf | The array to scan. This parameter is not marked 'ref' to allow temporary slices to be modified. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
pred | The evaluation predicate, which should return true if the element satisfies the condition and false if not. This predicate may be any callable type. |
Returns:
The number of elements that do not satisfy pred.Params:
buf | The array to scan. This parameter is not marked 'ref' to allow temporary slices to be modified. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
pred | The evaluation predicate, which should return true if e1 is equal to e2 and false if not. This predicate may be any callable type. |
Returns:
The number of distinct sub-sequences in buf.Params:
buf | The array to shuffle. |
oper | The randomize operation, which should return a number in the range [0 .. N) for any supplied value N. This routine may be any callable type. |
Params:
buf | The array to partition. This parameter is not marked 'ref' to allow temporary slices to be sorted. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
pred | The evaluation predicate, which should return true if the element satisfies the condition and false if not. This predicate may be any callable type. |
Returns:
The number of elements that satisfy pred.Params:
buf | The array to partition. This parameter is not marked 'ref' to allow temporary slices to be sorted. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
num | The number of elements which are considered significant in this array, where num - 1 is the pivot around which partial sorting will occur. For example, if num is buf.length / 2 then select will effectively partition the array around its median value, with the elements in the first half of the array evaluating as less than or equal to the elements in the second half. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the pivot point, which will be the lesser of num - 1 and buf.length.Params:
buf | The array to sort. This parameter is not marked 'ref' to allow temporary slices to be sorted. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Params:
buf | The sorted array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The sorted array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
The index of the first match or buf.length if no match was found.Params:
buf | The sorted array to search. |
pat | The pattern to search for. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
True if an element equivalent to pat is found, false if not.Params:
setA | The sorted array to evaluate. |
setB | The sorted array to match against. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
true if setA includes all elements in setB, false if not.Params:
setA | The first sorted array to evaluate. |
setB | The second sorted array to evaluate. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
A new array containing the union of setA and setB.Params:
setA | The first sorted array to evaluate. |
setB | The second sorted array to evaluate. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
A new array containing the intersection of setA and setB.Params:
setA | The first sorted array to evaluate. |
setB | The second sorted array to evaluate. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
A new array containing the elements in setA that are not in setB.Params:
setA | The first sorted array to evaluate. |
setB | The second sorted array to evaluate. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Returns:
A new array containing the elements in setA that are not in setB and the elements in setB that are not in setA.Params:
buf | The array to convert. This parameter is not marked 'ref' to allow temporary slices to be sorted. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Params:
buf | The heap to modify. This parameter is marked 'ref' because buf.length will be altered. |
val | The element to push onto buf. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Params:
buf | The heap to modify. This parameter is marked 'ref' because buf.length will be altered. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |
Params:
buf | The heap to sort. This parameter is not marked 'ref' to allow temporary slices to be sorted. As buf is not resized in any way, omitting the 'ref' qualifier has no effect on the result of this operation, even though it may be viewed as a side-effect. |
pred | The evaluation predicate, which should return true if e1 is less than e2 and false if not. This predicate may be any callable type. |