Home
last modified time | relevance | path

Searched refs:LocaleDistance (Results 1 – 24 of 24) sorted by relevance

/third_party/skia/third_party/externals/icu/source/common/
Dlocdistance.cpp47 LocaleDistance *gLocaleDistance = nullptr;
59 void U_CALLCONV LocaleDistance::initLocaleDistance(UErrorCode &errorCode) { in initLocaleDistance()
72 gLocaleDistance = new LocaleDistance(data, likely); in initLocaleDistance()
80 const LocaleDistance *LocaleDistance::getSingleton(UErrorCode &errorCode) { in getSingleton()
82 umtx_initOnce(gInitOnce, &LocaleDistance::initLocaleDistance, errorCode); in getSingleton()
86 LocaleDistance::LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely) : in LocaleDistance() function in LocaleDistance
109 int32_t LocaleDistance::getBestIndexAndDistance( in getBestIndexAndDistance()
258 int32_t LocaleDistance::getDesSuppScriptDistance( in getDesSuppScriptDistance()
281 int32_t LocaleDistance::getRegionPartitionsDistance( in getRegionPartitionsDistance()
355 int32_t LocaleDistance::getFallbackRegionDistance(BytesTrie &iter, uint64_t startState) { in getFallbackRegionDistance()
[all …]
Dlocdistance.h25 class LocaleDistance final : public UMemory {
27 static const LocaleDistance *getSingleton(UErrorCode &errorCode);
86 LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely);
87 LocaleDistance(const LocaleDistance &other) = delete;
88 LocaleDistance &operator=(const LocaleDistance &other) = delete;
Dlocalematcher.cpp360 localeDistance(*LocaleDistance::getSingleton(errorCode)), in LocaleMatcher()
492 LocaleDistance::shiftDistance(100), favorSubtag, direction); in LocaleMatcher()
495 thresholdDistance = LocaleDistance::getDistanceFloor(indexAndDistance) + 1; in LocaleMatcher()
685 for (int32_t bestShiftedDistance = LocaleDistance::shiftDistance(thresholdDistance);;) { in getBestSuppIndex()
702 bestShiftedDistance = LocaleDistance::getShiftedDistance(bestIndexAndDistance); in getBestSuppIndex()
707 bestSupportedLsrIndex = LocaleDistance::getIndex(bestIndexAndDistance); in getBestSuppIndex()
709 if ((bestShiftedDistance -= LocaleDistance::shiftDistance(demotionPerDesiredLocale)) <= 0) { in getBestSuppIndex()
734 LocaleDistance::shiftDistance(thresholdDistance), favorSubtag, direction); in isMatch()
746 LocaleDistance::shiftDistance(thresholdDistance), favorSubtag, direction); in internalMatch()
747 double distance = LocaleDistance::getDistanceDouble(indexAndDistance); in internalMatch()
/third_party/node/deps/icu-small/source/common/
Dlocdistance.cpp47 LocaleDistance *gLocaleDistance = nullptr;
59 void U_CALLCONV LocaleDistance::initLocaleDistance(UErrorCode &errorCode) { in initLocaleDistance()
72 gLocaleDistance = new LocaleDistance(data, likely); in initLocaleDistance()
80 const LocaleDistance *LocaleDistance::getSingleton(UErrorCode &errorCode) { in getSingleton()
82 umtx_initOnce(gInitOnce, &LocaleDistance::initLocaleDistance, errorCode); in getSingleton()
86 LocaleDistance::LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely) : in LocaleDistance() function in LocaleDistance
109 int32_t LocaleDistance::getBestIndexAndDistance( in getBestIndexAndDistance()
258 int32_t LocaleDistance::getDesSuppScriptDistance( in getDesSuppScriptDistance()
281 int32_t LocaleDistance::getRegionPartitionsDistance( in getRegionPartitionsDistance()
355 int32_t LocaleDistance::getFallbackRegionDistance(BytesTrie &iter, uint64_t startState) { in getFallbackRegionDistance()
[all …]
Dlocdistance.h25 class LocaleDistance final : public UMemory {
27 static const LocaleDistance *getSingleton(UErrorCode &errorCode);
86 LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely);
87 LocaleDistance(const LocaleDistance &other) = delete;
88 LocaleDistance &operator=(const LocaleDistance &other) = delete;
Dlocalematcher.cpp342 localeDistance(*LocaleDistance::getSingleton(errorCode)), in LocaleMatcher()
474 LocaleDistance::shiftDistance(100), favorSubtag, direction); in LocaleMatcher()
477 thresholdDistance = LocaleDistance::getDistanceFloor(indexAndDistance) + 1; in LocaleMatcher()
667 for (int32_t bestShiftedDistance = LocaleDistance::shiftDistance(thresholdDistance);;) { in getBestSuppIndex()
684 bestShiftedDistance = LocaleDistance::getShiftedDistance(bestIndexAndDistance); in getBestSuppIndex()
689 bestSupportedLsrIndex = LocaleDistance::getIndex(bestIndexAndDistance); in getBestSuppIndex()
691 if ((bestShiftedDistance -= LocaleDistance::shiftDistance(demotionPerDesiredLocale)) <= 0) { in getBestSuppIndex()
716 LocaleDistance::shiftDistance(thresholdDistance), favorSubtag, direction); in isMatch()
728 LocaleDistance::shiftDistance(thresholdDistance), favorSubtag, direction); in internalMatch()
729 double distance = LocaleDistance::getDistanceDouble(indexAndDistance); in internalMatch()
/third_party/icu/icu4c/source/common/
Dlocdistance.cpp47 LocaleDistance *gLocaleDistance = nullptr;
59 void U_CALLCONV LocaleDistance::initLocaleDistance(UErrorCode &errorCode) { in initLocaleDistance()
72 gLocaleDistance = new LocaleDistance(data, likely); in initLocaleDistance()
80 const LocaleDistance *LocaleDistance::getSingleton(UErrorCode &errorCode) { in getSingleton()
82 umtx_initOnce(gInitOnce, &LocaleDistance::initLocaleDistance, errorCode); in getSingleton()
86 LocaleDistance::LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely) : in LocaleDistance() function in LocaleDistance
109 int32_t LocaleDistance::getBestIndexAndDistance( in getBestIndexAndDistance()
258 int32_t LocaleDistance::getDesSuppScriptDistance( in getDesSuppScriptDistance()
281 int32_t LocaleDistance::getRegionPartitionsDistance( in getRegionPartitionsDistance()
355 int32_t LocaleDistance::getFallbackRegionDistance(BytesTrie &iter, uint64_t startState) { in getFallbackRegionDistance()
[all …]
Dlocdistance.h25 class LocaleDistance final : public UMemory {
27 static const LocaleDistance *getSingleton(UErrorCode &errorCode);
86 LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely);
87 LocaleDistance(const LocaleDistance &other) = delete;
88 LocaleDistance &operator=(const LocaleDistance &other) = delete;
Dlocalematcher.cpp342 localeDistance(*LocaleDistance::getSingleton(errorCode)), in LocaleMatcher()
474 LocaleDistance::shiftDistance(100), favorSubtag, direction); in LocaleMatcher()
477 thresholdDistance = LocaleDistance::getDistanceFloor(indexAndDistance) + 1; in LocaleMatcher()
667 for (int32_t bestShiftedDistance = LocaleDistance::shiftDistance(thresholdDistance);;) { in getBestSuppIndex()
684 bestShiftedDistance = LocaleDistance::getShiftedDistance(bestIndexAndDistance); in getBestSuppIndex()
689 bestSupportedLsrIndex = LocaleDistance::getIndex(bestIndexAndDistance); in getBestSuppIndex()
691 if ((bestShiftedDistance -= LocaleDistance::shiftDistance(demotionPerDesiredLocale)) <= 0) { in getBestSuppIndex()
716 LocaleDistance::shiftDistance(thresholdDistance), favorSubtag, direction); in isMatch()
728 LocaleDistance::shiftDistance(thresholdDistance), favorSubtag, direction); in internalMatch()
729 double distance = LocaleDistance::getDistanceDouble(indexAndDistance); in internalMatch()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DLocaleMatcher.java20 import com.ibm.icu.impl.locale.LocaleDistance;
732 } else if (LocaleDistance.INSTANCE.isParadigmLSR(lsr)) { in LocaleMatcher()
762 LocaleDistance.INSTANCE.getDefaultDemotionPerDesiredLocale(); // null or REGION in LocaleMatcher()
770 int indexAndDistance = LocaleDistance.INSTANCE.getBestIndexAndDistance( in LocaleMatcher()
773 LocaleDistance.shiftDistance(100), favorSubtag, direction); in LocaleMatcher()
775 threshold = LocaleDistance.getDistanceFloor(indexAndDistance) + 1; in LocaleMatcher()
777 threshold = LocaleDistance.INSTANCE.getDefaultScriptDistance(); in LocaleMatcher()
1042 for (int bestShiftedDistance = LocaleDistance.shiftDistance(thresholdDistance);;) { in getBestSuppIndex()
1057 int bestIndexAndDistance = LocaleDistance.INSTANCE.getBestIndexAndDistance( in getBestSuppIndex()
1061 bestShiftedDistance = LocaleDistance.getShiftedDistance(bestIndexAndDistance); in getBestSuppIndex()
[all …]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/util/
DLocaleMatcher.java21 import ohos.global.icu.impl.locale.LocaleDistance;
604 LocaleDistance.INSTANCE.getDefaultScriptDistance() : builder.thresholdDistance; in LocaleMatcher()
656 } else if (LocaleDistance.INSTANCE.isParadigmLSR(lsr)) { in LocaleMatcher()
686 LocaleDistance.INSTANCE.getDefaultDemotionPerDesiredLocale(); // null or REGION in LocaleMatcher()
947 for (int bestShiftedDistance = LocaleDistance.shiftDistance(thresholdDistance);;) { in getBestSuppIndex()
962 int bestIndexAndDistance = LocaleDistance.INSTANCE.getBestIndexAndDistance( in getBestSuppIndex()
966 bestShiftedDistance = LocaleDistance.getShiftedDistance(bestIndexAndDistance); in getBestSuppIndex()
968 bestSupportedLsrIndex = LocaleDistance.getIndex(bestIndexAndDistance); in getBestSuppIndex()
970 if ((bestShiftedDistance -= LocaleDistance.shiftDistance(demotionPerDesiredLocale)) in getBestSuppIndex()
1014 int indexAndDistance = LocaleDistance.INSTANCE.getBestIndexAndDistance( in match()
[all …]
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
DLocaleDistanceTest.java16 import com.ibm.icu.impl.locale.LocaleDistance;
32 private LocaleDistance localeDistance = LocaleDistance.INSTANCE;
53 LocaleDistance.Data built = LocaleDistanceBuilder.build(); in testLoadedDataSameAsBuiltFromScratch()
54 LocaleDistance.Data loaded = LocaleDistance.Data.load(); in testLoadedDataSameAsBuiltFromScratch()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/util/
DLocaleDistanceTest.java17 import ohos.global.icu.impl.locale.LocaleDistance;
35 private LocaleDistance localeDistance = LocaleDistance.INSTANCE;
56 LocaleDistance.Data built = LocaleDistanceBuilder.build(); in testLoadedDataSameAsBuiltFromScratch()
57 LocaleDistance.Data loaded = LocaleDistance.Data.load(); in testLoadedDataSameAsBuiltFromScratch()
/third_party/icu/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/localedistance/
DTrie.java11 import com.ibm.icu.impl.locale.LocaleDistance;
70 … checkArgument(c < LocaleDistance.END_OF_SUBTAG, "invalid trie character: %s", c); in Span()
74 spanBytes[index - 1] |= (byte) LocaleDistance.END_OF_SUBTAG; in Span()
DDistanceTable.java7 import static com.ibm.icu.impl.locale.LocaleDistance.DISTANCE_SKIP_SCRIPT;
8 import static com.ibm.icu.impl.locale.LocaleDistance.IX_DEF_LANG_DISTANCE;
9 import static com.ibm.icu.impl.locale.LocaleDistance.IX_DEF_REGION_DISTANCE;
10 import static com.ibm.icu.impl.locale.LocaleDistance.IX_DEF_SCRIPT_DISTANCE;
11 import static com.ibm.icu.impl.locale.LocaleDistance.IX_LIMIT;
12 import static com.ibm.icu.impl.locale.LocaleDistance.IX_MIN_REGION_DISTANCE;
DLocaleDistanceMapper.java43 import com.ibm.icu.impl.locale.LocaleDistance;
138 LocaleDistance.Data distanceData = buildDistanceData(data); in process()
327 private static LocaleDistance.Data buildDistanceData(CldrData supplementalData) { in buildDistanceData()
393 return new LocaleDistance.Data( in buildDistanceData()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/tool/locale/
DLocaleDistanceBuilder.java29 import ohos.global.icu.impl.locale.LocaleDistance;
157 bytes[length++] = (byte) (c | LocaleDistance.END_OF_SUBTAG); in addSubtag()
361 if (next.nodeDistance == distances[LocaleDistance.IX_DEF_SCRIPT_DISTANCE]) { in prune()
365 nodeDistance |= LocaleDistance.DISTANCE_SKIP_SCRIPT; in prune()
370 if (next.nodeDistance == distances[LocaleDistance.IX_DEF_REGION_DISTANCE]) { in prune()
403 if (nodeDistance >= 0 && (nodeDistance & LocaleDistance.DISTANCE_SKIP_SCRIPT) != 0) { in toTrie()
482 public static LocaleDistance.Data build() { in build()
594 int[] distances = new int[LocaleDistance.IX_LIMIT]; in build()
596 distances[LocaleDistance.IX_DEF_LANG_DISTANCE] = node.nodeDistance; in build()
598 distances[LocaleDistance.IX_DEF_SCRIPT_DISTANCE] = node.nodeDistance; in build()
[all …]
/third_party/icu/icu4j/tools/misc/src/com/ibm/icu/dev/tool/locale/
DLocaleDistanceBuilder.java29 import com.ibm.icu.impl.locale.LocaleDistance;
157 bytes[length++] = (byte) (c | LocaleDistance.END_OF_SUBTAG); in addSubtag()
361 if (next.nodeDistance == distances[LocaleDistance.IX_DEF_SCRIPT_DISTANCE]) { in prune()
365 nodeDistance |= LocaleDistance.DISTANCE_SKIP_SCRIPT; in prune()
370 if (next.nodeDistance == distances[LocaleDistance.IX_DEF_REGION_DISTANCE]) { in prune()
403 if (nodeDistance >= 0 && (nodeDistance & LocaleDistance.DISTANCE_SKIP_SCRIPT) != 0) { in toTrie()
482 public static LocaleDistance.Data build() { in build()
594 int[] distances = new int[LocaleDistance.IX_LIMIT]; in build()
596 distances[LocaleDistance.IX_DEF_LANG_DISTANCE] = node.nodeDistance; in build()
598 distances[LocaleDistance.IX_DEF_SCRIPT_DISTANCE] = node.nodeDistance; in build()
[all …]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/locale/
DLocaleDistance.java28 public class LocaleDistance { class
199 public static final LocaleDistance INSTANCE = new LocaleDistance(Data.load());
201 private LocaleDistance(Data data) { in LocaleDistance() method in LocaleDistance
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/locale/
DLocaleDistance.java26 public class LocaleDistance { class
194 public static final LocaleDistance INSTANCE = new LocaleDistance(Data.load());
196 private LocaleDistance(Data data) { in LocaleDistance() method in LocaleDistance
/third_party/node/deps/icu-small/source/common/unicode/
Dlocalematcher.h136 class LocaleDistance; variable
684 const LocaleDistance &localeDistance;
/third_party/icu/icu4c/source/common/unicode/
Dlocalematcher.h136 class LocaleDistance; variable
684 const LocaleDistance &localeDistance;
/third_party/skia/third_party/externals/icu/source/common/unicode/
Dlocalematcher.h136 class LocaleDistance; variable
690 const LocaleDistance &localeDistance;
/third_party/icu/ohos_icu4j/
DBUILD.gn132 "src/main/java/ohos/global/icu/impl/locale/LocaleDistance.java",