GridPackOptions
GridPackOptions<
T> =object
Defined in: grid-pack-dfs.ts:12
Type Parameters
Section titled “Type Parameters”T extends GridPackItem
Properties
Section titled “Properties”classify
Section titled “classify”classify: (
candidate,lastPlaced,remaining) =>number
Defined in: grid-pack-dfs.ts:22
Assigns a numeric priority weight to a candidate at the current grid
position. Lower weights are tried first. Candidates with equal weight are
tried in the order they appear in items.
Parameters
Section titled “Parameters”candidate
Section titled “candidate”T
The item under consideration.
lastPlaced
Section titled “lastPlaced”T | null
The most recently placed item, or null at the root.
remaining
Section titled “remaining”readonly T[]
All items not yet placed at this DFS node.
Returns
Section titled “Returns”number
rowBudget?
Section titled “rowBudget?”
optionalrowBudget?:number
Defined in: grid-pack-dfs.ts:38
Maximum DFS node expansions per frontier row before drilling a hole. The counter resets each time the DFS reaches a row it has never visited before, so this is a per-row limit, not a per-full-search limit.
shapeKey?
Section titled “shapeKey?”
optionalshapeKey?: (item) =>string
Defined in: grid-pack-dfs.ts:32
Returns a deduplication key for shape-based DFS pruning: only one item per
unique key is expanded at each grid position. Defaults to
"${cols}x${rows}".
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”string