Some additional mathematical functions.
Calculate the Nxx (e.g. N50) of values.
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.
Find all maximal cliques in a graph represented by adjacencyList. The implementation is based on version 1 of the Bron-Kerbosch algorithm .
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.
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 range.
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.