@tscircuit/capacity-autorouter 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -74,6 +74,8 @@ interface CapacityMeshNode {
74
74
  _containsTarget?: boolean;
75
75
  _targetConnectionName?: string;
76
76
  _strawNode?: boolean;
77
+ _strawParentCapacityMeshNodeId?: CapacityMeshNodeId;
78
+ _adjacentNodeIds?: CapacityMeshNodeId[];
77
79
  _parent?: CapacityMeshNode;
78
80
  }
79
81
  interface CapacityMeshEdge {
@@ -111,7 +113,8 @@ declare class CapacityMeshEdgeSolver extends BaseSolver {
111
113
  constructor(nodes: CapacityMeshNode[]);
112
114
  getNextCapacityMeshEdgeId(): string;
113
115
  step(): void;
114
- private doNodesHaveSharedLayer;
116
+ handleTargetNodes(): void;
117
+ doNodesHaveSharedLayer(node1: CapacityMeshNode, node2: CapacityMeshNode): boolean;
115
118
  visualize(): GraphicsObject;
116
119
  }
117
120
 
@@ -252,7 +255,7 @@ declare class CapacityPathingSolver extends BaseSolver {
252
255
  getBacktrackedPath(candidate: Candidate): CapacityMeshNode[];
253
256
  getNeighboringNodes(node: CapacityMeshNode): CapacityMeshNode[];
254
257
  getCapacityPaths(): CapacityPath[];
255
- doesNodeHaveCapacityForTrace(node: CapacityMeshNode): boolean;
258
+ doesNodeHaveCapacityForTrace(node: CapacityMeshNode, prevNode: CapacityMeshNode): boolean;
256
259
  canTravelThroughObstacle(node: CapacityMeshNode, connectionName: string): boolean;
257
260
  getDistanceBetweenNodes(A: CapacityMeshNode, B: CapacityMeshNode): number;
258
261
  reduceCapacityAlongPath(nextConnection: {
@@ -1185,9 +1188,12 @@ declare class SingleLayerNodeMergerSolver extends BaseSolver {
1185
1188
  absorbedNodeIds: Set<CapacityMeshNodeId>;
1186
1189
  nextBatchNodeIds: CapacityMeshNodeId[];
1187
1190
  batchHadModifications: boolean;
1191
+ hasComputedAdjacentNodeIds: boolean;
1188
1192
  newNodes: CapacityMeshNode[];
1189
1193
  constructor(nodes: CapacityMeshNode[]);
1194
+ computeAdjacentNodeIdsForFirstBatch(nodes: CapacityMeshNode[]): void;
1190
1195
  getAdjacentSameLayerUnprocessedNodes(rootNode: CapacityMeshNode): CapacityMeshNode[];
1196
+ getAdjacentSameLayerUnprocessedNodes2(rootNode: CapacityMeshNode): CapacityMeshNode[];
1191
1197
  _step(): void;
1192
1198
  visualize(): GraphicsObject;
1193
1199
  }
@@ -1238,6 +1244,10 @@ declare class MultiSimplifiedPathSolver extends BaseSolver {
1238
1244
  visualize(): GraphicsObject;
1239
1245
  }
1240
1246
 
1247
+ declare class CapacityMeshEdgeSolver2_NodeTreeOptimization extends CapacityMeshEdgeSolver {
1248
+ step(): void;
1249
+ }
1250
+
1241
1251
  interface CapacityMeshSolverOptions {
1242
1252
  capacityDepth?: number;
1243
1253
  targetMinCapacity?: number;
@@ -1273,7 +1283,7 @@ declare class CapacityMeshSolver extends BaseSolver {
1273
1283
  connMap: ConnectivityMap;
1274
1284
  srjWithPointPairs?: SimpleRouteJson;
1275
1285
  capacityNodes: CapacityMeshNode[] | null;
1276
- pipelineDef: (PipelineStep<typeof NetToPointPairsSolver> | PipelineStep<typeof CapacityMeshNodeSolver2_NodeUnderObstacle> | PipelineStep<typeof SingleLayerNodeMergerSolver> | PipelineStep<typeof StrawSolver> | PipelineStep<typeof CapacityMeshEdgeSolver> | PipelineStep<typeof CapacityPathingSolver5> | PipelineStep<typeof CapacityEdgeToPortSegmentSolver> | PipelineStep<typeof CapacitySegmentToPointSolver> | PipelineStep<typeof UnravelMultiSectionSolver> | PipelineStep<typeof HighDensitySolver> | PipelineStep<typeof MultipleHighDensityRouteStitchSolver> | PipelineStep<typeof MultiSimplifiedPathSolver>)[];
1286
+ pipelineDef: (PipelineStep<typeof NetToPointPairsSolver> | PipelineStep<typeof CapacityMeshNodeSolver2_NodeUnderObstacle> | PipelineStep<typeof SingleLayerNodeMergerSolver> | PipelineStep<typeof StrawSolver> | PipelineStep<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep<typeof CapacityPathingSolver5> | PipelineStep<typeof CapacityEdgeToPortSegmentSolver> | PipelineStep<typeof CapacitySegmentToPointSolver> | PipelineStep<typeof UnravelMultiSectionSolver> | PipelineStep<typeof HighDensitySolver> | PipelineStep<typeof MultipleHighDensityRouteStitchSolver> | PipelineStep<typeof MultiSimplifiedPathSolver>)[];
1277
1287
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshSolverOptions);
1278
1288
  currentPipelineStepIndex: number;
1279
1289
  _step(): void;