histogram: TODO about reducing complexity on insert
Blake Mizerany
10 years ago
78 | 78 |
return r.bins[i].Mean() >= bin.Mean()
|
79 | 79 |
})
|
80 | 80 |
if i < 0 || i == r.bins.Len() {
|
|
81 |
// TODO(blake): Maybe use an .insert(i, bin) instead of
|
|
82 |
// performing the extra work of a heap.Push.
|
81 | 83 |
heap.Push(&r.bins, bin)
|
82 | 84 |
return
|
83 | 85 |
}
|