FindRevRank Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low.
(hash uint32)
| 802 | |
| 803 | // FindRevRank Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low. |
| 804 | func (sl *SkipList) FindRevRank(hash uint32) int { |
| 805 | if sl.length == 0 { |
| 806 | return 0 |
| 807 | } |
| 808 | |
| 809 | if _, ok := sl.dict[hash]; !ok { |
| 810 | return 0 |
| 811 | } |
| 812 | |
| 813 | return sl.Size() - sl.FindRank(hash) + 1 |
| 814 | } |