Home
last modified time | relevance | path

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

12

/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()
766 new ColorSpaceTransform(new Rational[] { in testReadWriteColorSpaceTransform()
767 new Rational(1, 2), new Rational(3, 4), new Rational(5, 6), in testReadWriteColorSpaceTransform()
768 new Rational(7, 8), new Rational(8, 9), new Rational(10, 11), in testReadWriteColorSpaceTransform()
[all …]
/frameworks/base/core/java/android/util/
DRational.java30 public final class Rational extends Number implements Comparable<Rational> { class
41 public static final Rational NaN = new Rational(0, 0);
49 public static final Rational POSITIVE_INFINITY = new Rational(1, 0);
57 public static final Rational NEGATIVE_INFINITY = new Rational(-1, 0);
65 public static final Rational ZERO = new Rational(0, 1);
104 public Rational(int numerator, int denominator) { in Rational() method in Rational
243 return obj instanceof Rational && equals((Rational) obj); in equals()
246 private boolean equals(Rational other) { in equals()
469 public int compareTo(Rational another) { in compareTo()
579 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()
/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/core/java/android/app/
DPictureInPictureParams.java24 import android.util.Rational;
41 private Rational mAspectRatio;
58 public Builder setAspectRatio(Rational aspectRatio) { in setAspectRatio()
123 private Rational mAspectRatio;
146 mAspectRatio = new Rational(in.readInt(), in.readInt()); in PictureInPictureParams()
158 PictureInPictureParams(Rational aspectRatio, List<RemoteAction> actions, in PictureInPictureParams()
194 public Rational getAspectRatioRational() { in getAspectRatioRational()
DPictureInPictureArgs.java24 import android.util.Rational;
39 private Rational mAspectRatio;
56 public Builder setAspectRatio(Rational aspectRatio) { in setAspectRatio()
114 private Rational mAspectRatio;
156 mAspectRatio = new Rational(in.readInt(), in.readInt()); in PictureInPictureArgs()
167 private PictureInPictureArgs(Rational aspectRatio, List<RemoteAction> actions, in PictureInPictureArgs()
181 mAspectRatio = new Rational((int) (aspectRatio * 1000000000), 1000000000); in setAspectRatio()
238 public Rational getAspectRatioRational() { in getAspectRatioRational()
/frameworks/native/opengl/tests/hwc/
DhwcCommit.cpp202 class Rational { class
204 Rational(void) : _n(0), _d(1) {} in Rational() function in Rational
205 Rational(uint32_t n, uint32_t d) : _n(n), _d(d) {} in Rational() function in Rational
210 bool operator==(const Rational& other) const;
211 bool operator!=(const Rational& other) const { return !(*this == other); } in operator !=()
212 bool operator<(const Rational& other) const;
213 bool operator>(const Rational& other) const { in operator >()
217 Rational& lower, Rational& upper);
263 Rational hScale;
266 Rational vScale;
[all …]
/frameworks/base/media/java/android/media/
DUtils.java29 import android.util.Rational;
158 private static Rational scaleRatio(Rational ratio, int num, int den) {
162 return new Rational(
167 static Range<Rational> scaleRange(Range<Rational> range, int num, int den) {
278 static Range<Rational> parseRationalRange(Object o, Range<Rational> fallback) {
284 Rational.parseRational(s.substring(0, ix)),
285 Rational.parseRational(s.substring(ix + 1)));
287 Rational value = Rational.parseRational(s);
DExifInterface.java579 private static class Rational { class in ExifInterface
583 private Rational(long numerator, long denominator) { in Rational() method in ExifInterface.Rational
681 public static ExifAttribute createURational(Rational[] values, ByteOrder byteOrder) { in createURational()
685 for (Rational value : values) { in createURational()
692 public static ExifAttribute createURational(Rational value, ByteOrder byteOrder) { in createURational()
693 return createURational(new Rational[] {value}, byteOrder); in createURational()
696 public static ExifAttribute createSRational(Rational[] values, ByteOrder byteOrder) { in createSRational()
700 for (Rational value : values) { in createSRational()
707 public static ExifAttribute createSRational(Rational value, ByteOrder byteOrder) { in createSRational()
708 return createSRational(new Rational[] {value}, byteOrder); in createSRational()
[all …]
/frameworks/base/core/java/android/hardware/camera2/marshal/impl/
DMarshalQueryablePrimitive.java22 import android.util.Rational;
87 } else if (value instanceof Rational) { in marshal()
89 marshalPrimitive((Rational) value, buffer); in marshal()
120 private void marshalPrimitive(Rational value, ByteBuffer buffer) { in marshalPrimitive()
140 return new Rational(numerator, denominator); in unmarshalObject()
177 } else if (klass == Rational.class) { in isTypeMappingSupported()
/frameworks/base/tests/FlickerTests/src/com/android/server/wm/flicker/
DDebugTest.java21 import android.util.Rational;
108 CommonTransitions.resizeSplitScreen(testApp, bottomApp, uiDevice, new Rational(1, 3), in resizeSplitScreen()
109 new Rational(2, 3)).includeJankyRuns().recordEachRun().build().run(); in resizeSplitScreen()
DResizeSplitScreenTest.java28 import android.util.Rational;
56 super.runTransition(resizeSplitScreen(testApp, bottomApp, uiDevice, new Rational(1, 3), in runTransition()
57 new Rational(2, 3)).includeJankyRuns().build()); in runTransition()
DCommonTransitions.java37 import android.util.Rational;
217 UiDevice device, Rational startRatio, Rational stopRatio) { in resizeSplitScreen()
/frameworks/base/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/
DPipActivity.java23 import android.util.Rational;
39 .setAspectRatio(new Rational(1, 1)) in onCreate()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/
DCamera2StillCaptureTest.java42 import android.util.Rational;
483 Rational[] empty = new Rational[] { Rational.ZERO, Rational.ZERO, Rational.ZERO}; in verifyRawCaptureResult()
484 Rational[] neutralColorPoint = mCollector.expectKeyValueNotNull("NeutralColorPoint", in verifyRawCaptureResult()
492 Rational.ZERO); in verifyRawCaptureResult()
/frameworks/base/core/java/android/hardware/camera2/marshal/
DMarshalHelpers.java22 import android.util.Rational;
132 } else if (klass == Rational.class) { in isPrimitiveClass()
/frameworks/base/core/java/android/hardware/camera2/
DCaptureResult.java28 import android.util.Rational;
3496 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
3497 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
4107 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
4108 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
/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()

12