Lines Matching refs:toSort

11 toSort(NULL),
46 if(toSort) {
47 delete[] toSort;
64 if(toSort[i]->strengthFromEmpty < strength) {
66 //u_strcpy(UB[strength], toSort[i-1]->name);
68 while(excludeBounds.contains(UnicodeString(toSort[i-j]->name, toSort[i-j]->len))) {
71 UB[strength] = toSort[i-j];
73 strength = toSort[i]->strengthFromEmpty;
75 probe.SE = toSort[i]->name[0];
79 //u_strcpy(UB[strength], toSort[size-1]->name);
93 bound.append(toSort[size-j]->name, toSort[size-j]->len);
104 duplicators->put(UnicodeString(toSort[size-j]->name, toSort[size-j]->len), &toSort[size-j], status);
105 debug->log(toSort[size-j]->toString());
118 while(excludeBounds.contains(UnicodeString(toSort[size-j]->name, toSort[size-j]->len))) {
122 UB[strength] = toSort[size-j];
138 while(i < size) // && probe.distanceFromEmptyString(*toSort[i]) > UCOL_PRIMARY)
140 toSort[i]->strengthFromEmpty = probe.distanceFromEmptyString(*toSort[i]);
141 if(toSort[i]->strengthFromEmpty < strongestStrengthFromEmpty) {
142 strongestStrengthFromEmpty = toSort[i]->strengthFromEmpty;
144 } else if (toSort[i]->strengthFromEmpty > strongestStrengthFromEmpty) {
152 logger->log(toSort[i]->toString(true), true);
155 st = probe.getStrength(*toSort[i-1], *toSort[i]);
158 logger->log(toSort[i]->toString(true), true);
159 } else if(st == UCOL_IDENTICAL || st >= toSort[i-1]->strengthFromEmpty) {
160 prevStrength = toSort[i-1]->strengthFromEmpty;
161 } else if(st < toSort[i-1]->strengthFromEmpty) {
164 toSort[i]->strengthFromEmpty = prevStrength;
167 toSort[i+1]->strengthFromEmpty = probe.distanceFromEmptyString(*toSort[i+1]);
168 st = probe.getStrength(*toSort[i+1], *toSort[i]);
171 logger->log(toSort[i]->toString(true), true);
172 } else if(st == UCOL_IDENTICAL || st < toSort[i+1]->strengthFromEmpty) {
173 nextStrength = toSort[i+1]->strengthFromEmpty;
174 } else if(st >= toSort[i+1]->strengthFromEmpty) {
182 toSort[i]->strengthFromEmpty = nextStrength;
187 if(toSort[j]->strength > problemStrength) {
188 problemStrength = toSort[j]->strength;
192 toSort[j]->strengthFromEmpty = problemStrength;
194 strongestStrengthFromEmpty = toSort[i]->strengthFromEmpty;
325 if(toSortCapacity < size || !toSort) {
326 if(toSort) {
327 delete[] toSort;
329 toSort = new Line*[size*2];
333 setSortingArray(toSort, lines, size);
334 sort(toSort, size, setStrengths, link);
339 first = *toSort;
340 last = *(toSort+size-1);
412 noConts = detectContractions(toSort, size, toSort, size,
433 noConts += detectContractions(toSort, size, deltaPP, deltaPSize,
435 noConts += detectContractions(deltaPP, deltaPSize, toSort, size,
440 setSortingArray(toSort, lines, size);
470 setSortingArray(toSort, lines, size);
826 // and the target (toSort[i] and toSort[j]. First we
840 while(k < size && toSort[k]->strength != UCOL_PRIMARY)
850 //if(expansionLine.lastCC && toSort[k]->firstCC && expansionLine.lastCC > toSort[k]->firstCC) {
856 trial.append(*toSort[k]);
857 if(toSort[k]->name[0] == 0x0067) {
862 expansionLine = *toSort[k];
866 if(exp == *toSort[prevK]) {
873 if(toSort[i]->strength > exp.strength) {
878 trial.append(*toSort[i]);
888 expansionLine.append(*toSort[i-1]);
918 //while(toSort[k]->strength >= strength)
919 for( ; toSort[k]->strength == strength; k++)
921 //if(toSort[k]->strength > strength) {
924 trial.setToConcat(toSort[k], &expLine);
925 if(probe.compare(trial, *toSort[i]) > 0) {
932 prefix = *toSort[resetIndex];
936 suffix.append(*toSort[expIndexes[m]]);
939 //while(toSort[k]->strength >= strength)
940 for( ; toSort[k]->strength == strength; k++)
942 //if(toSort[k]->strength > strength) {
945 trial.setToConcat(&prefix, toSort[k]);
947 if(probe.compare(trial, *toSort[i]) > 0) {
955 prefix.append(*toSort[expIndexes[n]]);
961 while(toSort[k]->strengthFromEmpty > strength) {
964 if(toSort[k]->strengthFromEmpty == strength) {
966 prefix = *toSort[resetIndex];
971 suffix.append(*toSort[expIndexes[m]]);
974 while(toSort[k]->strengthFromEmpty == strength) {
975 trial.setToConcat(&prefix, toSort[k]);
977 lastStr = probe.getStrength(trial, *toSort[i]);
990 if(probe.compare(trial, *toSort[i]) > 0) {
1002 UColAttributeValue str = probe.getStrength(trial, *toSort[i]);
1008 lastStr = probe.getStrength(trial, *toSort[i]);
1013 prefix.append(*toSort[expIndexes[n]]);
1021 expLine.append(*toSort[expIndexes[m]]);
1050 while(toSort[i]->strengthFromEmpty > UCOL_PRIMARY) {
1055 if(toSort[i]->name[0]==0x0063 && toSort[i]->name[1] == 0x68) // && toSort[i]->name[1] == 0x308)0043 0043 0219
1061 strength = toSort[i]->strength;
1062 if(strength == UCOL_IDENTICAL && toSort[i-1]->isExpansion == true) {
1063 u_strcpy(toSort[i]->expansionString, toSort[i-1]->expansionString);
1064 toSort[i]->expLen = toSort[i-1]->expLen;
1065 toSort[i]->isExpansion = true;
1066 toSort[i]->expIndex = toSort[i-1]->expIndex;
1067 toSort[i]->expStrength = UCOL_IDENTICAL;
1068 //toSort[i]->expStrength = toSort[i-1]->expStrength;
1075 while(j && (toSort[j]->isExpansion == true || toSort[j]->isRemoved == true)) {
1076 //if(toSort[j]->strength < strength) {
1077 //strength = toSort[j]->strength;
1082 //while(j && toSort[j]->strength > strength)
1083 while(j && toSort[j]->strength > probe.getStrength(*toSort[j], *toSort[i]))
1087 //if(toSort[j]->strength == strength) {
1088 previous = toSort[j];
1097 trial.setToConcat(previous, UB[probe.getStrength(*toSort[j], *toSort[i])]);
1098 if(probe.compare(trial, *toSort[i]) > 0) {
1114 // and the target (toSort[i] and toSort[j]. First we
1128 while(k < size && toSort[k]->strength != UCOL_PRIMARY) {
1137 //if(expansionLine.lastCC && toSort[k]->firstCC && expansionLine.lastCC > toSort[k]->firstCC) {
1143 trial.append(*toSort[k]);
1144 if(toSort[k]->name[0] == 0x0067) {
1147 if(probe.compare(trial, *toSort[i]) > 0) {
1154 expansionLine.append(*toSort[prevK]);
1176 trial.setToConcat(toSort[j], &expansionLine);
1177 expStrength = probe.getStrength(trial, *toSort[i]);
1181 trial.setToConcat(toSort[j], &expansionLine);
1182 expStrength = probe.getStrength(trial, *toSort[i]);
1190 trial.setToConcat(toSort[j], &expansionLine);
1191 expStrength = probe.getStrength(trial, *toSort[i]);
1200 int32_t diffLen = toSort[i]->len - expansionLine.len;
1202 trial.setTo(UnicodeString(toSort[i]->name + diffLen, toSort[i]->len - diffLen));
1204 trial = *toSort[i];
1211 contractionsTable->remove(UnicodeString(toSort[i]->name, toSort[i]->len));
1212 toSort[i]->isRemoved = true;
1213 if(toSort[i]->next && toSort[i]->previous) {
1214 toSort[i]->previous->next = toSort[i]->next;
1216 if(toSort[i]->previous && toSort[i]->next) {
1217 toSort[i]->next->previous = toSort[i]->previous;
1220 debug->log(toSort[i]->toString(false));
1226 u_strncat(toSort[i]->expansionString, expansionLine.name, expansionLine.len);
1227 toSort[i]->isExpansion = true;
1228 toSort[i]->expStrength = expStrength;
1229 toSort[i]->expLen = expansionLine.len;
1230 toSort[i]->expansionString[toSort[i]->expLen] = 0;
1231 toSort[i]->expIndex = j;
1235 if(toSort[i]->isExpansion == true) {
1238 debug->log(toSort[j]->toString(false));
1239 debug->log(toSort[i]->strengthToString(toSort[i]->expStrength, true));
1240 debug->log(toSort[i]->toString(false));
1242 if(!toSort[j]->sortKey) {
1243 calculateSortKey(*toSort[j]);
1245 debug->log(toSort[j]->dumpSortkey());
1247 if(!toSort[i]->sortKey) {
1248 calculateSortKey(*toSort[i]);
1250 debug->log(toSort[i]->dumpSortkey());
1262 if(toSort[i]->isExpansion) {
1263 if(toSort[i]->name[0] == 0x2A3) {
1267 if(toSort[i]->previous) {
1268 toSort[i]->previous->next = toSort[i]->next;
1272 if(toSort[i]->next) {
1273 toSort[i]->next->previous = toSort[i]->previous;
1276 j = toSort[i]->expIndex;
1277 toSort[i]->next = toSort[j]->next;
1278 toSort[i]->previous = toSort[j];
1279 toSort[j]->next = toSort[i];
1280 if(toSort[i]->next) {
1281 toSort[i]->next->previous = toSort[i];
1283 toSort[i]->strength = toSort[i]->expStrength;
1427 toSort(NULL),
1475 toSort = new Line*[size];
1476 setSortingArray(toSort, lines, size);
1486 Line *previous = toSort[0];
1496 line = toSort[i];
1515 Line *previous = toSort[0];
1533 line = toSort[i];
1561 return arrayToString(toSort, size, false, useLinks, false);
1568 return arrayToString(toSort, size, true, useLinks, printSortKeys);
1623 Line *line = toSort[0];
1634 line = toSort[i];
1684 Line *line = toSort[0];
1695 line = toSort[i];
1747 Line *line = toSort[0];
1758 line = toSort[i];
2040 toSort[i]->swapCase();
2067 calculateSortKey(*toSort[i]);