11import { expect , test } from "bun:test"
22import {
3+ type Candidate ,
34 type TinyHyperGraphProblem ,
45 TinyHyperGraphSolver ,
56 type TinyHyperGraphTopology ,
@@ -18,6 +19,7 @@ const createRegionCache = (
1819 existingSameLayerIntersections : 0 ,
1920 existingEntryExitLayerChanges : 0 ,
2021 existingRegionCost,
22+ existingSegmentCount : 0 ,
2123} )
2224
2325const createTestSolver = ( ) => {
@@ -48,7 +50,6 @@ const createTestSolver = () => {
4850 regionHeight : new Float64Array ( regionCount ) . fill ( 1 ) ,
4951 regionCenterX : new Float64Array ( regionCount ) . fill ( 0 ) ,
5052 regionCenterY : new Float64Array ( regionCount ) . fill ( 0 ) ,
51- regionNetId : new Int32Array ( regionCount ) . fill ( - 1 ) ,
5253 portAngleForRegion1 : new Int32Array ( portCount ) ,
5354 portAngleForRegion2 : new Int32Array ( portCount ) ,
5455 portX,
@@ -78,12 +79,11 @@ test("completed routing rerips when a region exceeds the current threshold", ()
7879 solver . state . regionIntersectionCaches [ 0 ] = createRegionCache ( 0.5 )
7980 solver . state . regionIntersectionCaches [ 1 ] = createRegionCache ( 0.1 )
8081 solver . state . regionCongestionCost [ 1 ] = 0.2
81- solver . state . candidateQueue = new MinHeap (
82+ solver . state . candidateQueue = new MinHeap < Candidate > (
8283 [
8384 {
8485 nextRegionId : 0 ,
8586 portId : 1 ,
86- segmentId : 1 ,
8787 f : 1 ,
8888 g : 0.5 ,
8989 h : 0.5 ,
0 commit comments