dist/cytoscape.esm.js
function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) {
  while (size > sizeLimit) {
    // Choose an edge randomly
    var edgeIndex = Math.floor(Math.random() * remainingEdges.length); // Collapse graph based on edge

    remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges);
    size--;
  }

  return remainingEdges;
}
function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) {
  while (size > sizeLimit) {
    // Choose an edge randomly
    var edgeIndex = Math.floor(Math.random() * remainingEdges.length); // Collapse graph based on edge

    remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges);
    size--;
  }

  return remainingEdges;
}
function contractUntil ( metaNodeMap , remainingEdges , size , sizeLimit ) { while ( size > sizeLimit ) { // Choose an edge randomly var edgeIndex = Math . floor ( Math . random ( ) * remainingEdges . length ) ; // Collapse graph based on edge remainingEdges = collapse ( edgeIndex , metaNodeMap , remainingEdges ) ; size -- ; } return remainingEdges ; }
Contracts a graph until we reach a certain number of meta nodes
Contracts a graph until we reach a certain number of meta nodes