ExBoxPacker.Sorting.PackedBoxSorter behaviour (ExBoxPacker v0.2.0)

Copy Markdown View Source

Behaviour for choosing the best packed box during selection (analog of BoxPacker's PackedBoxSorter).

Summary

Callbacks

Return a negative int if a sorts before b, positive if after, 0 if equal.

Callbacks

compare(a, b)

@callback compare(
  a :: ExBoxPacker.Result.PackedBox.t(),
  b :: ExBoxPacker.Result.PackedBox.t()
) :: integer()

Return a negative int if a sorts before b, positive if after, 0 if equal.