Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlmostWorstFit ¶
type AlmostWorstFit struct{}
AlmostWorstFit is an optimizer that implements the almost-worst-fit algorithm expanded to solve the bin packing problem with heterogeneous bins and items with different sizes that depend on the bin choice. The first attempt is to assign the item to the second emptiest bin. If it doesn't fit, then the item is placed in the emptiest bin. If the item can't be assigned to both of them, it is put into any other buckets in heap array order. That means that if the item doesn't fit the two emptiest bins, the third emptiest one is checked, and then the consecutive ones in heap order.
Click to show internal directories.
Click to hide internal directories.