private void insertScores(List<NodeCluster> clusters, PageRank<PRNode, PREdge> pageRank) { for (PRNode node : graph.getVertices()) { node.setPRScore(pageRank.getVertexScore(node)); for (NodeCluster cluster : clusters) { if (cluster.getNodeScores().containsKey(node.getCyNode().getSUID())) { cluster.addScoreToAvg(pageRank.getVertexScore(node)); } } } }
private PageRank<PRNode, PREdge> performPageRank() { PageRank<PRNode, PREdge> pageRank = new PageRank<>(graph, transformEdge(), context.getAlpha()); pageRank.setMaxIterations(1000); pageRank.evaluate(); return pageRank; }