/external/guava/android/guava-tests/test/com/google/common/math/ |
D | IntMathTest.java | 49 assertTrue(IntMath.isPowerOfTwo(IntMath.MAX_SIGNED_POWER_OF_TWO)); in testMaxSignedPowerOfTwo() 52 long value = IntMath.MAX_SIGNED_POWER_OF_TWO * 2L; in testMaxSignedPowerOfTwo() 53 assertFalse(IntMath.isPowerOfTwo((int) value)); in testMaxSignedPowerOfTwo() 60 assertEquals(expectedResult.intValue(), IntMath.ceilingPowerOfTwo(x)); in testCeilingPowerOfTwo() 63 IntMath.ceilingPowerOfTwo(x); in testCeilingPowerOfTwo() 74 assertEquals(expectedResult.intValue(), IntMath.floorPowerOfTwo(x)); in testFloorPowerOfTwo() 81 IntMath.ceilingPowerOfTwo(x); in testCeilingPowerOfTwoNegative() 91 IntMath.floorPowerOfTwo(x); in testFloorPowerOfTwoNegative() 100 IntMath.ceilingPowerOfTwo(0); in testCeilingPowerOfTwoZero() 108 IntMath.floorPowerOfTwo(0); in testFloorPowerOfTwoZero() [all …]
|
/external/guava/guava-tests/test/com/google/common/math/ |
D | IntMathTest.java | 49 assertTrue(IntMath.isPowerOfTwo(IntMath.MAX_SIGNED_POWER_OF_TWO)); in testMaxSignedPowerOfTwo() 52 long value = IntMath.MAX_SIGNED_POWER_OF_TWO * 2L; in testMaxSignedPowerOfTwo() 53 assertFalse(IntMath.isPowerOfTwo((int) value)); in testMaxSignedPowerOfTwo() 60 assertEquals(expectedResult.intValue(), IntMath.ceilingPowerOfTwo(x)); in testCeilingPowerOfTwo() 63 IntMath.ceilingPowerOfTwo(x); in testCeilingPowerOfTwo() 74 assertEquals(expectedResult.intValue(), IntMath.floorPowerOfTwo(x)); in testFloorPowerOfTwo() 81 IntMath.ceilingPowerOfTwo(x); in testCeilingPowerOfTwoNegative() 91 IntMath.floorPowerOfTwo(x); in testFloorPowerOfTwoNegative() 100 IntMath.ceilingPowerOfTwo(0); in testCeilingPowerOfTwoZero() 108 IntMath.floorPowerOfTwo(0); in testFloorPowerOfTwoZero() [all …]
|
/external/guava/guava-tests/benchmark/com/google/common/math/ |
D | IntMathBenchmark.java | 59 tmp += IntMath.pow(positive[j], exponent[j]); in pow() 69 tmp += IntMath.mod(ints[j], positive[j]); in mod() 79 tmp += IntMath.gcd(nonnegative[j], positive[j]); in gCD() 89 tmp += IntMath.factorial(factorial[j]); in factorial() 99 tmp += IntMath.binomial(factorial[j], binomial[j]); in binomial() 109 if (IntMath.isPrime(positive[j])) { in isPrime()
|
D | IntMathRoundingBenchmark.java | 57 tmp += IntMath.log2(positive[j], mode); in log2() 67 tmp += IntMath.log10(positive[j], mode); in log10() 77 tmp += IntMath.sqrt(positive[j], mode); in sqrt() 87 tmp += IntMath.divide(ints[j], nonzero[j], mode); in divide()
|
D | ApacheBenchmark.java | 46 return IntMath.gcd(a, b); in gcdInt() 62 int unused = IntMath.checkedAdd(a, b); in noAddOverflow() 82 int unused = IntMath.checkedMultiply(a, b); in noMulOverflow()
|
/external/guava/android/guava-tests/benchmark/com/google/common/math/ |
D | IntMathBenchmark.java | 59 tmp += IntMath.pow(positive[j], exponent[j]); in pow() 69 tmp += IntMath.mod(ints[j], positive[j]); in mod() 79 tmp += IntMath.gcd(nonnegative[j], positive[j]); in gCD() 89 tmp += IntMath.factorial(factorial[j]); in factorial() 99 tmp += IntMath.binomial(factorial[j], binomial[j]); in binomial() 109 if (IntMath.isPrime(positive[j])) { in isPrime()
|
D | IntMathRoundingBenchmark.java | 57 tmp += IntMath.log2(positive[j], mode); in log2() 67 tmp += IntMath.log10(positive[j], mode); in log10() 77 tmp += IntMath.sqrt(positive[j], mode); in sqrt() 87 tmp += IntMath.divide(ints[j], nonzero[j], mode); in divide()
|
D | ApacheBenchmark.java | 46 return IntMath.gcd(a, b); in gcdInt() 62 int unused = IntMath.checkedAdd(a, b); in noAddOverflow() 82 int unused = IntMath.checkedMultiply(a, b); in noMulOverflow()
|
/external/guava/guava-tests/benchmark/com/google/common/collect/ |
D | ImmutableSetHashFloodingDetectionBenchmark.java | 22 import com.google.common.math.IntMath; 58 return 12 * IntMath.log2(tableSize, RoundingMode.UNNECESSARY); in maxRunBeforeFallback() 98 return 13 * IntMath.log2(tableSize, RoundingMode.UNNECESSARY); in maxRunBeforeFallback() 146 return 13 * IntMath.log2(tableSize, RoundingMode.UNNECESSARY); in maxRunBeforeFallback()
|
/external/guava/android/guava/src/com/google/common/collect/ |
D | Collections2.java | 28 import com.google.common.math.IntMath; 443 permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r)); in calculateSize() 452 return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r)); in calculateSize() 583 return IntMath.factorial(inputList.size()); in size()
|
D | TopKSelector.java | 24 import com.google.common.math.IntMath; 127 this.buffer = (T[]) new Object[IntMath.checkedMultiply(k, 2)]; in TopKSelector() 172 int maxIterations = IntMath.log2(right - left, RoundingMode.CEILING) * 3; in trim()
|
D | CartesianList.java | 22 import com.google.common.math.IntMath; 59 axesSizeProduct[i] = IntMath.checkedMultiply(axesSizeProduct[i + 1], axes.get(i).size()); in CartesianList()
|
/external/guava/guava/src/com/google/common/collect/ |
D | Collections2.java | 28 import com.google.common.math.IntMath; 466 permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r)); in calculateSize() 475 return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r)); in calculateSize() 606 return IntMath.factorial(inputList.size()); in size()
|
D | TopKSelector.java | 24 import com.google.common.math.IntMath; 128 this.buffer = (T[]) new Object[IntMath.checkedMultiply(k, 2)]; in TopKSelector() 173 int maxIterations = IntMath.log2(right - left, RoundingMode.CEILING) * 3; in trim()
|
D | CartesianList.java | 22 import com.google.common.math.IntMath; 59 axesSizeProduct[i] = IntMath.checkedMultiply(axesSizeProduct[i + 1], axes.get(i).size()); in CartesianList()
|
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/ |
D | RtpPacket.java | 26 import com.google.common.math.IntMath; 138 return IntMath.mod(sequenceNumber + 1, MAX_SEQUENCE_NUMBER + 1); in getNextSequenceNumber() 143 return IntMath.mod(sequenceNumber - 1, MAX_SEQUENCE_NUMBER + 1); in getPreviousSequenceNumber()
|
/external/guava/guava/src/com/google/common/graph/ |
D | AbstractBaseGraph.java | 30 import com.google.common.math.IntMath; 140 return IntMath.saturatedAdd(predecessors(node).size(), successors(node).size()); 144 return IntMath.saturatedAdd(neighbors.size(), selfLoopCount);
|
D | AbstractDirectedNetworkConnections.java | 29 import com.google.common.math.IntMath; 79 return IntMath.saturatedAdd(inEdgeMap.size(), outEdgeMap.size() - selfLoopCount); in incidentEdges()
|
D | AbstractNetwork.java | 34 import com.google.common.math.IntMath; 145 return IntMath.saturatedAdd(inEdges(node).size(), outEdges(node).size()); 147 return IntMath.saturatedAdd(incidentEdges(node).size(), edgesConnecting(node, node).size());
|
/external/guava/android/guava/src/com/google/common/graph/ |
D | AbstractBaseGraph.java | 30 import com.google.common.math.IntMath; 140 return IntMath.saturatedAdd(predecessors(node).size(), successors(node).size()); 144 return IntMath.saturatedAdd(neighbors.size(), selfLoopCount);
|
D | AbstractDirectedNetworkConnections.java | 29 import com.google.common.math.IntMath; 79 return IntMath.saturatedAdd(inEdgeMap.size(), outEdgeMap.size() - selfLoopCount); in incidentEdges()
|
D | AbstractNetwork.java | 34 import com.google.common.math.IntMath; 144 return IntMath.saturatedAdd(inEdges(node).size(), outEdges(node).size()); 146 return IntMath.saturatedAdd(incidentEdges(node).size(), edgesConnecting(node, node).size());
|
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/ |
D | RtpPacket.java | 26 import com.google.common.math.IntMath; 138 return IntMath.mod(sequenceNumber + 1, MAX_SEQUENCE_NUMBER + 1); in getNextSequenceNumber() 143 return IntMath.mod(sequenceNumber - 1, MAX_SEQUENCE_NUMBER + 1); in getPreviousSequenceNumber()
|
/external/guava/guava-tests/test/com/google/common/collect/ |
D | TopKSelectorTest.java | 22 import com.google.common.math.IntMath; 122 assertThat(compareCalls[0]).isAtMost(10L * n * IntMath.log2(k, RoundingMode.CEILING)); in testWorstCase()
|
/external/guava/android/guava-tests/test/com/google/common/collect/ |
D | TopKSelectorTest.java | 22 import com.google.common.math.IntMath; 122 assertThat(compareCalls[0]).isAtMost(10L * n * IntMath.log2(k, RoundingMode.CEILING)); in testWorstCase()
|