()
| 418 | } |
| 419 | |
| 420 | func (ra *roaringArray64) checkKeysSorted() bool { |
| 421 | if len(ra.keys) == 0 || len(ra.keys) == 1 { |
| 422 | return true |
| 423 | } |
| 424 | previous := ra.keys[0] |
| 425 | for nextIdx := 1; nextIdx < len(ra.keys); nextIdx++ { |
| 426 | next := ra.keys[nextIdx] |
| 427 | if previous >= next { |
| 428 | return false |
| 429 | } |
| 430 | previous = next |
| 431 | |
| 432 | } |
| 433 | return true |
| 434 | } |
| 435 | |
| 436 | // validate checks the referential integrity |
| 437 | // ensures len(keys) == len(containers), recurses and checks each container type |
no outgoing calls