func (r *SortedFloat64ToStringMap) DeleteMax() (oldk float64, oldv string, ok bool) {
	r.root, oldk, oldv, ok = r.deleteMax(r.root)
	if !r.IsEmpty() {
		r.root.colorRed = false
	}
	return
}
DeleteMax removes the largest key and its value from the sorted map.
package codegen
func (r SortedFloat64ToStringMap) compare(a, b float64) int {
	const e = 0.00000001
    diff := (a-b)/a
    if diff < -e {
        return -1
    } else if diff > e {
        return 1
    }
    return 0
}
type SortedFloat64ToStringMap struct {
	root *nodeFloat64ToString
}
func NewSortedFloat64ToStringMap() *SortedFloat64ToStringMap { return &SortedFloat64ToStringMap{} }
func (r SortedFloat64ToStringMap) IsEmpty() bool {
	return r.root == nil
}
func (r SortedFloat64ToStringMap) Size() int { return r.root.size() }
func (r *SortedFloat64ToStringMap) Clear() { r.root = nil }
func (r *SortedFloat64ToStringMap) Put(k float64, v string) (old string, overwrite bool) {
	r.root, old, overwrite = r.put(r.root, k, func() string { return v }, func(_ string) string { return v })
	return
}
func (r *SortedFloat64ToStringMap) Mutate(k float64, creator func() string, mutator func(old string) string) {
	r.root, _, _ = r.put(r.root, k, creator, mutator)
}
func (r *SortedFloat64ToStringMap) put(h *nodeFloat64ToString, k float64, create func() string, mutate func(old string) string) (_ *nodeFloat64ToString, old string, overwrite bool) {
	if h == nil {
		n := &nodeFloat64ToString{key: k, val: create(), n: 1, colorRed: true}
		return n, old, overwrite
	}
	cmp := r.compare(k, h.key)
	if cmp < 0 {
		h.left, old, overwrite = r.put(h.left, k, create, mutate)
	} else if cmp > 0 {
		h.right, old, overwrite = r.put(h.right, k, create, mutate)
	} else {
		overwrite = true
		old = h.val
		h.val = mutate(old)
	}
	if h.right.isRed() && !h.left.isRed() {
		h = r.rotateLeft(h)
	}
	if h.left.isRed() && h.left.left.isRed() {
		h = r.rotateRight(h)
	}
	if h.left.isRed() && h.right.isRed() {
		r.flipColors(h)
	}
	h.n = h.left.size() + h.right.size() + 1
	return h, old, overwrite
}
func (r SortedFloat64ToStringMap) Get(k float64) (string, bool) {
	return r.loopGet(r.root, k)
}
func (r SortedFloat64ToStringMap) loopGet(h *nodeFloat64ToString, k float64) (v string, ok bool) {
	for h != nil {
		cmp := r.compare(k, h.key)
		if cmp == 0 {
			return h.val, true
		} else if cmp < 0 {
			h = h.left
		} else if cmp > 0 {
			h = h.right
		}
	}
	return
}
func (r SortedFloat64ToStringMap) Has(k float64) bool {
	_, ok := r.loopGet(r.root, k)
	return ok
}
func (r SortedFloat64ToStringMap) Min() (k float64, v string, ok bool) {
	if r.root == nil {
		return
	}
	h := r.min(r.root)
	return h.key, h.val, true
}
func (r SortedFloat64ToStringMap) min(x *nodeFloat64ToString) *nodeFloat64ToString {
	if x.left == nil {
		return x
	}
	return r.min(x.left)
}
func (r SortedFloat64ToStringMap) Max() (k float64, v string, ok bool) {
	if r.root == nil {
		return
	}
	h := r.max(r.root)
	return h.key, h.val, true
}
func (r SortedFloat64ToStringMap) max(x *nodeFloat64ToString) *nodeFloat64ToString {
	if x.right == nil {
		return x
	}
	return r.max(x.right)
}
func (r SortedFloat64ToStringMap) Floor(key float64) (k float64, v string, ok bool) {
	x := r.floor(r.root, key)
	if x == nil {
		return
	}
	return x.key, x.val, true
}
func (r SortedFloat64ToStringMap) floor(h *nodeFloat64ToString, k float64) *nodeFloat64ToString {
	if h == nil {
		return nil
	}
	cmp := r.compare(k, h.key)
	if cmp == 0 {
		return h
	}
	if cmp < 0 {
		return r.floor(h.left, k)
	}
	t := r.floor(h.right, k)
	if t != nil {
		return t
	}
	return h
}
func (r SortedFloat64ToStringMap) Ceiling(key float64) (k float64, v string, ok bool) {
	x := r.ceiling(r.root, key)
	if x == nil {
		return
	}
	return x.key, x.val, true
}
func (r SortedFloat64ToStringMap) ceiling(h *nodeFloat64ToString, k float64) *nodeFloat64ToString {
	if h == nil {
		return nil
	}
	cmp := r.compare(k, h.key)
	if cmp == 0 {
		return h
	}
	if cmp > 0 {
		return r.ceiling(h.right, k)
	}
	t := r.ceiling(h.left, k)
	if t != nil {
		return t
	}
	return h
}
func (r SortedFloat64ToStringMap) Select(key int) (k float64, v string, ok bool) {
	x := r.nodeselect(r.root, key)
	if x == nil {
		return
	}
	return x.key, x.val, true
}
func (r SortedFloat64ToStringMap) nodeselect(x *nodeFloat64ToString, k int) *nodeFloat64ToString {
	if x == nil {
		return nil
	}
	t := x.left.size()
	if t > k {
		return r.nodeselect(x.left, k)
	} else if t < k {
		return r.nodeselect(x.right, k-t-1)
	} else {
		return x
	}
}
func (r SortedFloat64ToStringMap) Rank(k float64) int {
	return r.keyrank(k, r.root)
}
func (r SortedFloat64ToStringMap) keyrank(k float64, h *nodeFloat64ToString) int {
	if h == nil {
		return 0
	}
	cmp := r.compare(k, h.key)
	if cmp < 0 {
		return r.keyrank(k, h.left)
	} else if cmp > 0 {
		return 1 + h.left.size() + r.keyrank(k, h.right)
	} else {
		return h.left.size()
	}
}
func (r SortedFloat64ToStringMap) Keys(visit func(float64, string) bool) {
	min, _, ok := r.Min()
	if !ok {
		return
	}
	max, _, _ := r.Max()
	r.RangedKeys(min, max, visit)
}
func (r SortedFloat64ToStringMap) RangedKeys(lo, hi float64, visit func(float64, string) bool) {
	r.keys(r.root, visit, lo, hi)
}
func (r SortedFloat64ToStringMap) keys(h *nodeFloat64ToString, visit func(float64, string) bool, lo, hi float64) bool {
	if h == nil {
		return true
	}
	cmplo := r.compare(lo, h.key)
	cmphi := r.compare(hi, h.key)
	if cmplo < 0 {
		if !r.keys(h.left, visit, lo, hi) {
			return false
		}
	}
	if cmplo <= 0 && cmphi >= 0 {
		if !visit(h.key, h.val) {
			return false
		}
	}
	if cmphi > 0 {
		if !r.keys(h.right, visit, lo, hi) {
			return false
		}
	}
	return true
}
func (r *SortedFloat64ToStringMap) DeleteMin() (oldk float64, oldv string, ok bool) {
	r.root, oldk, oldv, ok = r.deleteMin(r.root)
	if !r.IsEmpty() {
		r.root.colorRed = false
	}
	return
}
func (r *SortedFloat64ToStringMap) deleteMin(h *nodeFloat64ToString) (_ *nodeFloat64ToString, oldk float64, oldv string, ok bool) {
	if h == nil {
		return nil, oldk, oldv, false
	}
	if h.left == nil {
		return nil, h.key, h.val, true
	}
	if !h.left.isRed() && !h.left.left.isRed() {
		h = r.moveRedLeft(h)
	}
	h.left, oldk, oldv, ok = r.deleteMin(h.left)
	return r.balance(h), oldk, oldv, ok
}