Home
last modified time | relevance | path

Searched refs:micros (Results 1 – 25 of 106) sorted by relevance

12345

/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/number/
DNumberFormatterImpl.java47 micros = new MicroProps(true); in NumberFormatterImpl()
48 microPropsGenerator = macrosToMicroGenerator(macros, micros, true); in NumberFormatterImpl()
58 MicroProps micros = preProcessUnsafe(macros, inValue); in formatStatic() local
59 int length = writeNumber(micros, inValue, outString, 0); in formatStatic()
60 length += writeAffixes(micros, outString, 0, length); in formatStatic()
75 MicroProps micros = new MicroProps(false); in getPrefixSuffixStatic() local
76 MicroPropsGenerator microPropsGenerator = macrosToMicroGenerator(macros, micros, false); in getPrefixSuffixStatic()
82 final MicroProps micros; field in NumberFormatterImpl
89 MicroProps micros = preProcess(inValue); in format() local
90 int length = writeNumber(micros, inValue, outString, 0); in format()
[all …]
DScientificNotation.java156 MicroProps micros = parent.processQuantity(quantity); in processQuantity() local
157 assert micros.rounder != null; in processQuantity()
161 micros.modInner = ConstantAffixModifier.EMPTY; in processQuantity()
162 return micros; in processQuantity()
168 if (notation.requireMinInt && micros.rounder instanceof SignificantRounderImpl) { in processQuantity()
170 ((SignificantRounderImpl) micros.rounder).apply(quantity, in processQuantity()
174 micros.rounder.apply(quantity); in processQuantity()
178 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, this); in processQuantity()
184 micros.modInner = precomputedMods[exponent + 12]; in processQuantity()
187 micros.modInner = new ScientificModifier(exponent, this); in processQuantity()
[all …]
DCompactNotation.java127 MicroProps micros = parent.processQuantity(quantity); in processQuantity() local
128 assert micros.rounder != null; in processQuantity()
135 micros.rounder.apply(quantity); in processQuantity()
137 multiplier = micros.rounder.chooseMultiplierAndApply(quantity, data); in processQuantity()
151 mod.applyToMicros(micros, quantity); in processQuantity()
158 micros.modMiddle = unsafePatternModifier; in processQuantity()
167 micros.rounder = null; in processQuantity()
169 return micros; in processQuantity()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/number/
DNumberFormatterImpl.java54 micros = new MicroProps(true); in NumberFormatterImpl()
55 microPropsGenerator = macrosToMicroGenerator(macros, micros, true); in NumberFormatterImpl()
82 MicroProps micros = new MicroProps(false); in getPrefixSuffixStatic() local
83 MicroPropsGenerator microPropsGenerator = macrosToMicroGenerator(macros, micros, false); in getPrefixSuffixStatic()
89 final MicroProps micros; field in NumberFormatterImpl
106 MicroProps micros = microPropsGenerator.processQuantity(inValue); in preProcess() local
107 if (micros.integerWidth.maxInt == -1) { in preProcess()
108 inValue.setMinInteger(micros.integerWidth.minInt); in preProcess()
110 inValue.setMinInteger(micros.integerWidth.minInt); in preProcess()
111 inValue.applyMaxInteger(micros.integerWidth.maxInt); in preProcess()
[all …]
DScientificNotation.java157 MicroProps micros = parent.processQuantity(quantity); in processQuantity() local
158 assert micros.rounder != null; in processQuantity()
162 micros.modInner = ConstantAffixModifier.EMPTY; in processQuantity()
163 return micros; in processQuantity()
169 if (notation.requireMinInt && micros.rounder instanceof SignificantRounderImpl) { in processQuantity()
171 ((SignificantRounderImpl) micros.rounder).apply(quantity, in processQuantity()
175 micros.rounder.apply(quantity); in processQuantity()
179 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, this); in processQuantity()
185 micros.modInner = precomputedMods[exponent + 12]; in processQuantity()
188 micros.modInner = new ScientificModifier(exponent, this); in processQuantity()
[all …]
DCompactNotation.java125 MicroProps micros = parent.processQuantity(quantity); in processQuantity() local
126 assert micros.rounder != null; in processQuantity()
133 micros.rounder.apply(quantity); in processQuantity()
135 multiplier = micros.rounder.chooseMultiplierAndApply(quantity, data); in processQuantity()
148 mod.applyToMicros(micros, quantity); in processQuantity()
155 micros.modMiddle = unsafePatternModifier; in processQuantity()
164 micros.rounder = null; in processQuantity()
166 return micros; in processQuantity()
/third_party/icu/icu4c/source/i18n/
Dnumber_usageprefs.cpp112 MicroProps *micros, UErrorCode status) { in mixedMeasuresToMicros() argument
113 micros->mixedMeasuresCount = measures.length(); in mixedMeasuresToMicros()
115 if (micros->mixedMeasures.getCapacity() < micros->mixedMeasuresCount) { in mixedMeasuresToMicros()
116 if (micros->mixedMeasures.resize(micros->mixedMeasuresCount) == nullptr) { in mixedMeasuresToMicros()
122 for (int32_t i = 0; i < micros->mixedMeasuresCount; i++) { in mixedMeasuresToMicros()
125 micros->mixedMeasures[i] = measures[i]->getNumber().getInt64(); in mixedMeasuresToMicros()
129 U_ASSERT(micros->indexOfQuantity < 0); in mixedMeasuresToMicros()
131 micros->indexOfQuantity = i; in mixedMeasuresToMicros()
145 if (micros->indexOfQuantity < 0) { in mixedMeasuresToMicros()
160 void UsagePrefsHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
[all …]
Dnumber_formatimpl.cpp37 MicroProps& micros = impl.preProcessUnsafe(inValue, status); in formatStatic() local
39 int32_t length = writeNumber(micros, inValue, outString, 0, status); in formatStatic()
40 length += writeAffixes(micros, outString, 0, length, status); in formatStatic()
41 results->outputUnit = std::move(micros.outputUnit); in formatStatic()
42 results->gender = micros.gender; in formatStatic()
61 MicroProps micros; in format() local
62 preProcess(inValue, micros, status); in format()
64 int32_t length = writeNumber(micros, inValue, outString, 0, status); in format()
65 length += writeAffixes(micros, outString, 0, length, status); in format()
66 results->outputUnit = std::move(micros.outputUnit); in format()
[all …]
Dnumber_scientific.cpp121 void ScientificHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
123 fParent->processQuantity(quantity, micros, status); in processQuantity()
128 micros.modInner = &micros.helpers.emptyStrongModifier; in processQuantity()
135 if (fSettings.fRequireMinInt && micros.rounder.isSignificantDigits()) { in processQuantity()
137 micros.rounder.apply(quantity, fSettings.fEngineeringInterval, status); in processQuantity()
140 micros.rounder.apply(quantity, status); in processQuantity()
144 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, *this, status); in processQuantity()
148 ScientificModifier &mod = micros.helpers.scientificModifier; in processQuantity()
150 micros.modInner = &mod; in processQuantity()
158 micros.rounder = RoundingImpl::passThrough(); in processQuantity()
Dnumber_patternmodifier.cpp126 void ImmutablePatternModifier::processQuantity(DecimalQuantity& quantity, MicroProps& micros, in processQuantity() argument
128 parent->processQuantity(quantity, micros, status); in processQuantity()
129 micros.rounder.apply(quantity, status); in processQuantity()
130 if (micros.modMiddle != nullptr) { in processQuantity()
133 applyToMicros(micros, quantity, status); in processQuantity()
137 MicroProps& micros, const DecimalQuantity& quantity, UErrorCode& status) const { in applyToMicros() argument
139 micros.modMiddle = pm->getModifierWithoutPlural(quantity.signum()); in applyToMicros()
141 … StandardPlural::Form pluralForm = utils::getPluralSafe(micros.rounder, rules, quantity, status); in applyToMicros()
142 micros.modMiddle = pm->getModifier(quantity.signum(), pluralForm); in applyToMicros()
165 void MutablePatternModifier::processQuantity(DecimalQuantity& fq, MicroProps& micros, in processQuantity() argument
[all …]
/third_party/skia/third_party/externals/icu/source/i18n/
Dnumber_usageprefs.cpp112 MicroProps *micros, UErrorCode status) { in mixedMeasuresToMicros() argument
113 micros->mixedMeasuresCount = measures.length(); in mixedMeasuresToMicros()
115 if (micros->mixedMeasures.getCapacity() < micros->mixedMeasuresCount) { in mixedMeasuresToMicros()
116 if (micros->mixedMeasures.resize(micros->mixedMeasuresCount) == nullptr) { in mixedMeasuresToMicros()
122 for (int32_t i = 0; i < micros->mixedMeasuresCount; i++) { in mixedMeasuresToMicros()
125 micros->mixedMeasures[i] = measures[i]->getNumber().getInt64(); in mixedMeasuresToMicros()
129 U_ASSERT(micros->indexOfQuantity < 0); in mixedMeasuresToMicros()
131 micros->indexOfQuantity = i; in mixedMeasuresToMicros()
145 if (micros->indexOfQuantity < 0) { in mixedMeasuresToMicros()
160 void UsagePrefsHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
[all …]
Dnumber_formatimpl.cpp37 MicroProps& micros = impl.preProcessUnsafe(inValue, status); in formatStatic() local
39 int32_t length = writeNumber(micros, inValue, outString, 0, status); in formatStatic()
40 length += writeAffixes(micros, outString, 0, length, status); in formatStatic()
41 results->outputUnit = std::move(micros.outputUnit); in formatStatic()
42 results->gender = micros.gender; in formatStatic()
61 MicroProps micros; in format() local
62 preProcess(inValue, micros, status); in format()
64 int32_t length = writeNumber(micros, inValue, outString, 0, status); in format()
65 length += writeAffixes(micros, outString, 0, length, status); in format()
66 results->outputUnit = std::move(micros.outputUnit); in format()
[all …]
Dnumber_scientific.cpp121 void ScientificHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
123 fParent->processQuantity(quantity, micros, status); in processQuantity()
128 micros.modInner = &micros.helpers.emptyStrongModifier; in processQuantity()
135 if (fSettings.fRequireMinInt && micros.rounder.isSignificantDigits()) { in processQuantity()
137 micros.rounder.apply(quantity, fSettings.fEngineeringInterval, status); in processQuantity()
140 micros.rounder.apply(quantity, status); in processQuantity()
144 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, *this, status); in processQuantity()
148 ScientificModifier &mod = micros.helpers.scientificModifier; in processQuantity()
150 micros.modInner = &mod; in processQuantity()
158 micros.rounder = RoundingImpl::passThrough(); in processQuantity()
Dnumber_patternmodifier.cpp126 void ImmutablePatternModifier::processQuantity(DecimalQuantity& quantity, MicroProps& micros, in processQuantity() argument
128 parent->processQuantity(quantity, micros, status); in processQuantity()
129 micros.rounder.apply(quantity, status); in processQuantity()
130 if (micros.modMiddle != nullptr) { in processQuantity()
133 applyToMicros(micros, quantity, status); in processQuantity()
137 MicroProps& micros, const DecimalQuantity& quantity, UErrorCode& status) const { in applyToMicros() argument
139 micros.modMiddle = pm->getModifierWithoutPlural(quantity.signum()); in applyToMicros()
141 … StandardPlural::Form pluralForm = utils::getPluralSafe(micros.rounder, rules, quantity, status); in applyToMicros()
142 micros.modMiddle = pm->getModifier(quantity.signum(), pluralForm); in applyToMicros()
165 void MutablePatternModifier::processQuantity(DecimalQuantity& fq, MicroProps& micros, in processQuantity() argument
[all …]
/third_party/node/deps/icu-small/source/i18n/
Dnumber_usageprefs.cpp112 MicroProps *micros, UErrorCode status) { in mixedMeasuresToMicros() argument
113 micros->mixedMeasuresCount = measures.length(); in mixedMeasuresToMicros()
115 if (micros->mixedMeasures.getCapacity() < micros->mixedMeasuresCount) { in mixedMeasuresToMicros()
116 if (micros->mixedMeasures.resize(micros->mixedMeasuresCount) == nullptr) { in mixedMeasuresToMicros()
122 for (int32_t i = 0; i < micros->mixedMeasuresCount; i++) { in mixedMeasuresToMicros()
125 micros->mixedMeasures[i] = measures[i]->getNumber().getInt64(); in mixedMeasuresToMicros()
129 U_ASSERT(micros->indexOfQuantity < 0); in mixedMeasuresToMicros()
131 micros->indexOfQuantity = i; in mixedMeasuresToMicros()
145 if (micros->indexOfQuantity < 0) { in mixedMeasuresToMicros()
160 void UsagePrefsHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
[all …]
Dnumber_formatimpl.cpp37 MicroProps& micros = impl.preProcessUnsafe(inValue, status); in formatStatic() local
39 int32_t length = writeNumber(micros, inValue, outString, 0, status); in formatStatic()
40 length += writeAffixes(micros, outString, 0, length, status); in formatStatic()
41 results->outputUnit = std::move(micros.outputUnit); in formatStatic()
42 results->gender = micros.gender; in formatStatic()
61 MicroProps micros; in format() local
62 preProcess(inValue, micros, status); in format()
64 int32_t length = writeNumber(micros, inValue, outString, 0, status); in format()
65 length += writeAffixes(micros, outString, 0, length, status); in format()
66 results->outputUnit = std::move(micros.outputUnit); in format()
[all …]
Dnumber_scientific.cpp121 void ScientificHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
123 fParent->processQuantity(quantity, micros, status); in processQuantity()
128 micros.modInner = &micros.helpers.emptyStrongModifier; in processQuantity()
135 if (fSettings.fRequireMinInt && micros.rounder.isSignificantDigits()) { in processQuantity()
137 micros.rounder.apply(quantity, fSettings.fEngineeringInterval, status); in processQuantity()
140 micros.rounder.apply(quantity, status); in processQuantity()
144 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, *this, status); in processQuantity()
148 ScientificModifier &mod = micros.helpers.scientificModifier; in processQuantity()
150 micros.modInner = &mod; in processQuantity()
158 micros.rounder = RoundingImpl::passThrough(); in processQuantity()
Dnumber_patternmodifier.cpp130 void ImmutablePatternModifier::processQuantity(DecimalQuantity& quantity, MicroProps& micros, in processQuantity() argument
132 parent->processQuantity(quantity, micros, status); in processQuantity()
133 micros.rounder.apply(quantity, status); in processQuantity()
134 if (micros.modMiddle != nullptr) { in processQuantity()
137 applyToMicros(micros, quantity, status); in processQuantity()
141 MicroProps& micros, const DecimalQuantity& quantity, UErrorCode& status) const { in applyToMicros() argument
143 micros.modMiddle = pm->getModifierWithoutPlural(quantity.signum()); in applyToMicros()
145 … StandardPlural::Form pluralForm = utils::getPluralSafe(micros.rounder, rules, quantity, status); in applyToMicros()
146 micros.modMiddle = pm->getModifier(quantity.signum(), pluralForm); in applyToMicros()
169 void MutablePatternModifier::processQuantity(DecimalQuantity& fq, MicroProps& micros, in processQuantity() argument
[all …]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DMixedUnitLongNameHandler.java117 MicroProps micros; in processQuantity() local
118 micros = parent.processQuantity(quantity); in processQuantity()
119 micros.modOuter = getMixedUnitModifier(quantity, micros); in processQuantity()
120 return micros; in processQuantity()
131 public MicroProps processQuantityWithMicros(DecimalQuantity quantity, MicroProps micros) { in processQuantityWithMicros() argument
133 micros.modOuter = getMixedUnitModifier(quantity, micros); in processQuantityWithMicros()
134 return micros; in processQuantityWithMicros()
157 private Modifier getMixedUnitModifier(DecimalQuantity quantity, MicroProps micros) { in getMixedUnitModifier() argument
160 if (micros.mixedMeasures.size() == 0) { in getMixedUnitModifier()
186 for (int i = 0; i < micros.mixedMeasures.size(); i++) { in getMixedUnitModifier()
[all …]
DMutablePatternModifier.java233 MicroProps micros = parent.processQuantity(quantity); in processQuantity() local
234 if (micros.rounder != null) { in processQuantity()
235 micros.rounder.apply(quantity); in processQuantity()
237 if (micros.modMiddle != null) { in processQuantity()
238 return micros; in processQuantity()
240 applyToMicros(micros, quantity); in processQuantity()
241 return micros; in processQuantity()
244 public void applyToMicros(MicroProps micros, DecimalQuantity quantity) { in applyToMicros() argument
246 micros.modMiddle = pm.getModifierWithoutPlural(quantity.signum()); in applyToMicros()
248 … StandardPlural pluralForm = RoundingUtils.getPluralSafe(micros.rounder, rules, quantity); in applyToMicros()
[all …]
DUsagePrefsHandler.java58 MicroProps micros = this.fParent.processQuantity(quantity); in processQuantity() local
61 final UnitsRouter.RouteResult routed = fUnitsRouter.route(quantity.toBigDecimal(), micros); in processQuantity()
62 micros.outputUnit = routed.outputUnit.build(); in processQuantity()
63 UsagePrefsHandler.mixedMeasuresToMicros(routed.complexConverterResult, quantity, micros); in processQuantity()
64 return micros; in processQuantity()
/third_party/flutter/skia/third_party/externals/icu/source/i18n/
Dnumber_formatimpl.cpp77 MicroProps& micros = impl.preProcessUnsafe(inValue, status); in formatStatic() local
79 int32_t length = writeNumber(micros, inValue, outString, 0, status); in formatStatic()
80 length += writeAffixes(micros, outString, 0, length, status); in formatStatic()
98 MicroProps micros; in format() local
99 preProcess(inValue, micros, status); in format()
101 int32_t length = writeNumber(micros, inValue, outString, 0, status); in format()
102 length += writeAffixes(micros, outString, 0, length, status); in format()
427 int32_t NumberFormatterImpl::writeAffixes(const MicroProps& micros, NumberStringBuilder& string, in writeAffixes() argument
430 int32_t length = micros.modInner->apply(string, start, end, status); in writeAffixes()
431 if (micros.padding.isValid()) { in writeAffixes()
[all …]
Dnumber_scientific.cpp122 void ScientificHandler::processQuantity(DecimalQuantity &quantity, MicroProps &micros, in processQuantity() argument
124 fParent->processQuantity(quantity, micros, status); in processQuantity()
130 if (fSettings.fRequireMinInt && micros.rounder.isSignificantDigits()) { in processQuantity()
132 micros.rounder.apply(quantity, fSettings.fEngineeringInterval, status); in processQuantity()
135 micros.rounder.apply(quantity, status); in processQuantity()
139 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, *this, status); in processQuantity()
143 ScientificModifier &mod = micros.helpers.scientificModifier; in processQuantity()
145 micros.modInner = &mod; in processQuantity()
148 micros.rounder = RoundingImpl::passThrough(); in processQuantity()
Dnumber_patternmodifier.cpp126 void ImmutablePatternModifier::processQuantity(DecimalQuantity& quantity, MicroProps& micros, in processQuantity() argument
128 parent->processQuantity(quantity, micros, status); in processQuantity()
129 applyToMicros(micros, quantity); in processQuantity()
132 void ImmutablePatternModifier::applyToMicros(MicroProps& micros, DecimalQuantity& quantity) const { in applyToMicros() argument
134 micros.modMiddle = pm->getModifierWithoutPlural(quantity.signum()); in applyToMicros()
140 micros.modMiddle = pm->getModifier(quantity.signum(), plural); in applyToMicros()
159 void MutablePatternModifier::processQuantity(DecimalQuantity& fq, MicroProps& micros, in processQuantity() argument
161 fParent->processQuantity(fq, micros, status); in processQuantity()
168 micros.rounder.apply(copy, status); in processQuantity()
173 micros.modMiddle = this; in processQuantity()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/
DMutablePatternModifier.java238 MicroProps micros = parent.processQuantity(quantity); in processQuantity() local
239 if (micros.rounder != null) { in processQuantity()
240 micros.rounder.apply(quantity); in processQuantity()
242 if (micros.modMiddle != null) { in processQuantity()
243 return micros; in processQuantity()
245 applyToMicros(micros, quantity); in processQuantity()
246 return micros; in processQuantity()
249 public void applyToMicros(MicroProps micros, DecimalQuantity quantity) { in applyToMicros() argument
251 micros.modMiddle = pm.getModifierWithoutPlural(quantity.signum()); in applyToMicros()
253 … StandardPlural pluralForm = RoundingUtils.getPluralSafe(micros.rounder, rules, quantity); in applyToMicros()
[all …]

12345