Calculate the Nxx (e.g. N50) of values. values will be sorted in the process. If this is undesired the range must be duplicated beforehands. The elements of values are passed to map before calculating the median. This removes the necessity of creating a proxy range.
Returns the absolute difference between two numbers.
Add an edge to this graph and handle existing edges with handleConflict. The handler must have this signature Edge handleConflict(Edge, Edge).
Add a set of edges to this graph and merge mutli-edges using merge.
Round x upward according to base, ie. returns the next integer larger or equal to x which is divisible by base.
Returns the result of ceil(a / b) but uses integer arithmetic only.
Eliminate outliers the deviate more than expected from the sample median. A data point x is an outlier iff
Find all maximal cliques in a graph represented by adjacencyList. The implementation is based on version 1 of the Bron-Kerbosch algorithm [1].
Find a cycle base of an undirected graph using the Paton's algorithm.
Find all maximal connected components of a graph-like structure. The predicate isConnected will be evaluated O(n^^2) times in the worst-case and Ω(n) in the best case. In expectation it will be evaluated θ(n*log(n)).
Round x downward according to base, ie. returns the next integer smaller or equal to x which is divisible by base.
Creates a histogram of values. Additional values can be inserted into the histogram using the insert method. The second form logHistogram creates a histogram with logarithmic bin sizes.
Creates a histogram of values. Additional values can be inserted into the histogram using the insert method. The second form logHistogram creates a histogram with logarithmic bin sizes.
Compute a logarithmic index to base of value and vice versa. The function is piecewise linear for each interval of base indices. For interger values, the functions are mathematically equivalent to:
Check if value has the standardized undefined value.
Creates a histogram of values. Additional values can be inserted into the histogram using the insert method. The second form logHistogram creates a histogram with logarithmic bin sizes.
Compute a logarithmic index to base of value and vice versa. The function is piecewise linear for each interval of base indices. For interger values, the functions are mathematically equivalent to:
Calculate a longest increasing subsequence of sequence. This subsequence is not necessarily contiguous, or unique. Given a sequence of n elements the algorithm uses O(n log n) evaluation of pred.
Calculate the mean of range.
Calculate the weighted mean of values.
Calculate the median of funed values. The elements of values are passed to fun before calculating the median. This removes the necessity of creating a proxy range.
Calculate the quantiles of values mapped with fun. The elements of values are passed to fun before calculating the quantiles. This removes the necessity of creating a proxy range.
Calculate the standard deviation (sigma^^2) of the sample.
This structure represents a graph with optional edge payloads. The graph is represented as a list of edges which is particularly suited for sparse graphs. While the set of nodes is fixed the set of edges is mutable.
Standardized value that signifies undefined for all numeric types. It is NaN for floating point types and the maximum representable value for integer types.
Some additional mathematical functions.