Perform Centrality Functions on all Nodes using Cytoscape.js
问题 I need to calculate degree, closeness and betweenness centrality for every node on a graph. I'm currently using the functions built into Cytoscape.js on each node after the cy.ready() event. However, as the graphs are quite large (250+ Nodes, 650+ Connections) it's taking too long to compute. Can anyone suggest a more efficient method? var calculateSNA = function() { // Don't run if already set... if(data.sna) return false console.log('Running SNA') _.map(nodes, function(node) { var target =