From 2fc08a41b0f70676829789dbb409ec8d2be1889f Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Sat, 11 Jan 2020 17:59:02 -0800 Subject: [PATCH] Removed reducing threshold Signed-off-by: James Ketrenos --- clusters-pre | 10 +++------- scanner/scanner.c | 7 +++++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/clusters-pre b/clusters-pre index 0e3c737..ab50337 100644 --- a/clusters-pre +++ b/clusters-pre @@ -8,7 +8,7 @@ function loadMore(index) { } var faces = clusterBlock.querySelectorAll("div.face").length, i for (i = faces; i < clusters[index].length; i++) { - if (i - faces > 15) { + if (i - faces > 10) { return; } var tuple = clusters[index][i], @@ -51,18 +51,14 @@ document.addEventListener("DOMContentLoaded", (event) => { document.body.appendChild(clusterBlock); var div = document.createElement("div"); var html = "Cluster " + (clusterIndex + 1) + " has " + cluster.length + " neighbors."; - if (cluster.length > 15) { + if (cluster.length >= 10) { html += " more"; } div.innerHTML = html; clusterBlock.appendChild(div); - if (clusterIndex > 20) { - return; - } - cluster.forEach((tuple, index) => { - if (index > 15) { + if (index >= 10) { return; } var face = createFace(tuple[0], tuple[1]); diff --git a/scanner/scanner.c b/scanner/scanner.c index 4cfb694..b803251 100644 --- a/scanner/scanner.c +++ b/scanner/scanner.c @@ -152,6 +152,7 @@ long int DBSCAN(Face **ppFaces, long int faceCount, float eps, int minPts) { float threshold = eps; FaceLink *pNeighbors = RangeQuery(ppFaces, faceCount, pFace, eps); long neighborCount = chainLength(pNeighbors); +/* while (neighborCount > minPts * 5) { threshold *= 0.9; freeChain(pNeighbors); @@ -159,6 +160,7 @@ long int DBSCAN(Face **ppFaces, long int faceCount, float eps, int minPts) { neighborCount = chainLength(pNeighbors); fprintf(stderr, "\rWith eps of %f, %ld has %ld neighbors.", threshold, pFace->faceId, neighborCount); } +*/ if (neighborCount < minPts) { pFace->clusterType = NOISE; @@ -193,15 +195,16 @@ long int DBSCAN(Face **ppFaces, long int faceCount, float eps, int minPts) { FaceLink *pSubNeighbors = RangeQuery(ppFaces, faceCount, pQ, eps); neighborCount = chainLength(pSubNeighbors); +/* threshold = eps; - while (neighborCount > minPts * 5) { + while (neighborCount > minPts * 1.25) { threshold *= 0.9; freeChain(pSubNeighbors); pSubNeighbors = RangeQuery(ppFaces, faceCount, pQ, threshold); neighborCount = chainLength(pSubNeighbors); fprintf(stderr, "\rWith eps of %f, %ld has %ld neighbors.", threshold, pQ->faceId, neighborCount); } - +*/ if (neighborCount >= minPts) { pQ->clusterType = CORE; /* Append these neighbors to the end of the chain */