Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AscendingItemSize ¶
func DescendingItemSize ¶
Types ¶
type BucketOrientedFit ¶
type BucketOrientedFit struct { helper.ReorderBucketsByItemsFunc ItemOrderComparatorFunc }
BucketOrientedFit is an optimizer that implements the heuristic algorithm applying items to buckets in specific order defined by bucket order function and item order function. helper.ReorderBucketsByItemsFunc defines the order in which buckets will be filled. ItemOrderComparatorFunc defines the order in which items will be placed into the current bucket. The heuristic name comprises "bucket oriented" since it first reorders buckets, then fills them in defined order using items. The implementation works in O(v*n + v*n*lgv) time.
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
func NewContainer ¶
func NewContainer(initialItems [][]int, comparatorFunc ItemOrderComparatorFunc) Container
func (Container) MarkAsUsed ¶
type ItemOrderComparatorFunc ¶
Click to show internal directories.
Click to hide internal directories.