Skip to content

Commit 3b3af21

Browse files
committed
[Refactor] Temporary bypass neighbor merging in GridClusterer.java
1 parent fcd5ee1 commit 3b3af21

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

src/main/java/boombimapi/domain/place/cluster/impl/GridClusterer.java

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,28 @@ public List<ClusterResult> cluster(
7272
.add(clusterInput.id(), worldPixelX, worldPixelY);
7373
}
7474

75-
return mergeNeighbors(
76-
cellAccumulators,
77-
cellSizePixel
78-
);
75+
// 기존: 인접 셀 병합 (Union-Find)
76+
// return mergeNeighbors(
77+
// cellAccumulators,
78+
// cellSizePixel
79+
// );
80+
81+
// 임시: mergeNeighbors() 적용 없이, 셀 단위 그대로 클러스터 결과 생성
82+
List<ClusterResult> clusterResults = new ArrayList<>(cellAccumulators.size());
83+
84+
for (CellAccumulator accumulator : cellAccumulators.values()) {
85+
Cell cell = new Cell(accumulator.getCellX(), accumulator.getCellY());
86+
87+
clusterResults.add(ClusterResult.of(
88+
cell,
89+
accumulator.centroidWorldPixelX(),
90+
accumulator.centroidWorldPixelY(),
91+
accumulator.getCount(),
92+
accumulator.getPlaceIds()
93+
));
94+
}
95+
96+
return clusterResults;
7997
}
8098

8199
private List<ClusterResult> mergeNeighbors(

0 commit comments

Comments
 (0)