Home
last modified time | relevance | path

Searched refs:expectedSize (Results 1 – 25 of 37) sorted by relevance

12

/external/dagger2/core/src/main/java/dagger/internal/
DCollections.java34 static <E> LinkedHashSet<E> newLinkedHashSetWithExpectedSize(int expectedSize) { in newLinkedHashSetWithExpectedSize() argument
35 return new LinkedHashSet<E>(calculateInitialCapacity(expectedSize)); in newLinkedHashSetWithExpectedSize()
42 static <K, V> LinkedHashMap<K, V> newLinkedHashMapWithExpectedSize(int expectedSize) { in newLinkedHashMapWithExpectedSize() argument
43 return new LinkedHashMap<K, V>(calculateInitialCapacity(expectedSize)); in newLinkedHashMapWithExpectedSize()
46 private static int calculateInitialCapacity(int expectedSize) { in calculateInitialCapacity() argument
47 if (expectedSize < 3) { in calculateInitialCapacity()
48 return expectedSize + 1; in calculateInitialCapacity()
50 if (expectedSize < MAX_POWER_OF_TWO) { in calculateInitialCapacity()
54 return (int) (expectedSize / 0.75F + 1.0F); in calculateInitialCapacity()
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DHashBiMap.java46 public static <K, V> HashBiMap<K, V> create(int expectedSize) { in create() argument
47 return new HashBiMap<K, V>(expectedSize); in create()
66 private HashBiMap(int expectedSize) { in HashBiMap() argument
68 Maps.<K, V>newHashMapWithExpectedSize(expectedSize), in HashBiMap()
69 Maps.<V, K>newHashMapWithExpectedSize(expectedSize)); in HashBiMap()
DSets.java196 public static <E> HashSet<E> newHashSetWithExpectedSize(int expectedSize) { in newHashSetWithExpectedSize() argument
197 return new HashSet<E>(Maps.capacity(expectedSize)); in newHashSetWithExpectedSize()
303 int expectedSize) { in newLinkedHashSetWithExpectedSize() argument
304 return new LinkedHashSet<E>(Maps.capacity(expectedSize)); in newLinkedHashSetWithExpectedSize()
DMaps.java189 int expectedSize) {
190 return new HashMap<K, V>(capacity(expectedSize));
198 static int capacity(int expectedSize) {
199 if (expectedSize < 3) {
200 checkNonnegative(expectedSize, "expectedSize");
201 return expectedSize + 1;
203 if (expectedSize < Ints.MAX_POWER_OF_TWO) {
204 return expectedSize + expectedSize / 3;
/external/archive-patcher/shared/src/main/java/com/google/archivepatcher/shared/
DRandomAccessFileOutputStream.java41 public RandomAccessFileOutputStream(File outputFile, long expectedSize) throws IOException { in RandomAccessFileOutputStream() argument
43 if (expectedSize >= 0) { in RandomAccessFileOutputStream()
44 raf.setLength(expectedSize); in RandomAccessFileOutputStream()
45 if (raf.length() != expectedSize) { in RandomAccessFileOutputStream()
/external/guava/guava/src/com/google/common/collect/
DHashBasedTable.java59 final int expectedSize; field in HashBasedTable.Factory
60 Factory(int expectedSize) { in Factory() argument
61 this.expectedSize = expectedSize; in Factory()
65 return Maps.newHashMapWithExpectedSize(expectedSize); in get()
DMinMaxPriorityQueue.java124 public static Builder<Comparable> expectedSize(int expectedSize) { in expectedSize() method in MinMaxPriorityQueue
126 .expectedSize(expectedSize); in expectedSize()
163 private int expectedSize = UNSET_EXPECTED_SIZE; field in MinMaxPriorityQueue.Builder
174 public Builder<B> expectedSize(int expectedSize) { in expectedSize() argument
175 checkArgument(expectedSize >= 0); in expectedSize()
176 this.expectedSize = expectedSize; in expectedSize()
207 this, initialQueueSize(expectedSize, maximumSize, initialContents)); in create()
DHashBiMap.java67 public static <K, V> HashBiMap<K, V> create(int expectedSize) { in create() argument
68 return new HashBiMap<K, V>(expectedSize); in create()
106 private HashBiMap(int expectedSize) { in HashBiMap() argument
107 init(expectedSize); in HashBiMap()
110 private void init(int expectedSize) { in init() argument
111 checkNonnegative(expectedSize, "expectedSize"); in init()
112 int tableSize = Hashing.closedTableSize(expectedSize, LOAD_FACTOR); in init()
DSets.java200 public static <E> HashSet<E> newHashSetWithExpectedSize(int expectedSize) { in newHashSetWithExpectedSize() argument
201 return new HashSet<E>(Maps.capacity(expectedSize)); in newHashSetWithExpectedSize()
307 int expectedSize) { in newLinkedHashSetWithExpectedSize() argument
308 return new LinkedHashSet<E>(Maps.capacity(expectedSize)); in newLinkedHashSetWithExpectedSize()
/external/webrtc/talk/app/webrtc/androidtests/src/org/webrtc/
DSurfaceViewRendererOnMeasureTest.java184 final Point expectedSize = in testFrame1280x720() local
187 expectedSize.x, expectedSize.y, widthSpec, heightSpec); in testFrame1280x720()
196 final Point expectedSize = in testFrame1280x720() local
199 expectedSize.x, expectedSize.y, widthSpec, heightSpec); in testFrame1280x720()
/external/apache-commons-math/src/main/java/org/apache/commons/math/util/
DOpenIntToDoubleHashMap.java110 public OpenIntToDoubleHashMap(final int expectedSize) { in OpenIntToDoubleHashMap() argument
111 this(expectedSize, Double.NaN); in OpenIntToDoubleHashMap()
119 public OpenIntToDoubleHashMap(final int expectedSize, in OpenIntToDoubleHashMap() argument
121 final int capacity = computeCapacity(expectedSize); in OpenIntToDoubleHashMap()
152 private static int computeCapacity(final int expectedSize) { in computeCapacity() argument
153 if (expectedSize == 0) { in computeCapacity()
156 final int capacity = (int) FastMath.ceil(expectedSize / LOAD_FACTOR); in computeCapacity()
DOpenIntToFieldHashMap.java119 public OpenIntToFieldHashMap(final Field<T> field,final int expectedSize) { in OpenIntToFieldHashMap() argument
120 this(field,expectedSize, field.getZero()); in OpenIntToFieldHashMap()
129 public OpenIntToFieldHashMap(final Field<T> field,final int expectedSize, in OpenIntToFieldHashMap() argument
132 final int capacity = computeCapacity(expectedSize); in OpenIntToFieldHashMap()
164 private static int computeCapacity(final int expectedSize) { in computeCapacity() argument
165 if (expectedSize == 0) { in computeCapacity()
168 final int capacity = (int) FastMath.ceil(expectedSize / LOAD_FACTOR); in computeCapacity()
/external/guava/guava-testlib/src/com/google/common/collect/testing/google/
DMultimapSizeTester.java41 int expectedSize = getNumElements(); in testSize() local
43 assertEquals(expectedSize, multimap.size()); in testSize()
50 assertEquals(expectedSize, size); in testSize()
56 assertEquals(expectedSize, size2); in testSize()
/external/skia/tests/
DOSPathTest.cpp34 size_t expectedSize = dir.size() + filename.size(); in test_dir_with_file() local
36 expectedSize++; in test_dir_with_file()
38 REPORTER_ASSERT(reporter, fullName.size() == expectedSize); in test_dir_with_file()
/external/icu/icu4c/source/test/iotest/
Dfiletst.c442 int32_t expectedSize = (int32_t)strlen(testStr); in TestfgetsBuffers() local
461 u_uastrncpy(buffer, testStr, expectedSize+1); in TestfgetsBuffers()
463 u_file_write(buffer, expectedSize, myFile); in TestfgetsBuffers()
481 if (readSize != expectedSize*repetitions) { in TestfgetsBuffers()
482 …log_err("Buffer is the wrong size. Got %d Expected %d\n", u_strlen(buffer), expectedSize*repetitio… in TestfgetsBuffers()
484 if (buffer[(expectedSize*repetitions) + 1] != 0xBEEF) { in TestfgetsBuffers()
503 u_uastrncpy(buffer, testStr, expectedSize+1); in TestfgetsBuffers()
505 u_file_write(buffer, expectedSize, myFile); in TestfgetsBuffers()
526 if (readSize != expectedSize*repetitions) { in TestfgetsBuffers()
527 …log_err("Buffer is the wrong size. Got %d Expected %d\n", u_strlen(buffer), expectedSize*repetitio… in TestfgetsBuffers()
[all …]
Dstrtst.c313 #define Test_u_snprintf(limit, format, value, expectedSize, expectedStr) \ argument
317 if (size != expectedSize || strcmp(cTestResult, expectedStr) != 0) {\
319 size, expectedSize, cTestResult, expectedStr);\
/external/guava/guava/src/com/google/common/io/
DFiles.java162 InputStream in, long expectedSize) throws IOException { in readFile() argument
163 if (expectedSize > Integer.MAX_VALUE) { in readFile()
165 + expectedSize + " bytes"); in readFile()
170 return expectedSize == 0 in readFile()
172 : ByteStreams.toByteArray(in, (int) expectedSize); in readFile()
DByteStreams.java126 InputStream in, int expectedSize) throws IOException { in toByteArray() argument
127 byte[] bytes = new byte[expectedSize]; in toByteArray()
128 int remaining = expectedSize; in toByteArray()
131 int off = expectedSize - remaining; in toByteArray()
/external/icu/icu4c/source/test/cintltst/
Dusettest.c361 int32_t expectedSize = 0; in expectItems() local
388 ++expectedSize; in expectItems()
466 if (uset_size(set) == expectedSize) { in expectItems()
467 log_verbose("Ok: %s size is %d\n", pat, expectedSize); in expectItems()
470 pat, uset_size(set), expectedSize); in expectItems()
/external/guava/guava-tests/test/com/google/common/collect/
DMinMaxPriorityQueueTest.java71 .expectedSize(8) in testCreation_expectedSize()
81 .expectedSize(8) in testCreation_expectedSize_comparator()
109 .expectedSize(8) in testCreation_expectedSize_maximumSize()
141 .expectedSize(8) in testCreation_expectedSize_withContents()
164 .expectedSize(8) in testCreation_allOptions()
189 MinMaxPriorityQueue.expectedSize(heapSize).create(); in testHeapIntact()
471 MinMaxPriorityQueue.expectedSize(5).create(); in testRemoveFromStringHeap()
503 Ordering.natural().reverse()).expectedSize(5).create(); in testCreateWithCapacityAndOrdering()
551 MinMaxPriorityQueue.expectedSize(heapSize).create(); in testRemoveAt()
DAbstractTableReadTest.java50 protected void assertSize(int expectedSize) { in assertSize() argument
51 assertEquals(expectedSize, table.size()); in assertSize()
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
DAbstractTableReadTest.java48 protected void assertSize(int expectedSize) { in assertSize() argument
49 assertEquals(expectedSize, table.size()); in assertSize()
/external/apache-commons-math/src/main/java/org/apache/commons/math/linear/
DOpenMapRealVector.java97 public OpenMapRealVector(int dimension, int expectedSize) { in OpenMapRealVector() argument
98 this(dimension, expectedSize, DEFAULT_ZERO_TOLERANCE); in OpenMapRealVector()
107 public OpenMapRealVector(int dimension, int expectedSize, double epsilon) { in OpenMapRealVector() argument
109 entries = new OpenIntToDoubleHashMap(expectedSize, 0.0); in OpenMapRealVector()
/external/deqp/external/vulkancts/modules/vulkan/image/
DvktImageSizeTests.cpp328 const tcu::IVec3 expectedSize = getExpectedImageSizeResult(m_texture); in iterate() local
330 if (resultSize != expectedSize) in iterate()
331 …return tcu::TestStatus::fail("Incorrect imageSize(): expected " + de::toString(expectedSize) + " b… in iterate()
/external/deqp/modules/gles3/functional/
Des3fShaderTextureFunctionTests.cpp969 tcu::IVec3 expectedSize; member
1166 …sage << "Expecting: " << testSize.expectedSize.x() << "x" << testSize.expectedSize.y() << "x" << t… in testTextureSize()
1168 gl.uniform3iv(sizeLoc, 1, testSize.expectedSize.m_data); in testTextureSize()
1180 …() << TestLog::Message << "Expecting: " << testSize.expectedSize.x() << "x" << testSize.expectedSi… in testTextureSize()
1182 gl.uniform2iv(sizeLoc, 1, testSize.expectedSize.m_data); in testTextureSize()
1191 …tcu::IVec3 expectedSize(testSize.expectedSize.x(), testSize.expectedSize.y(), testSize.textureSize… in testTextureSize() local
1195 …() << TestLog::Message << "Expecting: " << testSize.expectedSize.x() << "x" << testSize.expectedSi… in testTextureSize()
1197 gl.uniform3iv(sizeLoc, 1, expectedSize.m_data); in testTextureSize()

12