Home
last modified time | relevance | path

Searched refs:BytesTrie (Results 1 – 25 of 56) sorted by relevance

123

/external/icu/android_icu4j/src/main/java/android/icu/util/
DBytesTrieBuilder.java75 public BytesTrie build(StringTrieBuilder.Option buildOption) { in build()
77 return new BytesTrie(bytes, bytes.length-bytesLength); in build()
139 …protected int getMaxBranchLinearSubNodeLength() /*const*/ { return BytesTrie.kMaxBranchLinearSubNo… in getMaxBranchLinearSubNodeLength()
147 protected int getMinLinearMatch() /*const*/ { return BytesTrie.kMinLinearMatch; } in getMinLinearMatch()
155 protected int getMaxLinearMatchLength() /*const*/ { return BytesTrie.kMaxLinearMatchLength; } in getMaxLinearMatchLength()
220 if(0<=i && i<=BytesTrie.kMaxOneByteValue) { in writeValueAndFinal()
221 return write(((BytesTrie.kMinOneByteValueLead+i)<<1)|(isFinal?1:0)); in writeValueAndFinal()
225 intBytes[0]=(byte)BytesTrie.kFiveByteValueLead; in writeValueAndFinal()
234 if(i<=BytesTrie.kMaxTwoByteValue) { in writeValueAndFinal()
235 intBytes[0]=(byte)(BytesTrie.kMinTwoByteValueLead+(i>>8)); in writeValueAndFinal()
[all …]
DBytesTrie.java30 public final class BytesTrie implements Cloneable, Iterable<BytesTrie.Entry> { class
45 public BytesTrie(byte[] trieBytes, int offset) { in BytesTrie() method in BytesTrie
59 public BytesTrie(BytesTrie other) { in BytesTrie() method in BytesTrie
72 public BytesTrie clone() throws CloneNotSupportedException { in clone()
73 return (BytesTrie) super.clone(); // A shallow copy is just what we need. in clone()
80 public BytesTrie reset() { in reset()
112 public BytesTrie resetToState64(long state) { in resetToState64()
140 public BytesTrie saveState(State state) /*const*/ { in saveState()
159 public BytesTrie resetToState(State state) { in resetToState()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DBytesTrieBuilder.java77 public BytesTrie build(StringTrieBuilder.Option buildOption) { in build()
79 return new BytesTrie(bytes, bytes.length-bytesLength); in build()
143 …protected int getMaxBranchLinearSubNodeLength() /*const*/ { return BytesTrie.kMaxBranchLinearSubNo… in getMaxBranchLinearSubNodeLength()
151 protected int getMinLinearMatch() /*const*/ { return BytesTrie.kMinLinearMatch; } in getMinLinearMatch()
159 protected int getMaxLinearMatchLength() /*const*/ { return BytesTrie.kMaxLinearMatchLength; } in getMaxLinearMatchLength()
224 if(0<=i && i<=BytesTrie.kMaxOneByteValue) { in writeValueAndFinal()
225 return write(((BytesTrie.kMinOneByteValueLead+i)<<1)|(isFinal?1:0)); in writeValueAndFinal()
229 intBytes[0]=(byte)BytesTrie.kFiveByteValueLead; in writeValueAndFinal()
238 if(i<=BytesTrie.kMaxTwoByteValue) { in writeValueAndFinal()
239 intBytes[0]=(byte)(BytesTrie.kMinTwoByteValueLead+(i>>8)); in writeValueAndFinal()
[all …]
DBytesTrie.java29 public final class BytesTrie implements Cloneable, Iterable<BytesTrie.Entry> { class
45 public BytesTrie(byte[] trieBytes, int offset) { in BytesTrie() method in BytesTrie
60 public BytesTrie(BytesTrie other) { in BytesTrie() method in BytesTrie
74 public BytesTrie clone() throws CloneNotSupportedException { in clone()
75 return (BytesTrie) super.clone(); // A shallow copy is just what we need. in clone()
83 public BytesTrie reset() { in reset()
117 public BytesTrie resetToState64(long state) { in resetToState64()
147 public BytesTrie saveState(State state) /*const*/ { in saveState()
167 public BytesTrie resetToState(State state) { in resetToState()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/util/
DBytesTrieTest.java24 import android.icu.util.BytesTrie;
226 public BytesTrie buildMonthsTrie(StringTrieBuilder.Option buildOption) { in buildMonthsTrie()
268 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); in Test40GetUniqueValue()
285 if(trie.next('n')!=BytesTrie.Result.INTERMEDIATE_VALUE || 6!=trie.getValue()) { in Test40GetUniqueValue()
302 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); in Test41GetNextBytes()
349 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); in Test50IteratorFromBranch()
354 BytesTrie.Iterator iter=trie.iterator(); in Test50IteratorFromBranch()
392 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); in Test51IteratorFromLinearMatch()
399 BytesTrie.Iterator iter=trie.iterator(); in Test51IteratorFromLinearMatch()
414 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); in Test52TruncatingIteratorFromRoot()
[all …]
DCharsTrieTest.java24 import android.icu.util.BytesTrie;
248 BytesTrie.Result result; in Test32NextForCodePoint()
249 … if( (result=trie.nextForCodePoint(0x4dff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
250 … (result=trie.nextForCodePoint(0x10000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
251 … (result=trie.nextForCodePoint(0x9999))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
252 … (result=trie.nextForCodePoint(0x20000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
253 … (result=trie.nextForCodePoint(0xdfff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
254 …(result=trie.nextForCodePoint(0x10ffff))!=BytesTrie.Result.FINAL_VALUE || result!=trie.current() || in Test32NextForCodePoint()
259 …if( (result=trie.firstForCodePoint(0x4dff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
260 … (result=trie.nextForCodePoint(0x10000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
[all …]
DTrieMap.java20 import android.icu.util.BytesTrie;
21 import android.icu.util.BytesTrie.Result;
116 private final BytesTrie bytesTrie;
119 private BytesTrieMap(BytesTrie bytesTrie, V[] intToValue, int size) { in BytesTrieMap()
178 BytesTrie.Iterator iterator = bytesTrie.iterator();
196 public BytesTrie.Entry bytesEntry;
327 BytesTrie bytesTrie = builder.build(option); in build()
563 private static void getChars(BytesTrie.Entry entry, StringBuilder stringBuilder) { in getChars()
582 public static String toString(BytesTrie bytesTrie2) { in toString()
586 …public static String toString(BytesTrie bytesTrie2, String keyValueSeparator, String itemSeparator… in toString()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
DBytesTrieTest.java23 import com.ibm.icu.util.BytesTrie;
223 public BytesTrie buildMonthsTrie(StringTrieBuilder.Option buildOption) { in buildMonthsTrie()
265 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); in Test40GetUniqueValue()
282 if(trie.next('n')!=BytesTrie.Result.INTERMEDIATE_VALUE || 6!=trie.getValue()) { in Test40GetUniqueValue()
299 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); in Test41GetNextBytes()
346 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); in Test50IteratorFromBranch()
351 BytesTrie.Iterator iter=trie.iterator(); in Test50IteratorFromBranch()
389 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.SMALL); in Test51IteratorFromLinearMatch()
396 BytesTrie.Iterator iter=trie.iterator(); in Test51IteratorFromLinearMatch()
411 BytesTrie trie=buildMonthsTrie(StringTrieBuilder.Option.FAST); in Test52TruncatingIteratorFromRoot()
[all …]
DCharsTrieTest.java23 import com.ibm.icu.util.BytesTrie;
245 BytesTrie.Result result; in Test32NextForCodePoint()
246 … if( (result=trie.nextForCodePoint(0x4dff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
247 … (result=trie.nextForCodePoint(0x10000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
248 … (result=trie.nextForCodePoint(0x9999))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
249 … (result=trie.nextForCodePoint(0x20000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
250 … (result=trie.nextForCodePoint(0xdfff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
251 …(result=trie.nextForCodePoint(0x10ffff))!=BytesTrie.Result.FINAL_VALUE || result!=trie.current() || in Test32NextForCodePoint()
256 …if( (result=trie.firstForCodePoint(0x4dff))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
257 … (result=trie.nextForCodePoint(0x10000))!=BytesTrie.Result.NO_VALUE || result!=trie.current() || in Test32NextForCodePoint()
[all …]
DTrieMap.java19 import com.ibm.icu.util.BytesTrie;
20 import com.ibm.icu.util.BytesTrie.Result;
115 private final BytesTrie bytesTrie;
118 private BytesTrieMap(BytesTrie bytesTrie, V[] intToValue, int size) { in BytesTrieMap()
177 BytesTrie.Iterator iterator = bytesTrie.iterator();
195 public BytesTrie.Entry bytesEntry;
326 BytesTrie bytesTrie = builder.build(option); in build()
562 private static void getChars(BytesTrie.Entry entry, StringBuilder stringBuilder) { in getChars()
581 public static String toString(BytesTrie bytesTrie2) { in toString()
585 …public static String toString(BytesTrie bytesTrie2, String keyValueSeparator, String itemSeparator… in toString()
[all …]
/external/icu/icu4c/source/test/intltest/
Dbytestrietest.cpp49 BytesTrie *buildMonthsTrie(UStringTrieBuildOption buildOption);
62 BytesTrie *buildTrie(const StringAndValue data[], int32_t dataLength,
64 void checkFirst(BytesTrie &trie, const StringAndValue data[], int32_t dataLength);
65 void checkNext(BytesTrie &trie, const StringAndValue data[], int32_t dataLength);
66 void checkNextWithState(BytesTrie &trie, const StringAndValue data[], int32_t dataLength);
67 void checkNextWithState64(BytesTrie &trie, const StringAndValue data[], int32_t dataLength);
68 void checkNextString(BytesTrie &trie, const StringAndValue data[], int32_t dataLength);
69 void checkIterator(const BytesTrie &trie, const StringAndValue data[], int32_t dataLength);
70 void checkIterator(BytesTrie::Iterator &iter, const StringAndValue data[], int32_t dataLength);
270 BytesTrie *BytesTrieTest::buildMonthsTrie(UStringTrieBuildOption buildOption) { in buildMonthsTrie()
[all …]
/external/icu/icu4c/source/common/unicode/
Dbytestrie.h53 class U_COMMON_API BytesTrie : public UMemory {
69 BytesTrie(const void *trieBytes) in BytesTrie() function
77 ~BytesTrie();
85 BytesTrie(const BytesTrie &other) in BytesTrie() function
94 BytesTrie &reset() { in reset()
128 BytesTrie &resetToState64(uint64_t state) { in resetToState64()
148 friend class BytesTrie;
162 const BytesTrie &saveState(State &state) const { in saveState()
179 BytesTrie &resetToState(const State &state) { in resetToState()
308 Iterator(const BytesTrie &trie, int32_t maxStringLength, UErrorCode &errorCode);
[all …]
Dbytestriebuilder.h92 BytesTrie *build(UStringTrieBuildOption buildOption, UErrorCode &errorCode);
144 …virtual int32_t getMaxBranchLinearSubNodeLength() const { return BytesTrie::kMaxBranchLinearSubNod… in getMaxBranchLinearSubNodeLength()
145 virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatch; } in getMinLinearMatch()
146 virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMaxLinearMatchLength; } in getMaxLinearMatchLength()
/external/icu/icu4c/source/common/
Dbytestrieiterator.cpp25 BytesTrie::Iterator::Iterator(const void *trieBytes, int32_t maxStringLength, in Iterator()
47 BytesTrie::Iterator::Iterator(const BytesTrie &trie, int32_t maxStringLength, in Iterator()
78 BytesTrie::Iterator::~Iterator() { in ~Iterator()
83 BytesTrie::Iterator &
84 BytesTrie::Iterator::reset() { in reset()
99 BytesTrie::Iterator::hasNext() const { return pos_!=NULL || !stack_->isEmpty(); } in hasNext()
102 BytesTrie::Iterator::next(UErrorCode &errorCode) { in next()
172 BytesTrie::Iterator::getString() const { in getString()
177 BytesTrie::Iterator::truncateAndStop() { in truncateAndStop()
185 BytesTrie::Iterator::branchNext(const uint8_t *pos, int32_t length, UErrorCode &errorCode) { in branchNext()
Dbytestrie.cpp26 BytesTrie::~BytesTrie() { in ~BytesTrie()
32 BytesTrie::readValue(const uint8_t *pos, int32_t leadByte) { in readValue()
49 BytesTrie::jumpByDelta(const uint8_t *pos) { in jumpByDelta()
69 BytesTrie::current() const { in current()
81 BytesTrie::branchNext(const uint8_t *pos, int32_t length, int32_t inByte) { in branchNext()
151 BytesTrie::nextImpl(const uint8_t *pos, int32_t inByte) { in nextImpl()
183 BytesTrie::next(int32_t inByte) { in next()
209 BytesTrie::next(const char *s, int32_t sLength) { in next()
316 BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length, in findUniqueValueFromBranch()
353 BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &uniqueValue) { in findUniqueValue()
[all …]
Dbytestriebuilder.cpp192 BytesTrie *
195 BytesTrie *newTrie=NULL; in build()
197 newTrie=new BytesTrie(bytes, bytes+(bytesCapacity-bytesLength)); in build()
429 if(0<=i && i<=BytesTrie::kMaxOneByteValue) { in writeValueAndFinal()
430 return write(((BytesTrie::kMinOneByteValueLead+i)<<1)|isFinal); in writeValueAndFinal()
435 intBytes[0]=(char)BytesTrie::kFiveByteValueLead; in writeValueAndFinal()
444 if(i<=BytesTrie::kMaxTwoByteValue) { in writeValueAndFinal()
445 intBytes[0]=(char)(BytesTrie::kMinTwoByteValueLead+(i>>8)); in writeValueAndFinal()
447 if(i<=BytesTrie::kMaxThreeByteValue) { in writeValueAndFinal()
448 intBytes[0]=(char)(BytesTrie::kMinThreeByteValueLead+(i>>16)); in writeValueAndFinal()
[all …]
Dlocdistance.h60 static int32_t getDesSuppScriptDistance(BytesTrie &iter, uint64_t startState,
64 BytesTrie &iter, uint64_t startState,
68 static int32_t getFallbackRegionDistance(BytesTrie &iter, uint64_t startState);
70 static int32_t trieNext(BytesTrie &iter, const char *s, bool wantValue);
86 BytesTrie trie;
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/locale/
DLocaleDistance.java17 import com.ibm.icu.util.BytesTrie;
51 private final BytesTrie trie;
156 trie = new BytesTrie(data.trie, 0); in LocaleDistance()
204 BytesTrie iter = new BytesTrie(trie); in getBestIndexAndDistance()
303 private static final int getDesSuppScriptDistance(BytesTrie iter, long startState, in getDesSuppScriptDistance()
311 BytesTrie.Result result = iter.resetToState64(startState).next('*'); // <*, *> in getDesSuppScriptDistance()
319 if (result == BytesTrie.Result.FINAL_VALUE) { in getDesSuppScriptDistance()
326 private static final int getRegionPartitionsDistance(BytesTrie iter, long startState, in getRegionPartitionsDistance()
332 BytesTrie.Result result = iter.next(desiredPartitions.charAt(0) | END_OF_SUBTAG); in getRegionPartitionsDistance()
348 BytesTrie.Result result = iter.next(desiredPartitions.charAt(di++) | END_OF_SUBTAG); in getRegionPartitionsDistance()
[all …]
DXLikelySubtags.java17 import com.ibm.icu.util.BytesTrie;
118 private final BytesTrie trie;
128 trie = new BytesTrie(data.trie, 0); in XLikelySubtags()
132 BytesTrie.Result result = trie.next('*'); in XLikelySubtags()
145 if (result == BytesTrie.Result.NO_VALUE) { in XLikelySubtags()
264 BytesTrie iter = new BytesTrie(trie); in maximize()
357 private static final int trieNext(BytesTrie iter, String s, int i) { in trieNext()
358 BytesTrie.Result result; in trieNext()
399 BytesTrie iter = new BytesTrie(trie); in minimizeSubtags()
436 for (BytesTrie.Entry entry : trie) { in getTable()
/external/icu/android_icu4j/src/main/java/android/icu/impl/locale/
DLocaleDistance.java18 import android.icu.util.BytesTrie;
53 private final BytesTrie trie;
161 trie = new BytesTrie(data.trie, 0); in LocaleDistance()
209 BytesTrie iter = new BytesTrie(trie); in getBestIndexAndDistance()
308 private static final int getDesSuppScriptDistance(BytesTrie iter, long startState, in getDesSuppScriptDistance()
316 BytesTrie.Result result = iter.resetToState64(startState).next('*'); // <*, *> in getDesSuppScriptDistance()
324 if (result == BytesTrie.Result.FINAL_VALUE) { in getDesSuppScriptDistance()
331 private static final int getRegionPartitionsDistance(BytesTrie iter, long startState, in getRegionPartitionsDistance()
337 BytesTrie.Result result = iter.next(desiredPartitions.charAt(0) | END_OF_SUBTAG); in getRegionPartitionsDistance()
353 BytesTrie.Result result = iter.next(desiredPartitions.charAt(di++) | END_OF_SUBTAG); in getRegionPartitionsDistance()
[all …]
DXLikelySubtags.java18 import android.icu.util.BytesTrie;
125 private final BytesTrie trie;
135 trie = new BytesTrie(data.trie, 0); in XLikelySubtags()
139 BytesTrie.Result result = trie.next('*'); in XLikelySubtags()
152 if (result == BytesTrie.Result.NO_VALUE) { in XLikelySubtags()
271 BytesTrie iter = new BytesTrie(trie); in maximize()
364 private static final int trieNext(BytesTrie iter, String s, int i) { in trieNext()
365 BytesTrie.Result result; in trieNext()
406 BytesTrie iter = new BytesTrie(trie); in minimizeSubtags()
443 for (BytesTrie.Entry entry : trie) { in getTable()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DBytesDictionaryMatcher.java14 import com.ibm.icu.util.BytesTrie;
15 import com.ibm.icu.util.BytesTrie.Result;
47 BytesTrie bt = new BytesTrie(characters, 0); in matches()
/external/icu/android_icu4j/src/main/java/android/icu/text/
DBytesDictionaryMatcher.java15 import android.icu.util.BytesTrie;
16 import android.icu.util.BytesTrie.Result;
48 BytesTrie bt = new BytesTrie(characters, 0); in matches()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DUPropertyAliases.java22 import com.ibm.icu.util.BytesTrie;
201 private boolean containsName(BytesTrie trie, CharSequence name) { in containsName()
202 BytesTrie.Result result=BytesTrie.Result.NO_VALUE; in containsName()
271 BytesTrie trie=new BytesTrie(bytesTries, bytesTrieOffset); in getPropertyOrValueEnum()
/external/icu/android_icu4j/src/main/java/android/icu/impl/
DUPropertyAliases.java23 import android.icu.util.BytesTrie;
202 private boolean containsName(BytesTrie trie, CharSequence name) { in containsName()
203 BytesTrie.Result result=BytesTrie.Result.NO_VALUE; in containsName()
272 BytesTrie trie=new BytesTrie(bytesTries, bytesTrieOffset); in getPropertyOrValueEnum()

123