Home | History | Annotate | Download | only in common

Lines Matching refs:unitIndex

83 // have a common prefix of length unitIndex.
85 StringTrieBuilder::writeNode(int32_t start, int32_t limit, int32_t unitIndex) {
89 if(unitIndex==getElementStringLength(start)) {
97 // Now all [start..limit[ strings are longer than unitIndex.
98 int32_t minUnit=getElementUnit(start, unitIndex);
99 int32_t maxUnit=getElementUnit(limit-1, unitIndex);
101 // Linear-match node: All strings have the same character at unitIndex.
102 int32_t lastUnitIndex=getLimitOfLinearMatch(start, limit-1, unitIndex);
105 int32_t length=lastUnitIndex-unitIndex;
113 writeElementUnits(start, unitIndex, length);
117 int32_t length=countElementUnits(start, limit, unitIndex);
119 writeBranchSubNode(start, limit, unitIndex, length);
130 // start<limit && all strings longer than unitIndex &&
131 // length different units at unitIndex
133 StringTrieBuilder::writeBranchSubNode(int32_t start, int32_t limit, int32_t unitIndex, int32_t length) {
140 int32_t i=skipElementsBySomeUnits(start, unitIndex, length/2);
142 middleUnits[ltLength]=getElementUnit(i, unitIndex); // middle unit
143 lessThan[ltLength]=writeBranchSubNode(start, i, unitIndex, length/2);
155 UChar unit=getElementUnit(i++, unitIndex);
156 i=indexOfElementWithNextUnit(i, unitIndex, unit);
157 isFinal[unitNumber]= start==i-1 && unitIndex+1==getElementStringLength(start);
171 jumpTargets[unitNumber]=writeNode(starts[unitNumber], starts[unitNumber+1], unitIndex+1);
177 writeNode(start, limit, unitIndex+1);
178 int32_t offset=write(getElementUnit(start, unitIndex));
191 offset=write(getElementUnit(start, unitIndex));
204 // have a common prefix of length unitIndex.
206 StringTrieBuilder::makeNode(int32_t start, int32_t limit, int32_t unitIndex, UErrorCode &errorCode) {
212 if(unitIndex==getElementStringLength(start)) {
221 // Now all [start..limit[ strings are longer than unitIndex.
222 int32_t minUnit=getElementUnit(start, unitIndex);
223 int32_t maxUnit=getElementUnit(limit-1, unitIndex);
225 // Linear-match node: All strings have the same character at unitIndex.
226 int32_t lastUnitIndex=getLimitOfLinearMatch(start, limit-1, unitIndex);
229 int32_t length=lastUnitIndex-unitIndex;
237 node=createLinearMatchNode(start, unitIndex, length, nextNode);
240 int32_t length=countElementUnits(start, limit, unitIndex);
242 Node *subNode=makeBranchSubNode(start, limit, unitIndex, length, errorCode);
255 // start<limit && all strings longer than unitIndex &&
256 // length different units at unitIndex
258 StringTrieBuilder::makeBranchSubNode(int32_t start, int32_t limit, int32_t unitIndex,
269 int32_t i=skipElementsBySomeUnits(start, unitIndex, length/2);
271 middleUnits[ltLength]=getElementUnit(i, unitIndex); // middle unit
272 lessThan[ltLength]=makeBranchSubNode(start, i, unitIndex, length/2, errorCode);
290 UChar unit=getElementUnit(i++, unitIndex);
291 i=indexOfElementWithNextUnit(i, unitIndex, unit);
292 if(start==i-1 && unitIndex+1==getElementStringLength(start)) {
295 listNode->add(unit, makeNode(start, i, unitIndex+1, errorCode));
300 UChar unit=getElementUnit(start, unitIndex);
301 if(start==limit-1 && unitIndex+1==getElementStringLength(start)) {
304 listNode->add(unit, makeNode(start, limit, unitIndex+1, errorCode));