Color quantization: Difference between revisions

m
→‎{{header|Go}}: index is not used (put it back if you use it later)
(Updated D entry)
m (→‎{{header|Go}}: index is not used (put it back if you use it later))
Line 331:
widestCh int // rx, gx, bx const for channel with widest value range
chRange uint32 // value range (vmax-vmin) of widest channel
index int // heap index
}
 
Line 570 ⟶ 569:
func (q queue) Swap(i, j int) {
q[i], q[j] = q[j], q[i]
q[i].index = i
q[j].index = j
}
func (pq *queue) Push(x interface{}) {
c := x.(*cluster)
c.index = len(*pq)
*pq = append(*pq, c)
}
Anonymous user