File tree Expand file tree Collapse file tree
src/main/java/boombimapi/domain/place/cluster/impl Expand file tree Collapse file tree Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments