MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / checkKeysSorted

Method checkKeysSorted

roaringarray.go:788–802  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

786}
787
788func (ra *roaringArray) checkKeysSorted() bool {
789 if len(ra.keys) == 0 || len(ra.keys) == 1 {
790 return true
791 }
792 previous := ra.keys[0]
793 for nextIdx := 1; nextIdx < len(ra.keys); nextIdx++ {
794 next := ra.keys[nextIdx]
795 if previous >= next {
796 return false
797 }
798 previous = next
799
800 }
801 return true
802}
803
804// validate checks the referential integrity
805// ensures len(keys) == len(containers), recurses and checks each container type

Callers 1

validateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected