()
| 978 | return zSet.max(min, minScore), zSet.min(max, maxScore), nil |
| 979 | } |
| 980 | func (fzs *FZSet) getMinMaxScore() (minScore int, maxScore int) { |
| 981 | if fzs == nil || fzs.skipList == nil || fzs.skipList.head == nil || len(fzs.skipList.head.level) < 1 || fzs.skipList.head.level[0].next == nil || fzs.skipList.tail == nil { |
| 982 | return 0, 0 |
| 983 | } |
| 984 | |
| 985 | if fzs.skipList.head.level[0].next.value == nil || fzs.skipList.tail.value == nil { |
| 986 | return 0, 0 |
| 987 | } |
| 988 | return fzs.skipList.head.level[0].next.value.score, |
| 989 | fzs.skipList.tail.value.score |
| 990 | } |
| 991 | func (fzs *FZSet) min(a, b int) int { |
| 992 | if a < b { |
| 993 | return a |
no outgoing calls