/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/units/ |
D | ConversionRates.java | 41 private UnitsConverter.Factor getFactorToBase(SingleUnitImpl singleUnit) { in getFactorToBase() argument 42 int power = singleUnit.getDimensionality(); in getFactorToBase() 43 MeasureUnit.MeasurePrefix unitPrefix = singleUnit.getPrefix(); in getFactorToBase() 44 …r result = UnitsConverter.Factor.processFactor(mapToConversionRate.get(singleUnit.getSimpleUnitID(… in getFactorToBase() 54 for (SingleUnitImpl singleUnit : in getFactorToBase() 56 result = result.multiply(getFactorToBase(singleUnit)); in getFactorToBase() 95 for (SingleUnitImpl singleUnit : in extractBaseUnits() 97 result.addAll(extractBaseUnits(singleUnit)); in extractBaseUnits() 110 public ArrayList<SingleUnitImpl> extractBaseUnits(SingleUnitImpl singleUnit) { in extractBaseUnits() argument 111 String target = mapToConversionRate.get(singleUnit.getSimpleUnitID()).getTarget(); in extractBaseUnits() [all …]
|
D | MeasureUnitImpl.java | 41 public MeasureUnitImpl(SingleUnitImpl singleUnit) { in MeasureUnitImpl() argument 43 this.appendSingleUnit(singleUnit); in MeasureUnitImpl() 88 for (SingleUnitImpl singleUnit : in takeReciprocal() 90 singleUnit.setDimensionality(singleUnit.getDimensionality() * -1); in takeReciprocal() 99 for (SingleUnitImpl singleUnit : in extractIndividualUnitsWithIndices() 101 result.add(new MeasureUnitImplWithIndex(i++, new MeasureUnitImpl(singleUnit))); in extractIndividualUnitsWithIndices() 116 for (SingleUnitImpl singleUnit : in applyDimensionality() 118 singleUnit.setDimensionality(singleUnit.getDimensionality() * dimensionality); in applyDimensionality() 128 public boolean appendSingleUnit(SingleUnitImpl singleUnit) { in appendSingleUnit() argument 131 if (singleUnit == null) { in appendSingleUnit() [all …]
|
D | UnitsConverter.java | 92 for (SingleUnitImpl singleUnit : in insertInMap() 94 if (dimensionMap.containsKey(singleUnit.getSimpleUnitID())) { in insertInMap() 95 …dimensionMap.put(singleUnit.getSimpleUnitID(), dimensionMap.get(singleUnit.getSimpleUnitID()) + si… in insertInMap() 97 … dimensionMap.put(singleUnit.getSimpleUnitID(), singleUnit.getDimensionality() * multiplier); in insertInMap()
|
/third_party/node/deps/icu-small/source/i18n/ |
D | measunit_extra.cpp | 568 SingleUnitImpl singleUnit = nextSingleUnit(sawAnd, status); in parse() local 573 bool added = result.appendSingleUnit(singleUnit, status); in parse() 997 MeasureUnitImpl::MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status) { in MeasureUnitImpl() argument 998 this->appendSingleUnit(singleUnit, status); in MeasureUnitImpl() 1034 const SingleUnitImpl &singleUnit = *this->singleUnits[i]; in copyAndSimplify() local 1040 … if (uprv_strcmp(result.singleUnits[j]->getSimpleUnitID(), singleUnit.getSimpleUnitID()) == in copyAndSimplify() 1042 result.singleUnits[j]->unitPrefix == singleUnit.unitPrefix) { in copyAndSimplify() 1045 result.singleUnits[j]->dimensionality + singleUnit.dimensionality; in copyAndSimplify() 1051 result.appendSingleUnit(singleUnit, status); in copyAndSimplify() 1058 bool MeasureUnitImpl::appendSingleUnit(const SingleUnitImpl &singleUnit, UErrorCode &status) { in appendSingleUnit() argument [all …]
|
D | units_converter.cpp | 224 SingleUnitImpl singleUnit = *source.singleUnits[i]; in loadCompoundFactor() local 226 Factor singleFactor = loadSingleFactor(singleUnit.getSimpleUnitID(), ratesInfo, status); in loadCompoundFactor() 232 singleFactor.applyPrefix(singleUnit.unitPrefix); in loadCompoundFactor() 235 singleFactor.power(singleUnit.dimensionality); in loadCompoundFactor() 263 auto singleUnit = *(unit.singleUnits[0]); in checkSimpleUnit() local 265 if (singleUnit.dimensionality != 1 || singleUnit.unitPrefix != UMEASURE_PREFIX_ONE) { in checkSimpleUnit() 321 UnitIndexAndDimension(const SingleUnitImpl &singleUnit, int32_t multiplier) { in UnitIndexAndDimension() 322 index = singleUnit.index; in UnitIndexAndDimension() 323 dimensionality = singleUnit.dimensionality * multiplier; in UnitIndexAndDimension() 343 auto singleUnit = *shouldBeMerged.singleUnits[unit_i]; in mergeUnitsAndDimensions() local [all …]
|
D | number_longnames.cpp | 849 const SingleUnitImpl *singleUnit = mui.singleUnits[singleUnitIndex]; in calculateGenderForUnit() local 851 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit() 860 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit() 869 …return getGenderForBuiltin(locale, MeasureUnit::forIdentifier(singleUnit->getSimpleUnitID(), statu… in calculateGenderForUnit() 1154 SingleUnitImpl *singleUnit = productUnit.singleUnits[singleUnitIndex]; in processPatternTimes() local 1172 if (!MeasureUnit::findBySubType(singleUnit->getSimpleUnitID(), &simpleUnit)) { in processPatternTimes() 1184 U_ASSERT(singleUnit->dimensionality > 0); in processPatternTimes() 1185 int32_t dimensionality = singleUnit->dimensionality; in processPatternTimes() 1212 singleUnit->dimensionality = 1; in processPatternTimes() 1216 UMeasurePrefix prefix = singleUnit->unitPrefix; in processPatternTimes() [all …]
|
D | measunit_impl.h | 220 MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status); 309 bool appendSingleUnit(const SingleUnitImpl& singleUnit, UErrorCode& status);
|
/third_party/skia/third_party/externals/icu/source/i18n/ |
D | units_converter.cpp | 224 SingleUnitImpl singleUnit = *source.singleUnits[i]; in loadCompoundFactor() local 226 Factor singleFactor = loadSingleFactor(singleUnit.getSimpleUnitID(), ratesInfo, status); in loadCompoundFactor() 232 singleFactor.applyPrefix(singleUnit.unitPrefix); in loadCompoundFactor() 235 singleFactor.power(singleUnit.dimensionality); in loadCompoundFactor() 263 auto singleUnit = *(unit.singleUnits[0]); in checkSimpleUnit() local 265 if (singleUnit.dimensionality != 1 || singleUnit.unitPrefix != UMEASURE_PREFIX_ONE) { in checkSimpleUnit() 321 UnitIndexAndDimension(const SingleUnitImpl &singleUnit, int32_t multiplier) { in UnitIndexAndDimension() 322 index = singleUnit.index; in UnitIndexAndDimension() 323 dimensionality = singleUnit.dimensionality * multiplier; in UnitIndexAndDimension() 343 auto singleUnit = *shouldBeMerged.singleUnits[unit_i]; in mergeUnitsAndDimensions() local [all …]
|
D | measunit_extra.cpp | 572 SingleUnitImpl singleUnit = nextSingleUnit(sawAnd, status); in parse() local 577 bool added = result.appendSingleUnit(singleUnit, status); in parse() 958 MeasureUnitImpl::MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status) { in MeasureUnitImpl() argument 959 this->appendSingleUnit(singleUnit, status); in MeasureUnitImpl() 992 bool MeasureUnitImpl::appendSingleUnit(const SingleUnitImpl &singleUnit, UErrorCode &status) { in appendSingleUnit() argument 995 if (singleUnit.isDimensionless()) { in appendSingleUnit() 1004 if (candidate->isCompatibleWith(singleUnit)) { in appendSingleUnit() 1012 oldUnit->dimensionality += singleUnit.dimensionality; in appendSingleUnit() 1019 this->singleUnits.emplaceBackAndCheckErrorCode(status, singleUnit); in appendSingleUnit() 1133 SingleUnitImpl singleUnit = SingleUnitImpl::forMeasureUnit(*this, status); in withPrefix() local [all …]
|
D | number_longnames.cpp | 871 const SingleUnitImpl *singleUnit = mui.singleUnits[singleUnitIndex]; in calculateGenderForUnit() local 873 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit() 882 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit() 891 …return getGenderForBuiltin(locale, MeasureUnit::forIdentifier(singleUnit->getSimpleUnitID(), statu… in calculateGenderForUnit() 1176 SingleUnitImpl *singleUnit = productUnit.singleUnits[singleUnitIndex]; in processPatternTimes() local 1194 if (!MeasureUnit::findBySubType(singleUnit->getSimpleUnitID(), &simpleUnit)) { in processPatternTimes() 1206 U_ASSERT(singleUnit->dimensionality > 0); in processPatternTimes() 1207 int32_t dimensionality = singleUnit->dimensionality; in processPatternTimes() 1234 singleUnit->dimensionality = 1; in processPatternTimes() 1238 UMeasurePrefix prefix = singleUnit->unitPrefix; in processPatternTimes() [all …]
|
D | measunit_impl.h | 193 MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status); 272 bool appendSingleUnit(const SingleUnitImpl& singleUnit, UErrorCode& status);
|
/third_party/icu/icu4c/source/i18n/ |
D | units_converter.cpp | 224 SingleUnitImpl singleUnit = *source.singleUnits[i]; in loadCompoundFactor() local 226 Factor singleFactor = loadSingleFactor(singleUnit.getSimpleUnitID(), ratesInfo, status); in loadCompoundFactor() 232 singleFactor.applyPrefix(singleUnit.unitPrefix); in loadCompoundFactor() 235 singleFactor.power(singleUnit.dimensionality); in loadCompoundFactor() 263 auto singleUnit = *(unit.singleUnits[0]); in checkSimpleUnit() local 265 if (singleUnit.dimensionality != 1 || singleUnit.unitPrefix != UMEASURE_PREFIX_ONE) { in checkSimpleUnit() 321 UnitIndexAndDimension(const SingleUnitImpl &singleUnit, int32_t multiplier) { in UnitIndexAndDimension() 322 index = singleUnit.index; in UnitIndexAndDimension() 323 dimensionality = singleUnit.dimensionality * multiplier; in UnitIndexAndDimension() 343 auto singleUnit = *shouldBeMerged.singleUnits[unit_i]; in mergeUnitsAndDimensions() local [all …]
|
D | measunit_extra.cpp | 572 SingleUnitImpl singleUnit = nextSingleUnit(sawAnd, status); in parse() local 577 bool added = result.appendSingleUnit(singleUnit, status); in parse() 958 MeasureUnitImpl::MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status) { in MeasureUnitImpl() argument 959 this->appendSingleUnit(singleUnit, status); in MeasureUnitImpl() 992 bool MeasureUnitImpl::appendSingleUnit(const SingleUnitImpl &singleUnit, UErrorCode &status) { in appendSingleUnit() argument 995 if (singleUnit.isDimensionless()) { in appendSingleUnit() 1004 if (candidate->isCompatibleWith(singleUnit)) { in appendSingleUnit() 1012 oldUnit->dimensionality += singleUnit.dimensionality; in appendSingleUnit() 1019 this->singleUnits.emplaceBackAndCheckErrorCode(status, singleUnit); in appendSingleUnit() 1133 SingleUnitImpl singleUnit = SingleUnitImpl::forMeasureUnit(*this, status); in withPrefix() local [all …]
|
D | number_longnames.cpp | 871 const SingleUnitImpl *singleUnit = mui.singleUnits[singleUnitIndex]; in calculateGenderForUnit() local 873 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit() 882 if (std::abs(singleUnit->dimensionality) != 1) { in calculateGenderForUnit() 891 …return getGenderForBuiltin(locale, MeasureUnit::forIdentifier(singleUnit->getSimpleUnitID(), statu… in calculateGenderForUnit() 1176 SingleUnitImpl *singleUnit = productUnit.singleUnits[singleUnitIndex]; in processPatternTimes() local 1194 if (!MeasureUnit::findBySubType(singleUnit->getSimpleUnitID(), &simpleUnit)) { in processPatternTimes() 1206 U_ASSERT(singleUnit->dimensionality > 0); in processPatternTimes() 1207 int32_t dimensionality = singleUnit->dimensionality; in processPatternTimes() 1234 singleUnit->dimensionality = 1; in processPatternTimes() 1238 UMeasurePrefix prefix = singleUnit->unitPrefix; in processPatternTimes() [all …]
|
D | measunit_impl.h | 193 MeasureUnitImpl(const SingleUnitImpl &singleUnit, UErrorCode &status); 272 bool appendSingleUnit(const SingleUnitImpl& singleUnit, UErrorCode& status);
|
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/ |
D | LongNameHandler.java | 700 SingleUnitImpl singleUnit = singleUnits.get(singleUnitIndex); in calculateGenderForUnit() local 702 if (Math.abs(singleUnit.getDimensionality()) != 1) { in calculateGenderForUnit() 711 if (Math.abs(singleUnit.getDimensionality()) != 1) { in calculateGenderForUnit() 720 return getGenderForBuiltin(locale, MeasureUnit.forIdentifier(singleUnit.getSimpleUnitID())); in calculateGenderForUnit() 1017 SingleUnitImpl singleUnit = singleUnits.get(singleUnitIndex); in processPatternTimes() local 1034 simpleUnit = MeasureUnit.findBySubType(singleUnit.getSimpleUnitID()); in processPatternTimes() 1042 singleUnit.getSimpleUnitID()); in processPatternTimes() 1047 assert singleUnit.getDimensionality() > 0; in processPatternTimes() 1048 int dimensionality = singleUnit.getDimensionality(); in processPatternTimes() 1078 singleUnit.setDimensionality(1); in processPatternTimes() [all …]
|
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/util/ |
D | MeasureUnit.java | 485 SingleUnitImpl singleUnit = getSingleUnitImpl(); in withPrefix() local 486 singleUnit.setPrefix(prefix); in withPrefix() 487 return singleUnit.build(); in withPrefix() 533 SingleUnitImpl singleUnit = getSingleUnitImpl(); in withDimensionality() local 534 singleUnit.setDimensionality(dimensionality); in withDimensionality() 535 return singleUnit.build(); in withDimensionality() 585 for (SingleUnitImpl singleUnit : in product() 587 implCopy.appendSingleUnit(singleUnit); in product() 611 for (SingleUnitImpl singleUnit : singleUnits) { in splitToSingleUnits() 612 result.add(singleUnit.build()); in splitToSingleUnits()
|