Skip to content

GridPackOptions

GridPackOptions<T> = object

Defined in: grid-pack-dfs.ts:12

T extends GridPackItem

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.

T

The item under consideration.

T | null

The most recently placed item, or null at the root.

readonly T[]

All items not yet placed at this DFS node.

number


optional rowBudget?: 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.


optional shapeKey?: (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}".

T

string