Home
last modified time | relevance | path

Searched refs:FixedDecimal (Results 1 – 25 of 41) sorted by relevance

12

/external/icu/android_icu4j/src/main/java/android/icu/text/
DPluralSamples.java24 import android.icu.text.PluralRules.FixedDecimal;
48 private final Map<String, Set<FixedDecimal>> _keyFractionSamplesMap;
49 private final Set<FixedDecimal> _fractionSamples;
85 Map<String, Set<FixedDecimal>> sampleFractionMap = new HashMap<String, Set<FixedDecimal>>(); in PluralSamples()
86 Set<FixedDecimal> mentioned = new TreeSet<FixedDecimal>(); in PluralSamples()
88 Map<String, Set<FixedDecimal>> foundKeywords = new HashMap<String, Set<FixedDecimal>>(); in PluralSamples()
89 for (FixedDecimal s : mentioned) { in PluralSamples()
106 mentioned.add(new FixedDecimal(0)); // always there in PluralSamples()
107 mentioned.add(new FixedDecimal(1)); // always there in PluralSamples()
108 mentioned.add(new FixedDecimal(2)); // always there in PluralSamples()
[all …]
DPluralRules.java549 …public static class FixedDecimal extends Number implements Comparable<FixedDecimal>, IFixedDecimal… class in PluralRules
698 public FixedDecimal(double n, int v, long f, int e) { in FixedDecimal() method in PluralRules.FixedDecimal
743 public FixedDecimal(double n, int v, long f) { in FixedDecimal() method in PluralRules.FixedDecimal
752 public static FixedDecimal createWithExponent(double n, int v, int e) { in createWithExponent()
753 return new FixedDecimal(n,v,getFractionalDigits(n, v), e); in createWithExponent()
762 public FixedDecimal(double n, int v) { in FixedDecimal() method in PluralRules.FixedDecimal
785 public FixedDecimal(double n) { in FixedDecimal() method in PluralRules.FixedDecimal
795 public FixedDecimal(long n) { in FixedDecimal() method in PluralRules.FixedDecimal
857 private FixedDecimal (FixedDecimal other) { in FixedDecimal() method in PluralRules.FixedDecimal
881 public FixedDecimal (String n) { in FixedDecimal() method in PluralRules.FixedDecimal
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DPluralSamples.java23 import com.ibm.icu.text.PluralRules.FixedDecimal;
46 private final Map<String, Set<FixedDecimal>> _keyFractionSamplesMap;
47 private final Set<FixedDecimal> _fractionSamples;
83 Map<String, Set<FixedDecimal>> sampleFractionMap = new HashMap<String, Set<FixedDecimal>>(); in PluralSamples()
84 Set<FixedDecimal> mentioned = new TreeSet<FixedDecimal>(); in PluralSamples()
86 Map<String, Set<FixedDecimal>> foundKeywords = new HashMap<String, Set<FixedDecimal>>(); in PluralSamples()
87 for (FixedDecimal s : mentioned) { in PluralSamples()
104 mentioned.add(new FixedDecimal(0)); // always there in PluralSamples()
105 mentioned.add(new FixedDecimal(1)); // always there in PluralSamples()
106 mentioned.add(new FixedDecimal(2)); // always there in PluralSamples()
[all …]
DPluralRules.java547 …public static class FixedDecimal extends Number implements Comparable<FixedDecimal>, IFixedDecimal… class in PluralRules
663 public FixedDecimal(double n, int v, long f, int e) { in FixedDecimal() method in PluralRules.FixedDecimal
707 public FixedDecimal(double n, int v, long f) { in FixedDecimal() method in PluralRules.FixedDecimal
716 public static FixedDecimal createWithExponent(double n, int v, int e) { in createWithExponent()
717 return new FixedDecimal(n,v,getFractionalDigits(n, v), e); in createWithExponent()
725 public FixedDecimal(double n, int v) { in FixedDecimal() method in PluralRules.FixedDecimal
747 public FixedDecimal(double n) { in FixedDecimal() method in PluralRules.FixedDecimal
756 public FixedDecimal(long n) { in FixedDecimal() method in PluralRules.FixedDecimal
817 private FixedDecimal (FixedDecimal other) { in FixedDecimal() method in PluralRules.FixedDecimal
840 public FixedDecimal (String n) { in FixedDecimal() method in PluralRules.FixedDecimal
[all …]
DCurrencyPluralInfo.java261 public String select(PluralRules.FixedDecimal numberInfo) { in select()
/external/cldr/tools/java/com/ibm/icu/text/
DFixedDecimal.java17 public class FixedDecimal extends Number implements Comparable<FixedDecimal>, IFixedDecimal { class
133 public FixedDecimal(double n, int v, long f, int e) { in FixedDecimal() method in FixedDecimal
177 public FixedDecimal(double n, int v, long f) { in FixedDecimal() method in FixedDecimal
186 public static FixedDecimal createWithExponent(double n, int v, int e) { in createWithExponent()
187 return new FixedDecimal(n,v,getFractionalDigits(n, v), e); in createWithExponent()
195 public FixedDecimal(double n, int v) { in FixedDecimal() method in FixedDecimal
217 public FixedDecimal(double n) { in FixedDecimal() method in FixedDecimal
226 public FixedDecimal(long n) { in FixedDecimal() method in FixedDecimal
287 private FixedDecimal (FixedDecimal other) { in FixedDecimal() method in FixedDecimal
310 public FixedDecimal (String n) { in FixedDecimal() method in FixedDecimal
[all …]
/external/cldr/tools/cldr-unittest/src/org/unicode/cldr/unittest/
DTestPluralRuleGeneration.java26 import com.ibm.icu.text.FixedDecimal;
141 FixedDecimal lastFromString = null; in TestEFixedDecimal()
162 FixedDecimal fromString = new FixedDecimal(source); in TestEFixedDecimal()
187FixedDecimal fromDoubleAndExponent = FixedDecimal.createWithExponent(fExpected, vExpected, eExpect… in TestEFixedDecimal()
190 FixedDecimal.createWithExponent(fExpected, vExpected, eExpected); in TestEFixedDecimal()
205 private Map<Operand,Double> getOperandMap(FixedDecimal fixedDecimal) {
240 final FixedDecimal source = new FixedDecimal(test);
257 final FixedDecimal source = new FixedDecimal(test);
259 + "\t" + FixedDecimal.toSampleString(source)
303 IFixedDecimal sourceFixedDecimal = new FixedDecimal(test);
[all …]
DTestSupplementalInfo.java84 import com.ibm.icu.text.PluralRules.FixedDecimal;
154 public static int compare(PluralRules.FixedDecimal me, PluralRules.FixedDecimal other) { in compare()
189 Output<FixedDecimal> maxSample = new Output<>(); in TestPluralRanges()
190 Output<FixedDecimal> minSample = new Output<>(); in TestPluralRanges()
295 Output<FixedDecimal> maxSample, Output<FixedDecimal> minSample, in getRangeLine()
321 FixedDecimal sampleDecimal = PluralInfo.getNonZeroSampleIfPossible(exampleList); in getRangeLine()
415 Count count = pluralInfo.getCount(new FixedDecimal(row[2])); in checkPluralSamples()
/external/cldr/tools/java/org/unicode/cldr/tool/
DWritePluralRulesSpreadsheets.java28 import com.ibm.icu.text.PluralRules.FixedDecimal;
115 Set<FixedDecimal> samples = new TreeSet<>(); in writePluralChecklist()
136 FixedDecimal fd = new FixedDecimal(sample); in writePluralChecklist()
140 FixedDecimal fd = new FixedDecimal(sample); in writePluralChecklist()
146 for (FixedDecimal number : samples) { in writePluralChecklist()
186 FixedDecimal small = getSample(rules, start, null); // smallest in writeRanges()
193 FixedDecimal large = getSample(rules, end, small); // smallest in writeRanges()
226 private static FixedDecimal getSample(PluralRules rules, String start, FixedDecimal minimum) { in getSample()
227 FixedDecimal result = getSample(rules, start, SampleType.INTEGER, minimum); in getSample()
228 FixedDecimal result2 = getSample(rules, start, SampleType.DECIMAL, minimum); in getSample()
[all …]
DGeneratePluralConfirmation.java24 import com.ibm.icu.text.PluralRules.FixedDecimal;
131 FixedDecimal fd = new FixedDecimal(i); in mainOld()
150 Relation<Count, FixedDecimal> soFar = Relation.of(new EnumMap(Count.class), TreeSet.class);
151 Map<FixedDecimal, String> sorted = new TreeMap();
153 private void showValue(String keyword, FixedDecimal fd) { in showValue()
154 Set<FixedDecimal> soFarSet = soFar.getAll(keyword); in showValue()
167 Set<FixedDecimal> soFarSet = soFar.getAll(keyword); in showSamples()
185 for (Entry<Count, Set<FixedDecimal>> entry : soFar.keyValuesSet()) { in toString()
187 for (FixedDecimal fd : entry.getValue()) { in toString()
DGeneratedPluralSamples.java30 import com.ibm.icu.text.FixedDecimal;
63 public Range(FixedDecimal start, FixedDecimal end) { in Range()
101 Status getStatus(FixedDecimal ni) {
148 public static long getFlatValue(FixedDecimal start) {
181 void add(FixedDecimal ni) {
262 final FixedDecimal[] digitToSample = new FixedDecimal[20];
264 final Set<FixedDecimal> exponentSamples = new TreeSet<>();
274 for (FixedDecimal ni : digitToSample) {
285 for (FixedDecimal exponentSample : exponentSamples) {
297 private void add(FixedDecimal ni) {
[all …]
DPluralRulesFactory.java20 import com.ibm.icu.text.PluralRules.FixedDecimal;
175 public Relation<ULocale, FixedDecimal> getExtraSamples() { in getExtraSamples()
184 private Relation<ULocale, FixedDecimal> EXTRA_SAMPLES = null;
189 …Relation<ULocale, FixedDecimal> tempSamples = Relation.of(new HashMap<ULocale, Set<FixedDecimal>>(… in loadData()
289 tempSamples.put(uLocale, new PluralRules.FixedDecimal(item)); in loadData()
DGeneratePluralRanges.java38 import com.ibm.icu.text.PluralRules.FixedDecimal;
135 Output<FixedDecimal> maxSample = new Output<>(); in getRangeInfo()
136 Output<FixedDecimal> minSample = new Output<>(); in getRangeInfo()
174 FixedDecimal min, FixedDecimal max, in RangeSample()
189 final FixedDecimal min;
190 final FixedDecimal max;
196 public static String format(DecimalFormat nf, FixedDecimal minSample) { in format()
325 Output<FixedDecimal> maxSample = new Output<>(); in minimize()
326 Output<FixedDecimal> minSample = new Output<>(); in minimize()
DShowPlurals.java26 import com.ibm.icu.text.PluralRules.FixedDecimal;
171FixedDecimal sampleDecimal = PluralInfo.getNonZeroSampleIfPossible(exampleList); in printPluralTable()
227 private String getSample(FixedDecimal numb, String samplePattern, NumberFormat nf) { in getSample()
/external/icu/icu4c/source/i18n/
Dplurrule_impl.h37 #define UPLRULES_NO_UNIQUE_VALUE_DECIMAL (FixedDecimal((double)-0.00123456777))
277 class U_I18N_API FixedDecimal: public IFixedDecimal, public UObject {
285 FixedDecimal(double n, int32_t v, int64_t f, int32_t e);
286 FixedDecimal(double n, int32_t v, int64_t f);
287 FixedDecimal(double n, int32_t);
288 explicit FixedDecimal(double n);
289 FixedDecimal();
290 ~FixedDecimal() U_OVERRIDE;
291 FixedDecimal(const UnicodeString &s, UErrorCode &ec);
292 FixedDecimal(const FixedDecimal &other);
[all …]
Dplurrule.cpp281 return select(FixedDecimal(number)); in select()
286 return select(FixedDecimal(number)); in select()
388 FixedDecimal* destFd, int32_t destCapacity, in getSamplesFromString()
414 FixedDecimal fixed(sampleRange, status); in getSamplesFromString()
425 FixedDecimal fixedLo(sampleRange.tempSubStringBetween(0, tildeIndex), status); in getSamplesFromString()
426 FixedDecimal fixedHi(sampleRange.tempSubStringBetween(tildeIndex+1), status); in getSamplesFromString()
461 FixedDecimal newSample = FixedDecimal::createWithExponent(sampleValue, v, e); in getSamplesFromString()
500 PluralRules::getSamples(const UnicodeString &keyword, FixedDecimal *dest, in getSamples()
1604 FixedDecimal::FixedDecimal(double n, int32_t v, int64_t f, int32_t e) { in FixedDecimal() function in FixedDecimal
1621 FixedDecimal::FixedDecimal(double n, int32_t v, int64_t f) { in FixedDecimal() function in FixedDecimal
[all …]
/external/icu/libicu/cts_headers/
Dplurrule_impl.h37 #define UPLRULES_NO_UNIQUE_VALUE_DECIMAL (FixedDecimal((double)-0.00123456777))
277 class U_I18N_API FixedDecimal: public IFixedDecimal, public UObject {
285 FixedDecimal(double n, int32_t v, int64_t f, int32_t e);
286 FixedDecimal(double n, int32_t v, int64_t f);
287 FixedDecimal(double n, int32_t);
288 explicit FixedDecimal(double n);
289 FixedDecimal();
290 ~FixedDecimal() U_OVERRIDE;
291 FixedDecimal(const UnicodeString &s, UErrorCode &ec);
292 FixedDecimal(const FixedDecimal &other);
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DPluralRulesTest.java53 import com.ibm.icu.text.PluralRules.FixedDecimal;
83 FixedDecimal fd = new FixedDecimal(testDouble[0]); in testOverUnderflow()
180 new FixedDecimal(3));
182 new FixedDecimal(3.5, 2));
188 false, new FixedDecimal(99d, 1));
209 new FixedDecimal(0));
211 new FixedDecimal(0, 1));
213 new FixedDecimal(1000000));
215 FixedDecimal.createWithExponent(2.1, 1, 6));
217 new FixedDecimal(2));
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DPluralRulesTest.java54 import android.icu.text.PluralRules.FixedDecimal;
86 FixedDecimal fd = new FixedDecimal(testDouble[0]); in testOverUnderflow()
183 new FixedDecimal(3));
185 new FixedDecimal(3.5, 2));
191 false, new FixedDecimal(99d, 1));
212 new FixedDecimal(0));
214 new FixedDecimal(0, 1));
216 new FixedDecimal(1000000));
218 FixedDecimal.createWithExponent(2.1, 1, 6));
220 new FixedDecimal(2));
[all …]
/external/icu/icu4c/source/test/intltest/
Dplurults.cpp465 FixedDecimal values[1000]; in testGetFixedDecimalSamples()
532 checkNewSamples(description, test, u"one", u"@integer 0, 1, 1e5", FixedDecimal(0)); in testSamplesWithExponent()
533 …ption, test, u"many", u"@integer 1000000, 2e6, 3e6, 4e6, 5e6, 6e6, 7e6, …", FixedDecimal(1000000)); in testSamplesWithExponent()
534 …er", u"@integer 2~17, 100, 1000, 10000, 100000, 2e5, 3e5, 4e5, 5e5, 6e5, 7e5, …", FixedDecimal(2)); in testSamplesWithExponent()
549 checkNewSamples(description2, test2, u"one", u"@decimal 0.0~1.5, 1.1e5", FixedDecimal(0, 1)); in testSamplesWithExponent()
550 …t2, u"many", u"@decimal 2.1e6, 3.1e6, 4.1e6, 5.1e6, 6.1e6, 7.1e6, …", FixedDecimal::createWithExpo… in testSamplesWithExponent()
551 … 10000.0, 100000.0, 1000000.0, 2.1e5, 3.1e5, 4.1e5, 5.1e5, 6.1e5, 7.1e5, …", FixedDecimal(2.0, 1)); in testSamplesWithExponent()
559 FixedDecimal firstInRange) { in checkNewSamples()
562 FixedDecimal samples[1000]; in checkNewSamples()
569 FixedDecimal actualFirstSample = samples[0]; in checkNewSamples()
[all …]
Dplurults.h54 FixedDecimal firstInRange);
/external/cldr/tools/java/org/unicode/cldr/test/
DExampleGenerator.java63 import com.ibm.icu.text.PluralRules.FixedDecimal;
606 FixedDecimal amount = getBest(Count.valueOf(count)); in handleFormatUnit()
664 FixedDecimal amount = getBest(count); in handleCompoundUnit()
668 FixedDecimal oneValue = new FixedDecimal(1d, 0); in handleCompoundUnit()
717 FixedDecimal amount = getBest(count); in handleCompoundUnit1()
761 private FixedDecimal getBest(Count count) { in getBest()
936 … private String getFormattedUnit(String unitType, UnitLength unitWidth, FixedDecimal unitAmount) { in getFormattedUnit()
943 return getFormattedUnit(unitType, unitWidth, new FixedDecimal(unitAmount)); in getFormattedUnit()
947 …private String getFormattedUnit(String unitType, UnitLength unitWidth, FixedDecimal unitAmount, St… in getFormattedUnit()
1148 static final List<FixedDecimal> CURRENCY_SAMPLES = Arrays.asList(
[all …]
/external/cldr/tools/java/org/unicode/cldr/util/
DSupplementalDataInfo.java64 import com.ibm.icu.text.PluralRules.FixedDecimal;
3247 private List<FixedDecimal> fractions = new ArrayList<>(0);
3288 FixedDecimal fraction = fractions.get(i);
3313 public List<FixedDecimal> getFractions() {
3339 public void add(FixedDecimal i) {
3384 FixedDecimal ni = new FixedDecimal(i + f / 10.0d, f < 10 ? 1 : 2, f);
3416 …n addDigit(Map<Count, SampleList[]> countToDigitToIntegerSamples9999, FixedDecimal i, Count count,…
3420 private boolean addFraction(FixedDecimal i, SampleList sampleList) {
3429 …private boolean addSimple(Map<Count, SampleList> countToIntegerSamples9999, FixedDecimal i, Count …
3629 public Count getCount(PluralRules.FixedDecimal exampleCount) {
[all …]
/external/icu/libicu/cts_headers/unicode/
Dplurrule.h49 class FixedDecimal; variable
501 FixedDecimal *dest, int32_t destCapacity,
/external/icu/icu4c/source/i18n/unicode/
Dplurrule.h49 class FixedDecimal; variable
501 FixedDecimal *dest, int32_t destCapacity,

12