Sort and limit clusters output while debugging
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
78815f14eb
commit
5e55a845ca
@ -5,11 +5,12 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
||||
var div = document.createElement("div");
|
||||
div.textContent = "There are " + clusters.length + " clusters.";
|
||||
document.body.appendChild(div);
|
||||
clusters.forEach((cluster, index) => {
|
||||
clusters.sort((a, b) => { return b.length - a.length });
|
||||
clusters.forEach((cluster, clusterIndex) => {
|
||||
var div = document.createElement("div");
|
||||
div.textContent = "Cluster " + (index + 1) + " has " + cluster.length + " neighbors.";
|
||||
div.textContent = "Cluster " + (clusterIndex + 1) + " has " + cluster.length + " neighbors.";
|
||||
document.body.appendChild(div);
|
||||
cluster.forEach((tuple, index) => {
|
||||
if (clusterIndex < 20) cluster.forEach((tuple, index) => {
|
||||
if (index > 15) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user