Home
last modified time | relevance | path

Searched refs:Rational (Results 1 – 23 of 23) sorted by relevance

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DRationalTest.java20 import android.util.Rational;
31 import static android.util.Rational.*;
43 private static final Rational UNIT = new Rational(1, 1);
50 assertEquals(1, Rational.gcd(1, 2)); in testGcd()
51 assertEquals(1, Rational.gcd(2, 3)); in testGcd()
52 assertEquals(78, Rational.gcd(5*78, 7*78)); in testGcd()
53 assertEquals(1, Rational.gcd(-1, 2)); in testGcd()
54 assertEquals(1, Rational.gcd(-2, 3)); in testGcd()
61 Rational r = new Rational(1, 2); in testConstructor()
66 r = new Rational(-1, 2); in testConstructor()
[all …]
DRangeTest.java21 import android.util.Rational;
104 Range<Rational> negativeOneTenthPositiveOneTenth = in testEquals()
105 new Range<Rational>(new Rational(-1, 10), new Rational(1, 10)); in testEquals()
106 Range<Rational> negativeOneTenthPositiveOneTenth2 = in testEquals()
107 Range.create(new Rational(-1, 10), new Rational(1, 10)); in testEquals()
130 Range<Rational> negativeOneTenthPositiveOneTenth = in testInRange()
131 new Range<Rational>(new Rational(-1, 10), new Rational(1, 10)); in testInRange()
132 assertInRange(negativeOneTenthPositiveOneTenth, new Rational(-1, 10)); in testInRange()
133 assertInRange(negativeOneTenthPositiveOneTenth, new Rational(1, 10)); in testInRange()
134 assertInRange(negativeOneTenthPositiveOneTenth, Rational.ZERO); in testInRange()
[all …]
DCameraMetadataTest.java23 import android.util.Rational;
444 checkKeyGetAndSet("android.sensor.baseGainFactor", Rational.class, new Rational(1, 2)); in testReadWritePrimitive()
489 checkKeyGetAndSet("android.sensor.calibrationTransform1", Rational[].class, in testReadWritePrimitiveArray()
490 new Rational[] { in testReadWritePrimitiveArray()
491 new Rational(1, 2), new Rational(3, 4), new Rational(5, 6), in testReadWritePrimitiveArray()
492 new Rational(7, 8), new Rational(9, 10), new Rational(10, 11), in testReadWritePrimitiveArray()
493 new Rational(12, 13), new Rational(14, 15), new Rational(15, 16) in testReadWritePrimitiveArray()
762 new ColorSpaceTransform(new Rational[] { in testReadWriteColorSpaceTransform()
763 new Rational(1, 2), new Rational(3, 4), new Rational(5, 6), in testReadWriteColorSpaceTransform()
764 new Rational(7, 8), new Rational(8, 9), new Rational(10, 11), in testReadWriteColorSpaceTransform()
[all …]
/frameworks/base/core/java/android/util/
DRational.java29 public final class Rational extends Number implements Comparable<Rational> { class
40 public static final Rational NaN = new Rational(0, 0);
48 public static final Rational POSITIVE_INFINITY = new Rational(1, 0);
56 public static final Rational NEGATIVE_INFINITY = new Rational(-1, 0);
64 public static final Rational ZERO = new Rational(0, 1);
101 public Rational(int numerator, int denominator) { in Rational() method in Rational
240 return obj instanceof Rational && equals((Rational) obj); in equals()
243 private boolean equals(Rational other) { in equals()
466 public int compareTo(Rational another) { in compareTo()
576 public static Rational parseRational(String string) in parseRational()
[all …]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/exif/
DRational.java23 public class Rational { class
34 public Rational(long nominator, long denominator) { in Rational() method in Rational
42 public Rational(Rational r) { in Rational() method in Rational
77 if (obj instanceof Rational) { in equals()
78 Rational data = (Rational) obj; in equals()
DExifTag.java363 public boolean setValue(Rational[] value) { in setValue()
394 public boolean setValue(Rational value) { in setValue()
395 return setValue(new Rational[] { in setValue()
468 } else if (obj instanceof Rational) { in setValue()
469 return setValue((Rational) obj); in setValue()
470 } else if (obj instanceof Rational[]) { in setValue()
471 return setValue((Rational[]) obj); in setValue()
605 public Rational[] getValueAsRationals() { in getValueAsRationals()
606 if (mValue instanceof Rational[]) { in getValueAsRationals()
607 return (Rational[]) mValue; in getValueAsRationals()
[all …]
DExifParser.java699 Rational value[] = new Rational[tag.getComponentCount()]; in readFullTagValue()
723 Rational value[] = new Rational[tag.getComponentCount()]; in readFullTagValue()
853 protected Rational readUnsignedRational() throws IOException { in readUnsignedRational()
856 return new Rational(nomi, denomi); in readUnsignedRational()
869 protected Rational readRational() throws IOException { in readRational()
872 return new Rational(nomi, denomi); in readRational()
DExifInterface.java1302 public Rational getTagRationalValue(int tagId, int ifdId) { in getTagRationalValue()
1303 Rational[] l = getTagRationalValues(tagId, ifdId); in getTagRationalValue()
1307 return new Rational(l[0]); in getTagRationalValue()
1313 public Rational getTagRationalValue(int tagId) { in getTagRationalValue()
1378 public Rational[] getTagRationalValues(int tagId, int ifdId) { in getTagRationalValues()
1389 public Rational[] getTagRationalValues(int tagId) { in getTagRationalValues()
1909 public static double convertLatOrLongToDouble(Rational[] coordinate, String reference) { in convertLatOrLongToDouble()
1933 Rational[] latitude = getTagRationalValues(TAG_GPS_LATITUDE); in getLatLongAsDoubles()
1935 Rational[] longitude = getTagRationalValues(TAG_GPS_LONGITUDE); in getLatLongAsDoubles()
2018 t = buildTag(TAG_GPS_TIME_STAMP, new Rational[] { in addGpsDateTimeStampTag()
[all …]
DOrderedDataOutputStream.java51 public OrderedDataOutputStream writeRational(Rational rational) throws IOException { in writeRational()
DExifModifier.java173 Rational v = tag.getRational(i); in writeTagValue()
/frameworks/base/core/java/android/hardware/camera2/params/
DColorSpaceTransform.java23 import android.util.Rational;
71 public ColorSpaceTransform(Rational[] elements) { in ColorSpaceTransform()
135 public Rational getElement(int column, int row) { in getElement()
145 return new Rational(numerator, denominator); in getElement()
162 public void copyElements(Rational[] destination, int offset) { in copyElements()
173 destination[i + offset] = new Rational(numerator, denominator); in copyElements()
233 Rational r = new Rational(numerator, denominator); in equals()
234 Rational rOther = new Rational(numeratorOther, denominatorOther); in equals()
/frameworks/base/core/java/android/hardware/camera2/utils/
DParamsUtils.java23 import android.util.Rational;
121 public static Rational createRational(float value) { in createRational()
123 return Rational.NaN; in createRational()
125 return Rational.POSITIVE_INFINITY; in createRational()
127 return Rational.NEGATIVE_INFINITY; in createRational()
129 return Rational.ZERO; in createRational()
157 return new Rational(num, den); in createRational()
/frameworks/base/media/java/android/media/
DUtils.java22 import android.util.Rational;
151 private static Rational scaleRatio(Rational ratio, int num, int den) {
155 return new Rational(
160 static Range<Rational> scaleRange(Range<Rational> range, int num, int den) {
268 static Range<Rational> parseRationalRange(Object o, Range<Rational> fallback) {
274 Rational.parseRational(s.substring(0, ix)),
275 Rational.parseRational(s.substring(ix + 1)));
277 Rational value = Rational.parseRational(s);
DMediaCodecInfo.java22 import android.util.Rational;
124 private static final Range<Rational> POSITIVE_RATIONALS =
125 Range.create(new Rational(1, Integer.MAX_VALUE),
126 new Rational(Integer.MAX_VALUE, 1));
763 private Range<Rational> mAspectRatioRange;
764 private Range<Rational> mBlockAspectRatioRange;
998 new Rational(widthInBlocks, heightInBlocks)) in supports()
999 && mAspectRatioRange.contains(new Rational(width, height)); in supports()
1059 public Range<Rational> getAspectRatioRange(boolean blocks) { in getAspectRatioRange()
1095 Range<Rational> ratios = null, blockRatios = null; in parseFromInfo()
[all …]
/frameworks/native/opengl/tests/hwc/
DhwcCommit.cpp203 class Rational { class
205 Rational(void) : _n(0), _d(1) {} in Rational() function in Rational
206 Rational(uint32_t n, uint32_t d) : _n(n), _d(d) {} in Rational() function in Rational
211 bool operator==(const Rational& other) const;
212 bool operator!=(const Rational& other) const { return !(*this == other); } in operator !=()
213 bool operator<(const Rational& other) const;
214 bool operator>(const Rational& other) const { in operator >()
218 Rational& lower, Rational& upper);
262 Rational hScale;
265 Rational vScale;
[all …]
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
DMarshalQueryablePrimitive.java22 import android.util.Rational;
89 } else if (value instanceof Rational) { in marshal()
91 marshalPrimitive((Rational) value, buffer); in marshal()
122 private void marshalPrimitive(Rational value, ByteBuffer buffer) { in marshalPrimitive()
142 return new Rational(numerator, denominator); in unmarshalObject()
179 } else if (klass == Rational.class) { in isTypeMappingSupported()
/frameworks/base/core/java/android/hardware/camera2/
DCaptureResult.java25 import android.util.Rational;
2784 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
2785 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
3228 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
3229 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
DCameraCharacteristics.java23 import android.util.Rational;
421 public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
422 new Key<Rational>("android.control.aeCompensationStep", Rational.class);
/frameworks/base/core/java/android/hardware/camera2/marshal/
DMarshalHelpers.java22 import android.util.Rational;
132 } else if (klass == Rational.class) { in isPrimitiveClass()
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/
DAndroidCamera2Capabilities.java28 import android.util.Rational;
78 Rational ecStep = p.get(CONTROL_AE_COMPENSATION_STEP); in AndroidCamera2Capabilities()
/frameworks/base/docs/html/sdk/api_diff/preview-21/
DmissingSinces.txt491 NO DOC BLOCK: android.util.Rational Method parseRational(java.lang.String)
/frameworks/base/docs/html/sdk/api_diff/21/
DmissingSinces.txt98 NO DOC BLOCK: android.util.Rational Class
/frameworks/base/api/
Dcurrent.txt13033 ctor public ColorSpaceTransform(android.util.Rational[]);
13035 method public void copyElements(android.util.Rational[], int);
13037 method public android.util.Rational getElement(int, int);
31591 public final class Rational extends java.lang.Number implements java.lang.Comparable {
31592 ctor public Rational(int, int);
31593 method public int compareTo(android.util.Rational);
31604 …method public static android.util.Rational parseRational(java.lang.String) throws java.lang.Number…
31605 field public static final android.util.Rational NEGATIVE_INFINITY;
31606 field public static final android.util.Rational NaN;
31607 field public static final android.util.Rational POSITIVE_INFINITY;
[all …]