// Estimate an undirected global minimum cut with the randomized Karger–Stein contraction algorithm
eles.kargerStein(): KargerSteinResultEstimate an undirected global minimum cut with the randomized Karger–Stein contraction algorithm. Connected input is required for its guarantee. Random choices mean repeated runs may produce different partitions; the minimum-cut result is probabilistic.
Returns
KargerSteinResult{ cut, components, partition1, partition2 }; cut contains crossing edges and the two partitions contain the corresponding nodes
Example
// The exact cut can vary; this path graph's minimum cut has one edge.console.log(eles.kargerStein().cut.edges().length); // 1Throws
if fewer than two nodes are present or a contraction reaches a graph with no edges