Home
last modified time | relevance | path

Searched full:sorted (Results 1 – 25 of 11652) sorted by relevance

12345678910>>...467

/aosp_15_r20/frameworks/minikin/tests/unittest/
H A DSortedPackedVectorTest.cpp25 auto sorted = SortedPackedVector({1, 2, 3, 4, 5}); in TEST() local
26 EXPECT_EQ(5u, sorted.size()); in TEST()
27 EXPECT_EQ(1, sorted[0]); in TEST()
28 EXPECT_EQ(2, sorted[1]); in TEST()
29 EXPECT_EQ(3, sorted[2]); in TEST()
30 EXPECT_EQ(4, sorted[3]); in TEST()
31 EXPECT_EQ(5, sorted[4]); in TEST()
34 auto sorted = SortedPackedVector({1, 2, 3, 4, 5}, true); in TEST() local
35 EXPECT_EQ(5u, sorted.size()); in TEST()
36 EXPECT_EQ(1, sorted[0]); in TEST()
[all …]
/aosp_15_r20/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
H A DSortedOpTest.java62 // Clear the SORTED flag in testRefStreamTooLarge()
64 .sorted(); in testRefStreamTooLarge()
71 // Clear the SORTED flag in testIntStreamTooLarge()
73 .sorted(); in testIntStreamTooLarge()
80 // Clear the SORTED flag in testLongStreamTooLarge()
82 .sorted(); in testLongStreamTooLarge()
89 // Clear the SORTED flag in testDoubleStreamTooLarge()
91 .sorted(); in testDoubleStreamTooLarge()
123 assertCountSum(countTo(0).stream().sorted(), 0, 0); in testSorted()
124 assertCountSum(countTo(10).stream().sorted(), 10, 55); in testSorted()
[all …]
H A DIntPrimitiveOpsTests.java98 .hasCharacteristics(Spliterator.SORTED | Spliterator.DISTINCT)); in testFlags()
100 .hasCharacteristics(Spliterator.SORTED)); in testFlags()
105 .hasCharacteristics(Spliterator.SORTED | Spliterator.DISTINCT)); in testFlags()
107 .hasCharacteristics(Spliterator.SORTED)); in testFlags()
112 .hasCharacteristics(Spliterator.SORTED | Spliterator.DISTINCT)); in testFlags()
114 .hasCharacteristics(Spliterator.SORTED)); in testFlags()
139 int[] array = Arrays.stream(content).sorted().toArray(); in testSort()
144 int[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort()
153 assertEquals(IntStream.range(0, 10).sorted().distinct().toArray(), range); in testSortDistinct()
154 assertEquals(IntStream.range(0, 10).parallel().sorted().distinct().toArray(), range); in testSortDistinct()
[all …]
/aosp_15_r20/external/python/cpython2/Doc/howto/
Dsorting.rst11 in-place. There is also a :func:`sorted` built-in function that builds a new
12 sorted list from an iterable.
20 A simple ascending sort is very easy: just call the :func:`sorted` function. It
21 returns a new sorted list::
23 >>> sorted([5, 2, 3, 1, 4])
28 than :func:`sorted` - but if you don't need the original list, it's slightly
37 lists. In contrast, the :func:`sorted` function accepts any iterable.
39 >>> sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'})
45 Starting with Python 2.4, both :meth:`list.sort` and :func:`sorted` added a
51 >>> sorted("This is a test string from Andrew".split(), key=str.lower)
[all …]
/aosp_15_r20/libcore/ojluni/src/main/java/java/util/
H A DDualPivotQuicksort.java150 * @param a the array to be sorted
152 * @param low the index of the first element, inclusive, to be sorted
153 * @param high the index of the last element, exclusive, to be sorted
172 * @param a the array to be sorted
175 * @param low the index of the first element, inclusive, to be sorted
176 * @param high the index of the last element, exclusive, to be sorted
200 * parts are nearly sorted and then merge runs. in sort()
277 * Use the first and fifth of the five sorted elements as in sort()
285 * The first and the last elements to be sorted are moved in sort()
362 * Use the third of the five sorted elements as the pivot. in sort()
[all …]
H A DSortedSet.java31 * ordering}, or by a {@link Comparator} typically provided at sorted
37 * <p>All elements inserted into a sorted set must implement the {@code Comparable}
42 * the sorted set. Attempts to violate this restriction will cause the
46 * <p>Note that the ordering maintained by a sorted set (whether or not an
48 * the sorted set is to correctly implement the {@code Set} interface. (See
52 * operation, but a sorted set performs all element comparisons using its
54 * deemed equal by this method are, from the standpoint of the sorted set,
55 * equal. The behavior of a sorted set <i>is</i> well-defined even if its
59 * <p>All general-purpose sorted set implementation classes should
61 * constructor, which creates an empty sorted set sorted according to
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/18/libcore/ojluni/src/main/java/java/util/
DDualPivotQuicksort.java150 * @param a the array to be sorted
152 * @param low the index of the first element, inclusive, to be sorted
153 * @param high the index of the last element, exclusive, to be sorted
172 * @param a the array to be sorted
175 * @param low the index of the first element, inclusive, to be sorted
176 * @param high the index of the last element, exclusive, to be sorted
200 * parts are nearly sorted and then merge runs. in sort()
277 * Use the first and fifth of the five sorted elements as in sort()
285 * The first and the last elements to be sorted are moved in sort()
362 * Use the third of the five sorted elements as the pivot. in sort()
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/gensrcs/libcore/ojluni/src/main/java/java/util/
DDualPivotQuicksort.java150 * @param a the array to be sorted
152 * @param low the index of the first element, inclusive, to be sorted
153 * @param high the index of the last element, exclusive, to be sorted
172 * @param a the array to be sorted
175 * @param low the index of the first element, inclusive, to be sorted
176 * @param high the index of the last element, exclusive, to be sorted
200 * parts are nearly sorted and then merge runs. in sort()
277 * Use the first and fifth of the five sorted elements as in sort()
285 * The first and the last elements to be sorted are moved in sort()
362 * Use the third of the five sorted elements as the pivot. in sort()
[all …]
DSortedSet.java31 * ordering}, or by a {@link Comparator} typically provided at sorted
37 * <p>All elements inserted into a sorted set must implement the {@code Comparable}
42 * the sorted set. Attempts to violate this restriction will cause the
46 * <p>Note that the ordering maintained by a sorted set (whether or not an
48 * the sorted set is to correctly implement the {@code Set} interface. (See
52 * operation, but a sorted set performs all element comparisons using its
54 * deemed equal by this method are, from the standpoint of the sorted set,
55 * equal. The behavior of a sorted set <i>is</i> well-defined even if its
59 * <p>All general-purpose sorted set implementation classes should
61 * constructor, which creates an empty sorted set sorted according to
[all …]
DSortedMap.java32 * provided at sorted map creation time. This order is reflected when
33 * iterating over the sorted map's collection views (returned by the
38 * <p>All keys inserted into a sorted map must implement the {@code Comparable}
43 * the sorted map. Attempts to violate this restriction will cause the
47 * <p>Note that the ordering maintained by a sorted map (whether or not an
49 * the sorted map is to correctly implement the {@code Map} interface. (See
53 * operation, but a sorted map performs all key comparisons using its
55 * deemed equal by this method are, from the standpoint of the sorted map,
60 * <p>All general-purpose sorted map implementation classes should provide four
63 * expected "standard" constructors for all sorted map implementations are:
[all …]
/aosp_15_r20/external/python/cpython3/Doc/howto/
Dsorting.rst11 in-place. There is also a :func:`sorted` built-in function that builds a new
12 sorted list from an iterable.
20 A simple ascending sort is very easy: just call the :func:`sorted` function. It
21 returns a new sorted list:
25 >>> sorted([5, 2, 3, 1, 4])
30 than :func:`sorted` - but if you don't need the original list, it's slightly
41 lists. In contrast, the :func:`sorted` function accepts any iterable.
45 >>> sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'})
51 Both :meth:`list.sort` and :func:`sorted` have a *key* parameter to specify a
59 >>> sorted("This is a test string from Andrew".split(), key=str.lower)
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/serde_cbor/tests/
Dcanonical.rs29 let mut sorted = expected.clone(); in integer_canonical_sort_order() localVariable
30 sorted.sort(); in integer_canonical_sort_order()
32 assert_eq!(expected, sorted); in integer_canonical_sort_order()
42 let mut sorted = expected.clone(); in string_canonical_sort_order() localVariable
43 sorted.sort(); in string_canonical_sort_order()
45 assert_eq!(expected, sorted); in string_canonical_sort_order()
55 let mut sorted = expected.clone(); in bytes_canonical_sort_order() localVariable
56 sorted.sort(); in bytes_canonical_sort_order()
58 assert_eq!(expected, sorted); in bytes_canonical_sort_order()
65 let mut sorted = expected.clone(); in simple_data_canonical_sort_order() localVariable
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/24/libcore/ojluni/src/main/java/java/util/
DSortedSet.java31 * ordering}, or by a {@link Comparator} typically provided at sorted
37 * <p>All elements inserted into a sorted set must implement the {@code Comparable}
42 * the sorted set. Attempts to violate this restriction will cause the
46 * <p>Note that the ordering maintained by a sorted set (whether or not an
48 * the sorted set is to correctly implement the {@code Set} interface. (See
52 * operation, but a sorted set performs all element comparisons using its
54 * deemed equal by this method are, from the standpoint of the sorted set,
55 * equal. The behavior of a sorted set <i>is</i> well-defined even if its
59 * <p>All general-purpose sorted set implementation classes should
61 * constructor, which creates an empty sorted set sorted according to
[all …]
DSortedMap.java32 * provided at sorted map creation time. This order is reflected when
33 * iterating over the sorted map's collection views (returned by the
38 * <p>All keys inserted into a sorted map must implement the {@code Comparable}
43 * the sorted map. Attempts to violate this restriction will cause the
47 * <p>Note that the ordering maintained by a sorted map (whether or not an
49 * the sorted map is to correctly implement the {@code Map} interface. (See
53 * operation, but a sorted map performs all key comparisons using its
55 * deemed equal by this method are, from the standpoint of the sorted map,
60 * <p>All general-purpose sorted map implementation classes should provide four
63 * expected "standard" constructors for all sorted map implementations are:
[all …]
/aosp_15_r20/external/grpc-grpc/third_party/upb/upb/message/
H A Dmap_sorter.c95 static bool _upb_mapsorter_resize(_upb_mapsorter* s, _upb_sortedmap* sorted, in _upb_mapsorter_resize() argument
97 sorted->start = s->size; in _upb_mapsorter_resize()
98 sorted->pos = sorted->start; in _upb_mapsorter_resize()
99 sorted->end = sorted->start + size; in _upb_mapsorter_resize()
101 if (sorted->end > s->cap) { in _upb_mapsorter_resize()
103 s->cap = upb_Log2CeilingSize(sorted->end); in _upb_mapsorter_resize()
109 s->size = sorted->end; in _upb_mapsorter_resize()
114 const upb_Map* map, _upb_sortedmap* sorted) { in _upb_mapsorter_pushmap() argument
118 if (!_upb_mapsorter_resize(s, sorted, map_size)) return false; in _upb_mapsorter_pushmap()
121 const void** dst = &s->entries[sorted->start]; in _upb_mapsorter_pushmap()
[all …]
/aosp_15_r20/external/angle/src/libANGLE/renderer/metal/
H A Dgen_mtl_format_table.py441 for angle_format in sorted(angle_to_mtl.keys()):
443 for angle_format in sorted(angle_override.keys()):
448 for angle_format in sorted(mac_specific_map.keys()):
451 for angle_format in sorted(mac_override.keys()):
454 for angle_format in sorted(override_bc1.keys()):
462 for angle_format in sorted(mac_override_es3.keys()):
469 for angle_format in sorted(sim_specific_map.keys()):
472 for angle_format in sorted(sim_override.keys()):
476 for angle_format in sorted(astc_tpl_map.keys()):
481 for angle_format in sorted(astc_tpl_map.keys()):
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/grpcio-sys/grpc/third_party/upb/upb/collections/
Dmap_sorter.c105 static bool _upb_mapsorter_resize(_upb_mapsorter* s, _upb_sortedmap* sorted, in _upb_mapsorter_resize() argument
107 sorted->start = s->size; in _upb_mapsorter_resize()
108 sorted->pos = sorted->start; in _upb_mapsorter_resize()
109 sorted->end = sorted->start + size; in _upb_mapsorter_resize()
111 if (sorted->end > s->cap) { in _upb_mapsorter_resize()
112 s->cap = upb_Log2CeilingSize(sorted->end); in _upb_mapsorter_resize()
117 s->size = sorted->end; in _upb_mapsorter_resize()
122 const upb_Map* map, _upb_sortedmap* sorted) { in _upb_mapsorter_pushmap() argument
125 if (!_upb_mapsorter_resize(s, sorted, map_size)) return false; in _upb_mapsorter_pushmap()
128 const void** dst = &s->entries[sorted->start]; in _upb_mapsorter_pushmap()
[all …]
/aosp_15_r20/external/webp/src/utils/
H A Dhuffman_utils.c78 // sorted[code_lengths_size] is a pre-allocated array for sorting symbols
82 uint16_t sorted[]) { in BuildHuffmanTable() argument
86 int symbol; // symbol index in original or sorted table in BuildHuffmanTable()
89 // offsets in sorted table for each length: in BuildHuffmanTable()
94 assert((root_table != NULL && sorted != NULL) || in BuildHuffmanTable()
95 (root_table == NULL && sorted == NULL)); in BuildHuffmanTable()
111 // Generate offsets into sorted symbol table by code length. in BuildHuffmanTable()
124 if (sorted != NULL) { in BuildHuffmanTable()
128 sorted[offset[symbol_code_length]++] = symbol; in BuildHuffmanTable()
137 if (sorted != NULL) { in BuildHuffmanTable()
[all …]
/aosp_15_r20/external/guava/android/guava/src/com/google/common/collect/
H A DImmutableSortedSet.java47 * <p><b>Warning:</b> as with any sorted collection, you are strongly advised not to use a {@link
94 * Returns the empty immutable sorted set.
103 /** Returns an immutable sorted set containing a single element. */
109 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
120 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
131 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
142 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
154 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
178 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
190 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
[all …]
H A DImmutableSortedMultiset.java46 * <p><b>Warning:</b> as with any sorted collection, you are strongly advised not to use a {@link
66 * ImmutableMultiset}. Elements are sorted by the specified comparator.
130 * Returns the empty immutable sorted multiset.
139 /** Returns an immutable sorted multiset containing a single element. */
148 * Returns an immutable sorted multiset containing the given elements sorted by their natural
158 * Returns an immutable sorted multiset containing the given elements sorted by their natural
168 * Returns an immutable sorted multiset containing the given elements sorted by their natural
179 * Returns an immutable sorted multiset containing the given elements sorted by their natural
190 * Returns an immutable sorted multiset containing the given elements sorted by their natural
205 * Returns an immutable sorted multiset containing the given elements sorted by their natural
[all …]
/aosp_15_r20/external/guava/guava/src/com/google/common/collect/
H A DImmutableSortedMultiset.java44 * <p><b>Warning:</b> as with any sorted collection, you are strongly advised not to use a {@link
64 * ImmutableMultiset}. Elements are sorted by the specified comparator.
107 * Returns the empty immutable sorted multiset.
116 /** Returns an immutable sorted multiset containing a single element. */
125 * Returns an immutable sorted multiset containing the given elements sorted by their natural
135 * Returns an immutable sorted multiset containing the given elements sorted by their natural
145 * Returns an immutable sorted multiset containing the given elements sorted by their natural
156 * Returns an immutable sorted multiset containing the given elements sorted by their natural
167 * Returns an immutable sorted multiset containing the given elements sorted by their natural
182 * Returns an immutable sorted multiset containing the given elements sorted by their natural
[all …]
H A DImmutableSortedSet.java50 * <p><b>Warning:</b> as with any sorted collection, you are strongly advised not to use a {@link
70 ImmutableSet.SPLITERATOR_CHARACTERISTICS | Spliterator.SORTED;
98 * Returns the empty immutable sorted set.
107 /** Returns an immutable sorted set containing a single element. */
113 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
124 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
135 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
146 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
158 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
182 * Returns an immutable sorted set containing the given elements sorted by their natural ordering.
[all …]
/aosp_15_r20/external/selinux/libsepol/cil/src/
H A Dcil_binary.h334 * The function is given a structure containing the sorted ibpkeycons and
338 * @param[in] node The cil_sort structure that contains the sorted ibpkeycons.
346 * The function is given a structure containing the sorted ibendportcons and
350 * @param[in] node The cil_sort structure that contains the sorted ibendportcons.
358 * The function is given a structure containing the sorted portcons and
362 * @param[in] node The cil_sort structure that contains the sorted portcons.
370 * The function is given a structure containing the sorted netifcons and
374 * @param[in] node The cil_sort structure that contains the sorted netifcons.
382 * The function is given a structure containing the sorted nodecons and
386 * @param[in] node The cil_sort structure that contains the sorted nodecons.
[all …]
/aosp_15_r20/external/skia/infra/bots/task_drivers/perf_puppeteer_canvas/
H A Dperf_puppeteer_canvas.go273 sorted := make([]float32, len(input))
274 copy(sorted, input)
275 sort.Slice(sorted, func(i, j int) bool {
276 return sorted[i] < sorted[j]
279 avg := computeAverage(sorted)
281 for i := 0; i < len(sorted); i++ {
282 variance += (sorted[i] - avg) * (sorted[i] - avg)
284 stddev := float32(math.Sqrt(float64(variance / float32(len(sorted)))))
286 medIdx := (len(sorted) * 50) / 100
287 percentile90Idx := (len(sorted) * 90) / 100
[all …]
/aosp_15_r20/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
H A DStreamOpFlagsTest.java184 assertTrue(StreamOpFlag.SORTED.isKnown(opsFlags)); in testApplySourceFlags()
185 assertFalse(StreamOpFlag.SORTED.isCleared(opsFlags)); in testApplySourceFlags()
186 assertFalse(StreamOpFlag.SORTED.isPreserved(opsFlags)); in testApplySourceFlags()
194 assertTrue(StreamOpFlag.SORTED.isKnown(streamFlags)); in testApplySourceFlags()
202 assertSpliteratorMask(StreamOpFlag.SORTED.set(), StreamOpFlag.IS_SORTED); in testSpliteratorMask()
203 assertSpliteratorMask(StreamOpFlag.SORTED.clear(), 0); in testSpliteratorMask()
223 assertStreamMask(StreamOpFlag.SORTED.set(), StreamOpFlag.IS_SORTED); in testStreamMask()
224 assertStreamMask(StreamOpFlag.SORTED.clear(), 0); in testStreamMask()
244 assertOpMask(StreamOpFlag.SORTED.set(), StreamOpFlag.IS_SORTED); in testOpMask()
245 assertOpMask(StreamOpFlag.SORTED.clear(), StreamOpFlag.NOT_SORTED); in testOpMask()
[all …]

12345678910>>...467