Calculates the sum of the values in an array.
Values
Sum of values
Calculates the sum of the values in an array, considering only array elements within a specified range.
The sum is calculated over the elements values[beginIndex], ..., values[endIndex - 1]
.
Values
Begin index
End index
Sum of values
Calculates the average of the values in an array.
Values
Average value
Calculates the median of the values in an array.
Values
Median value
Calculates the minimum of the values in an array.
Values
Minimum value
Calculates the maximum of the values in an array.
Values
Maximum value
Creates a double array of random numbers.
Number of elements
Random number generator
Array of random numbers
Generates a random permutation.
A random permutation is generated of the integers0, ..., nElements - 1
.
Number of elements
Random number generator
Random permutation
Searches a range of the specified array of numbers for the specified value using the binary search algorithm. The array must be sorted prior to making this call. If it is not sorted, the results are undefined. If the range contains multiple elements with the specified value, there is no guarantee which one will be found.
Array to be searched (must be sorted)
Index of the first element (inclusive) to be searched
Index of the last element (exclusive) to be searched
Value to be searched for
Index at which the key was found, or -n-1 if it was not found, where n is the index of the first value higher than key or length if there is no such value.
Calculates exp(exponent)
using a fast implementation.
Exponent
exp(exponent)
Calculates base ^ exponent
using a fast implementation.
Base
Exponent
base ^ exponent
Generated using TypeDoc
Provides miscellaneous utility functions.