Home | History | Annotate | Download | only in i18n

Lines Matching refs:minLength

392 CollationWeights::allocWeightsInShortRanges(int32_t n, int32_t minLength) {
393 // See if the first few minLength and minLength+1 ranges have enough weights.
394 for(int32_t i = 0; i < rangeCount && ranges[i].length <= (minLength + 1); ++i) {
396 // Use the first few minLength and minLength+1 ranges.
397 if(ranges[i].length > minLength) {
398 // Reduce the number of weights from the last minLength+1 range
399 // which might sort before some minLength ranges,
400 // so that we use all weights in the minLength ranges.
423 CollationWeights::allocWeightsInMinLengthRanges(int32_t n, int32_t minLength) {
424 // See if the minLength ranges have enough weights
430 ranges[minLengthRangeCount].length == minLength;
435 int32_t nextCountBytes = countBytes(minLength + 1);
438 // Use the minLength ranges. Merge them, and then split again as necessary.
446 // Calculate how to split the range between minLength (count1) and minLength+1 (count2).
454 minLength weights
473 printf("split the range number %ld (out of %ld minLength ranges) by %ld:%ld\n",
478 ranges[0].end = incWeightByOffset(start, minLength, count1 - 1);
481 ranges[1].start = incWeight(ranges[0].end, minLength);
483 ranges[1].length = minLength; // +1 when lengthened
512 int32_t minLength=ranges[0].length;
514 if(allocWeightsInShortRanges(n, minLength)) { break; }
516 if(minLength == 4) {
524 if(allocWeightsInMinLengthRanges(n, minLength)) { break; }
526 /* no good match, lengthen all minLength ranges and iterate */
528 printf("lengthen the short ranges from %ld bytes to %ld and iterate\n", minLength, minLength+1);
530 for(int32_t i=0; ranges[i].length==minLength; ++i) {