Reducing threshold:
Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
This commit is contained in:
parent
f5c3c14257
commit
0d345980dc
@ -188,11 +188,11 @@ long int DBSCAN(Face **ppFaces, long int faceCount, double eps, int minPts) {
|
|||||||
FaceLink *pNeighbors = RangeQuery(ppFaces, faceCount, pFace, eps);
|
FaceLink *pNeighbors = RangeQuery(ppFaces, faceCount, pFace, eps);
|
||||||
long neighborCount = chainLength(pNeighbors);
|
long neighborCount = chainLength(pNeighbors);
|
||||||
while (neighborCount > minPts * 5) {
|
while (neighborCount > minPts * 5) {
|
||||||
fprintf(stderr, "\nWith eps of %f, %ld has %ld neighbors.", threshold, pFace->faceId, neighborCount);
|
|
||||||
threshold *= 0.9;
|
threshold *= 0.9;
|
||||||
freeChain(pNeighbors);
|
freeChain(pNeighbors);
|
||||||
pNeighbors = RangeQuery(ppFaces, faceCount, pFace, threshold);
|
pNeighbors = RangeQuery(ppFaces, faceCount, pFace, threshold);
|
||||||
neighborCount = chainLength(pNeighbors);
|
neighborCount = chainLength(pNeighbors);
|
||||||
|
fprintf(stderr, "With eps of %f, %ld has %ld neighbors.\n", threshold, pFace->faceId, neighborCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (neighborCount < minPts) {
|
if (neighborCount < minPts) {
|
||||||
@ -228,12 +228,13 @@ long int DBSCAN(Face **ppFaces, long int faceCount, double eps, int minPts) {
|
|||||||
|
|
||||||
FaceLink *pSubNeighbors = RangeQuery(ppFaces, faceCount, pQ, eps);
|
FaceLink *pSubNeighbors = RangeQuery(ppFaces, faceCount, pQ, eps);
|
||||||
neighborCount = chainLength(pSubNeighbors);
|
neighborCount = chainLength(pSubNeighbors);
|
||||||
|
threshold = eps;
|
||||||
while (neighborCount > minPts * 5) {
|
while (neighborCount > minPts * 5) {
|
||||||
fprintf(stderr, "\nWith eps of %f, %ld has %ld neighbors.", threshold, pFace->faceId, neighborCount);
|
|
||||||
threshold *= 0.9;
|
threshold *= 0.9;
|
||||||
freeChain(pNeighbors);
|
freeChain(pSubNeighbors);
|
||||||
pNeighbors = RangeQuery(ppFaces, faceCount, pFace, threshold);
|
pSubNeighbors = RangeQuery(ppFaces, faceCount, pQ, threshold);
|
||||||
neighborCount = chainLength(pNeighbors);
|
neighborCount = chainLength(pSubNeighbors);
|
||||||
|
fprintf(stderr, "With eps of %f, %ld has %ld neighbors.\n", threshold, pQ->faceId, neighborCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (neighborCount >= minPts) {
|
if (neighborCount >= minPts) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user