Home
last modified time | relevance | path

Searched refs:comparator (Results 1 – 25 of 112) sorted by relevance

12345

/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DIterableComparator.java19 private final Comparator<T> comparator; field in IterableComparator
26 public IterableComparator(Comparator<T> comparator) { in IterableComparator() argument
27 this(comparator, true); in IterableComparator()
30 public IterableComparator(Comparator<T> comparator, boolean shorterFirst) { in IterableComparator() argument
31 this.comparator = comparator; in IterableComparator()
54 …int result = comparator != null ? comparator.compare(aItem, bItem) : ((Comparable<T>)aItem).compar… in compare()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/
DIterableComparator.java21 private final Comparator<T> comparator; field in IterableComparator
28 public IterableComparator(Comparator<T> comparator) { in IterableComparator() argument
29 this(comparator, true); in IterableComparator()
32 public IterableComparator(Comparator<T> comparator, boolean shorterFirst) { in IterableComparator() argument
33 this.comparator = comparator; in IterableComparator()
56 …int result = comparator != null ? comparator.compare(aItem, bItem) : ((Comparable<T>)aItem).compar… in compare()
/third_party/libphonenumber/metadata/src/main/java/com/google/i18n/phonenumbers/metadata/table/
DMultiValue.java63 private final Comparator<Iterable<T>> comparator; field in MultiValue
66 String s, Function<String, T> fn, char separator, Comparator<T> comparator, boolean sorted) { in MultiValue() argument
67 this(parse(s, fn, separator), separator, comparator, sorted); in MultiValue()
71 Iterable<T> values, char separator, Comparator<T> comparator, boolean sorted) { in MultiValue() argument
74 sorted ? ImmutableSortedSet.copyOf(comparator, values) : ImmutableSet.copyOf(values); in MultiValue()
75 this.comparator = Comparators.lexicographical(comparator); in MultiValue()
94 return comparator.compare(this.getValues(), that.getValues()); in compareTo()
/third_party/flutter/flutter/packages/flutter_test/test/
Dgoldens_test.dart61 final LocalFileComparator comparator = goldenFileComparator;
62 expect(comparator.basedir.path, contains('flutter_test'));
67 LocalFileComparator comparator;
70comparator = LocalFileComparator(fs.file(fix('/golden_test.dart')).uri, pathStyle: fs.path.style);
74 expect(comparator.basedir, fs.file(fix('/')).uri);
75comparator = LocalFileComparator(fs.file(fix('/foo/bar/golden_test.dart')).uri, pathStyle: fs.path…
76 expect(comparator.basedir, fs.directory(fix('/foo/bar/')).uri);
80 comparator = LocalFileComparator(Uri.parse('foo_test.dart'), pathStyle: fs.path.style);
81 expect(comparator.basedir, Uri.parse('./'));
87 return comparator.compare(
[all …]
Dmatchers_test.dart314 _FakeComparator comparator;
324 comparator = _FakeComparator();
325 goldenFileComparator = comparator;
330 testWidgets('if comparator succeeds', (WidgetTester tester) async {
334 expect(comparator.invocation, _ComparatorInvocation.compare);
335 expect(comparator.imageBytes, hasLength(greaterThan(0)));
336 expect(comparator.golden, Uri.parse('foo.png'));
341 testWidgets('if comparator returns false', (WidgetTester tester) async {
342 comparator.behavior = _ComparatorBehavior.returnFalse;
349 expect(comparator.invocation, _ComparatorInvocation.compare);
[all …]
/third_party/boost/libs/locale/doc/
Dcollation.txt24 …tor::hash() "hash", or indirectly by using the \ref boost::locale::comparator "comparator" template
36 To get similar functionality with comparison levels, you must use the comparator class.
39 std::map<std::string,std::string,comparator<char,collator_base::secondary> > strings;
43 …ific locale or level when creating and using the \ref boost::locale::comparator "comparator" class:
46 comparator<char> comp(some_locale,some_level);
47 std::map<std::string,std::string,comparator<char> > strings(comp);
/third_party/flutter/flutter/packages/flutter_goldens/test/
Dflutter_goldens_test.dart106 FlutterGoldensRepositoryFileComparator comparator;
117 comparator = FlutterGoldensRepositoryFileComparator(
127 await comparator.compare(Uint8List.fromList(<int>[1, 2, 3]), Uri.parse('test.png'));
138 …final bool result = await comparator.compare(Uint8List.fromList(<int>[1, 2, 3]), Uri.parse('test.p…
146 …final bool result = await comparator.compare(Uint8List.fromList(<int>[1, 2, 3]), Uri.parse('test.p…
155 await comparator.update(Uri.parse('test.png'), Uint8List.fromList(<int>[1, 2, 3]));
164 await comparator.update(Uri.parse('test.png'), Uint8List.fromList(<int>[1, 2, 3]));
171 final Uri key = comparator.getTestUri(Uri.parse('foo.png'), 1);
175 final Uri key = comparator.getTestUri(Uri.parse('foo.png'), null);
182 FlutterSkiaGoldFileComparator comparator;
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/
Dtopk_cpu_kernel.cc55 const std::function<bool(size_t, size_t)> comparator = [input](size_t index_1, size_t index_2) { in LaunchKernel() local
62 (void)tasks.emplace_back([this, i, k_num, &comparator, input, workspace, indices, output]() { in LaunchKernel()
72 std::stable_sort(idx, idx + inner_size_, comparator); in LaunchKernel()
74 std::nth_element(idx, idx + SizeToLong(k_num), idx + inner_size_, comparator); in LaunchKernel()
75 std::stable_sort(idx, idx + SizeToLong(k_num), comparator); in LaunchKernel()
78 std::nth_element(idx, idx + SizeToLong(k_num), idx + inner_size_, comparator); in LaunchKernel()
Dsort_cpu_kernel.cc73 std::function<bool(size_t, size_t)> comparator; in Launch() local
75comparator = [&input](size_t index_1, size_t index_2) { return input[index_1] > input[index_2]; }; in Launch()
77comparator = [&input](size_t index_1, size_t index_2) { return input[index_1] < input[index_2]; }; in Launch()
84 auto task = [this, i, j, ids_addr, input, indices, output, &comparator]() { in Launch()
94 std::stable_sort(idx, idx + iter.AxisSize(), comparator); in Launch()
/third_party/flutter/flutter/packages/flutter_test/lib/src/
Dgoldens.dart15 /// Instances of this comparator will be used as the backend for
18 /// Instances of this comparator will be invoked by the test framework in the
28 /// by the comparator.
30 /// In the case of comparison mismatch, the comparator may choose to throw a
72 /// This comparator is used as the backend for [matchesGoldenFile].
74 /// When using `flutter test`, a comparator implemented by [LocalFileComparator]
75 /// is used if no other comparator is specified. It treats the golden key as
83 /// When using `flutter run`, the default comparator ([TrivialComparator])
87 /// Callers may choose to override the default comparator by setting this to a
88 /// custom comparator during test set-up (or using directory-level test
[all …]
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/collator/
DCounter.java28 Comparator<T> comparator; field in Counter
34 public Counter(Comparator<T> comparator) { in Counter() argument
35 if (comparator != null) { in Counter()
36 this.comparator = comparator; in Counter()
37 map = new TreeMap<T, RWLong>(comparator); in Counter()
148 Set<T> s = new TreeSet<T>(comparator); in getKeysetSortedByKey()
/third_party/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/
DCounter.java25 Comparator<T> comparator; field in Counter
31 public Counter(Comparator<T> comparator) { in Counter() argument
32 if (comparator != null) { in Counter()
33 this.comparator = comparator; in Counter()
34 map = new TreeMap<T, RWLong>(comparator); in Counter()
145 Set<T> s = new TreeSet<T>(comparator); in getKeysetSortedByKey()
/third_party/boost/boost/geometry/algorithms/detail/
Doccupation_info.hpp79 geometry::equal_to<RobustPoint> comparator; in add() local
80 if (comparator(incoming_point, intersection_point)) in add()
84 if (comparator(outgoing_point, intersection_point)) in add()
193 geometry::equal_to<RobustPoint> comparator; in add_incoming_and_outgoing_angles() local
201 while(comparator(pieces[piece_index].robust_ring[index], intersection_point)) in add_incoming_and_outgoing_angles()
/third_party/protobuf/src/google/protobuf/
Ddynamic_message.h169 MapEntryMessageComparator comparator(field->message_type()); in Sort()
170 std::stable_sort(result.begin(), result.end(), comparator); in Sort()
174 if (!comparator(result[j - 1], result[j])) { in Sort()
175 GOOGLE_LOG(ERROR) << (comparator(result[j], result[j - 1]) in Sort()
/third_party/typescript/tests/baselines/reference/
DneverInference.types30 comparator: Comparator<T>,
31 >comparator : Comparator<T>
48 declare function mkList<T>(items: T[], comparator: Comparator<T>): LinkedList<T>;
49 >mkList : <T>(items: T[], comparator: Comparator<T>) => LinkedList<T>
51 >comparator : Comparator<T>
56 >mkList : <T>(items: T[], comparator: Comparator<T>) => LinkedList<T>
DneverInference.symbols35 comparator: Comparator<T>,
36 >comparator : Symbol(LinkedList.comparator, Decl(neverInference.ts, 11, 25))
60 declare function mkList<T>(items: T[], comparator: Comparator<T>): LinkedList<T>;
65 >comparator : Symbol(comparator, Decl(neverInference.ts, 19, 38))
/third_party/node/deps/npm/node_modules/lodash._baseuniq/
Dindex.js53 function arrayIncludesWith(array, value, comparator) { argument
58 if (comparator(value, array[index])) {
570 function baseUniq(array, iteratee, comparator) { argument
578 if (comparator) {
599 value = (comparator || value !== 0) ? value : 0;
612 else if (!includes(seen, computed, comparator)) {
/third_party/skia/third_party/externals/brotli/c/enc/
Dentropy_encode.h84 const size_t n, HuffmanTreeComparator comparator) { in SortHuffmanTreeItems() argument
92 while (comparator(&tmp, &items[j])) { in SortHuffmanTreeItems()
109 for (; j >= gap && comparator(&tmp, &items[j - gap]); j -= gap) { in SortHuffmanTreeItems()
/third_party/node/deps/brotli/c/enc/
Dentropy_encode.h84 const size_t n, HuffmanTreeComparator comparator) { in SortHuffmanTreeItems() argument
92 while (comparator(&tmp, &items[j])) { in SortHuffmanTreeItems()
109 for (; j >= gap && comparator(&tmp, &items[j - gap]); j -= gap) { in SortHuffmanTreeItems()
/third_party/node/lib/internal/
Dpriority_queue.js20 constructor(comparator, setPosition) { argument
21 if (comparator !== undefined)
22 this[kCompare] = comparator;
/third_party/node/deps/npm/node_modules/lodash.uniq/
Dindex.js64 function arrayIncludesWith(array, value, comparator) { argument
69 if (comparator(value, array[index])) {
632 function baseUniq(array, iteratee, comparator) { argument
640 if (comparator) {
661 value = (comparator || value !== 0) ? value : 0;
674 else if (!includes(seen, computed, comparator)) {
/third_party/typescript/src/compiler/
Dsemver.ts362 for (const comparator of comparators) { constant
363 if (!testComparator(version, comparator.operator, comparator.operand)) return false;
388 function formatComparator(comparator: Comparator) {
389 return `${comparator.operator}${comparator.operand}`;
/third_party/typescript/tests/cases/conformance/types/never/
DneverInference.ts17 comparator: Comparator<T>,
24 declare function mkList<T>(items: T[], comparator: Comparator<T>): LinkedList<T>;
/third_party/node/deps/npm/node_modules/lodash.without/
Dindex.js84 function arrayIncludesWith(array, value, comparator) { argument
89 if (comparator(value, array[index])) {
656 function baseDifference(array, values, iteratee, comparator) { argument
670 if (comparator) {
684 value = (comparator || value !== 0) ? value : 0;
694 else if (!includes(values, computed, comparator)) {
/third_party/node/deps/npm/node_modules/lodash.union/
Dindex.js86 function arrayIncludesWith(array, value, comparator) { argument
91 if (comparator(value, array[index])) {
742 function baseUniq(array, iteratee, comparator) { argument
750 if (comparator) {
771 value = (comparator || value !== 0) ? value : 0;
784 else if (!includes(seen, computed, comparator)) {

12345