MCPcopy
hub / github.com/arnauddri/algorithms / NewItem

Function NewItem

data-structures/priority-queue/priority_queue.go:13–18  ·  view source on GitHub ↗
(value interface{}, priority int)

Source from the content-addressed store, hash-verified

11}
12
13func NewItem(value interface{}, priority int) (i *Item) {
14 return &Item{
15 Value: value,
16 Priority: priority,
17 }
18}
19
20func (x Item) Less(than heap.Item) bool {
21 return x.Priority < than.(Item).Priority

Callers 3

TestMaxPriorityQueueFunction · 0.85
TestMinPriorityQueueFunction · 0.85
TestChangePriorityFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestMaxPriorityQueueFunction · 0.68
TestMinPriorityQueueFunction · 0.68
TestChangePriorityFunction · 0.68