Home
last modified time | relevance | path

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

12345678910>>...493

/external/guava/guava-tests/test/com/google/common/collect/
DRangeTest.java37 * Unit test for {@link Range}.
44 Range<Integer> range = Range.open(4, 8); in testOpen() local
45 checkContains(range); in testOpen()
46 assertTrue(range.hasLowerBound()); in testOpen()
47 assertEquals(4, (int) range.lowerEndpoint()); in testOpen()
48 assertEquals(OPEN, range.lowerBoundType()); in testOpen()
49 assertTrue(range.hasUpperBound()); in testOpen()
50 assertEquals(8, (int) range.upperEndpoint()); in testOpen()
51 assertEquals(OPEN, range.upperBoundType()); in testOpen()
52 assertFalse(range.isEmpty()); in testOpen()
[all …]
DTreeRangeMapTest.java48 new TestMapGenerator<Range<Integer>, String>() { in suite()
50 public SampleElements<Entry<Range<Integer>, String>> samples() { in suite()
52 mapEntry(Range.singleton(0), "banana"), in suite()
53 mapEntry(Range.closedOpen(3, 5), "frisbee"), in suite()
54 mapEntry(Range.atMost(-1), "fruitcake"), in suite()
55 mapEntry(Range.open(10, 15), "elephant"), in suite()
56 mapEntry(Range.closed(20, 22), "umbrella")); in suite()
60 public Map<Range<Integer>, String> create(Object... elements) { in suite()
64 Entry<Range<Integer>, String> entry = (Entry<Range<Integer>, String>) o; in suite()
72 public Entry<Range<Integer>, String>[] createArray(int length) { in suite()
[all …]
DTreeRangeSetTest.java18 import static com.google.common.collect.Range.range;
37 private static final ImmutableList<Range<Integer>> QUERY_RANGES;
43 ImmutableList.Builder<Range<Integer>> queryBuilder = ImmutableList.builder();
45 queryBuilder.add(Range.<Integer>all()); in all()
49 queryBuilder.add(Range.upTo(i, boundType)); in Range.upTo()
50 queryBuilder.add(Range.downTo(i, boundType)); in Range.downTo()
52 queryBuilder.add(Range.singleton(i)); in Range.singleton()
53 queryBuilder.add(Range.openClosed(i, i)); in Range.openClosed()
54 queryBuilder.add(Range.closedOpen(i, i)); in Range.closedOpen()
59 queryBuilder.add(Range.range(i, lowerBoundType, j, upperBoundType)); in Range.range()
[all …]
DImmutableRangeSetTest.java62 builder.add(Range.singleton(i)); in create()
95 builder.add(Range.closedOpen(i, i.add(BigInteger.ONE))); in create()
136 assertFalse(rangeSet.intersects(Range.singleton(0))); in testEmpty()
137 assertFalse(rangeSet.encloses(Range.singleton(0))); in testEmpty()
145 assertThat(rangeSet.asRanges()).contains(Range.<Integer>all()); in testAll()
147 assertTrue(rangeSet.intersects(Range.singleton(0))); in testAll()
148 assertTrue(rangeSet.intersects(Range.<Integer>all())); in testAll()
149 assertTrue(rangeSet.encloses(Range.<Integer>all())); in testAll()
155 ImmutableRangeSet<Integer> rangeSet = ImmutableRangeSet.of(Range.closedOpen(1, 5)); in testSingleBoundedRange()
157 assertThat(rangeSet.asRanges()).contains(Range.closedOpen(1, 5)); in testSingleBoundedRange()
[all …]
/external/guava/android/guava-tests/test/com/google/common/collect/
DRangeTest.java37 * Unit test for {@link Range}.
44 Range<Integer> range = Range.open(4, 8); in testOpen() local
45 checkContains(range); in testOpen()
46 assertTrue(range.hasLowerBound()); in testOpen()
47 assertEquals(4, (int) range.lowerEndpoint()); in testOpen()
48 assertEquals(OPEN, range.lowerBoundType()); in testOpen()
49 assertTrue(range.hasUpperBound()); in testOpen()
50 assertEquals(8, (int) range.upperEndpoint()); in testOpen()
51 assertEquals(OPEN, range.upperBoundType()); in testOpen()
52 assertFalse(range.isEmpty()); in testOpen()
[all …]
DTreeRangeMapTest.java47 new TestMapGenerator<Range<Integer>, String>() { in suite()
49 public SampleElements<Entry<Range<Integer>, String>> samples() { in suite()
51 mapEntry(Range.singleton(0), "banana"), in suite()
52 mapEntry(Range.closedOpen(3, 5), "frisbee"), in suite()
53 mapEntry(Range.atMost(-1), "fruitcake"), in suite()
54 mapEntry(Range.open(10, 15), "elephant"), in suite()
55 mapEntry(Range.closed(20, 22), "umbrella")); in suite()
59 public Map<Range<Integer>, String> create(Object... elements) { in suite()
63 Entry<Range<Integer>, String> entry = (Entry<Range<Integer>, String>) o; in suite()
71 public Entry<Range<Integer>, String>[] createArray(int length) { in suite()
[all …]
DTreeRangeSetTest.java18 import static com.google.common.collect.Range.range;
37 private static final ImmutableList<Range<Integer>> QUERY_RANGES;
43 ImmutableList.Builder<Range<Integer>> queryBuilder = ImmutableList.builder();
45 queryBuilder.add(Range.<Integer>all()); in all()
49 queryBuilder.add(Range.upTo(i, boundType)); in Range.upTo()
50 queryBuilder.add(Range.downTo(i, boundType)); in Range.downTo()
52 queryBuilder.add(Range.singleton(i)); in Range.singleton()
53 queryBuilder.add(Range.openClosed(i, i)); in Range.openClosed()
54 queryBuilder.add(Range.closedOpen(i, i)); in Range.closedOpen()
59 queryBuilder.add(Range.range(i, lowerBoundType, j, upperBoundType)); in Range.range()
[all …]
DImmutableRangeSetTest.java61 builder.add(Range.singleton(i)); in create()
94 builder.add(Range.closedOpen(i, i.add(BigInteger.ONE))); in create()
135 assertFalse(rangeSet.intersects(Range.singleton(0))); in testEmpty()
136 assertFalse(rangeSet.encloses(Range.singleton(0))); in testEmpty()
144 assertThat(rangeSet.asRanges()).contains(Range.<Integer>all()); in testAll()
146 assertTrue(rangeSet.intersects(Range.singleton(0))); in testAll()
147 assertTrue(rangeSet.intersects(Range.<Integer>all())); in testAll()
148 assertTrue(rangeSet.encloses(Range.<Integer>all())); in testAll()
154 ImmutableRangeSet<Integer> rangeSet = ImmutableRangeSet.of(Range.closedOpen(1, 5)); in testSingleBoundedRange()
156 assertThat(rangeSet.asRanges()).contains(Range.closedOpen(1, 5)); in testSingleBoundedRange()
[all …]
/external/libtextclassifier/native/lang_id/script/
Dapprox-script-data.cc33 65, // Range #0: [65, 90, Latin]
34 97, // Range #1: [97, 122, Latin]
35 170, // Range #2: [170, 170, Latin]
36 186, // Range #3: [186, 186, Latin]
37 192, // Range #4: [192, 214, Latin]
38 216, // Range #5: [216, 246, Latin]
39 248, // Range #6: [248, 696, Latin]
40 736, // Range #7: [736, 740, Latin]
41 746, // Range #8: [746, 747, Bopomofo]
42 880, // Range #9: [880, 883, Greek]
[all …]
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/
DRangeTest.java32 Range r = Range.range(1, 1, 3, 10); in aRangeContainsItself()
38 Range r = Range.range(1, 1, 3, 10); in aRangeDoesNotStrictlyContainsItself()
44 Range r1 = Range.range(1, 1, 3, 10); in overlappingButNotContainedRangesAreNotOnContains()
45 Range r2 = Range.range(2, 1, 7, 10); in overlappingButNotContainedRangesAreNotOnContains()
52 Range r1 = Range.range(1, 1, 3, 10); in overlappingButNotContainedRangesAreNotOnStrictlyContains()
53 Range r2 = Range.range(2, 1, 7, 10); in overlappingButNotContainedRangesAreNotOnStrictlyContains()
60 Range r1 = Range.range(1, 1, 3, 10); in unrelatedRangesAreNotOnContains()
61 Range r2 = Range.range(5, 1, 7, 10); in unrelatedRangesAreNotOnContains()
68 Range r1 = Range.range(1, 1, 3, 10); in unrelatedRangesAreNotOnStrictlyContains()
69 Range r2 = Range.range(5, 1, 7, 10); in unrelatedRangesAreNotOnStrictlyContains()
[all …]
/external/guava/guava/src/com/google/common/collect/
DRangeSet.java25 * A set comprising zero or more {@linkplain Range#isEmpty nonempty}, {@linkplain
26 * Range#isConnected(Range) disconnected} ranges of type {@code C}.
28 * <p>Implementations that choose to support the {@link #add(Range)} operation are required to
33 * rangeSet.add(Range.closed(1, 10)); // {[1, 10]}
34 * rangeSet.add(Range.closedOpen(11, 15)); // disconnected range; {[1, 10], [11, 15)}
35 * rangeSet.add(Range.closedOpen(15, 20)); // connected range; {[1, 10], [11, 20)}
36 * rangeSet.add(Range.openClosed(0, 0)); // empty range; {[1, 10], [11, 20)}
37 * rangeSet.remove(Range.open(5, 10)); // splits [1, 10]; {[1, 5], [10, 10], [11, 20)}
40 * <p>Note that the behavior of {@link Range#isEmpty()} and {@link Range#isConnected(Range)} may not
43 * <p>For a {@link Set} whose contents are specified by a {@link Range}, see {@link ContiguousSet}.
[all …]
DTreeRangeSet.java46 @VisibleForTesting final NavigableMap<Cut<C>, Range<C>> rangesByLowerBound;
50 return new TreeRangeSet<C>(new TreeMap<Cut<C>, Range<C>>()); in create()
53 /** Returns a {@code TreeRangeSet} initialized with the ranges in the specified range set. */
65 * one {@code Range} in {@code ranges}.
69 public static <C extends Comparable<?>> TreeRangeSet<C> create(Iterable<Range<C>> ranges) { in create()
75 private TreeRangeSet(NavigableMap<Cut<C>, Range<C>> rangesByLowerCut) { in TreeRangeSet()
79 private transient @Nullable Set<Range<C>> asRanges;
80 private transient @Nullable Set<Range<C>> asDescendingSetOfRanges;
83 public Set<Range<C>> asRanges() { in asRanges()
84 Set<Range<C>> result = asRanges; in asRanges()
[all …]
DTreeRangeMap.java67 extends AbstractMapEntry<Range<K>, V> {
68 private final Range<K> range; field in TreeRangeMap.RangeMapEntry
72 this(Range.create(lowerBound, upperBound), value); in RangeMapEntry()
75 RangeMapEntry(Range<K> range, V value) { in RangeMapEntry() argument
76 this.range = range; in RangeMapEntry()
81 public Range<K> getKey() { in getKey()
82 return range; in getKey()
91 return range.contains(value); in contains()
95 return range.lowerBound; in getLowerBound()
99 return range.upperBound; in getUpperBound()
[all …]
DRangeMap.java31 * with the range (if any) that contains a specified key.
34 * Range#isConnected(Range) connected} ranges, even if they are mapped to the same value.
46 * <p>Specifically, if any range in this range map contains the specified key, the value
47 * associated with that range is returned.
53 * Returns the range containing this key and its associated value, if such a range is present in
54 * the range map, or {@code null} otherwise.
57 Entry<Range<K>, V> getEntry(K key); in getEntry()
60 * Returns the minimal range {@linkplain Range#encloses(Range) enclosing} the ranges in this
63 * @throws NoSuchElementException if this range map is empty
65 Range<K> span(); in span()
[all …]
/external/guava/android/guava/src/com/google/common/collect/
DRangeSet.java25 * A set comprising zero or more {@linkplain Range#isEmpty nonempty}, {@linkplain
26 * Range#isConnected(Range) disconnected} ranges of type {@code C}.
28 * <p>Implementations that choose to support the {@link #add(Range)} operation are required to
33 * rangeSet.add(Range.closed(1, 10)); // {[1, 10]}
34 * rangeSet.add(Range.closedOpen(11, 15)); // disconnected range; {[1, 10], [11, 15)}
35 * rangeSet.add(Range.closedOpen(15, 20)); // connected range; {[1, 10], [11, 20)}
36 * rangeSet.add(Range.openClosed(0, 0)); // empty range; {[1, 10], [11, 20)}
37 * rangeSet.remove(Range.open(5, 10)); // splits [1, 10]; {[1, 5], [10, 10], [11, 20)}
40 * <p>Note that the behavior of {@link Range#isEmpty()} and {@link Range#isConnected(Range)} may not
43 * <p>For a {@link Set} whose contents are specified by a {@link Range}, see {@link ContiguousSet}.
[all …]
DTreeRangeSet.java46 @VisibleForTesting final NavigableMap<Cut<C>, Range<C>> rangesByLowerBound;
50 return new TreeRangeSet<C>(new TreeMap<Cut<C>, Range<C>>()); in create()
53 /** Returns a {@code TreeRangeSet} initialized with the ranges in the specified range set. */
65 * one {@code Range} in {@code ranges}.
69 public static <C extends Comparable<?>> TreeRangeSet<C> create(Iterable<Range<C>> ranges) { in create()
75 private TreeRangeSet(NavigableMap<Cut<C>, Range<C>> rangesByLowerCut) { in TreeRangeSet()
79 @NullableDecl private transient Set<Range<C>> asRanges;
80 @NullableDecl private transient Set<Range<C>> asDescendingSetOfRanges;
83 public Set<Range<C>> asRanges() { in asRanges()
84 Set<Range<C>> result = asRanges; in asRanges()
[all …]
DTreeRangeMap.java66 extends AbstractMapEntry<Range<K>, V> {
67 private final Range<K> range; field in TreeRangeMap.RangeMapEntry
71 this(Range.create(lowerBound, upperBound), value); in RangeMapEntry()
74 RangeMapEntry(Range<K> range, V value) { in RangeMapEntry() argument
75 this.range = range; in RangeMapEntry()
80 public Range<K> getKey() { in getKey()
81 return range; in getKey()
90 return range.contains(value); in contains()
94 return range.lowerBound; in getLowerBound()
98 return range.upperBound; in getUpperBound()
[all …]
DRangeMap.java30 * with the range (if any) that contains a specified key.
33 * Range#isConnected(Range) connected} ranges, even if they are mapped to the same value.
45 * <p>Specifically, if any range in this range map contains the specified key, the value
46 * associated with that range is returned.
52 * Returns the range containing this key and its associated value, if such a range is present in
53 * the range map, or {@code null} otherwise.
56 Entry<Range<K>, V> getEntry(K key); in getEntry()
59 * Returns the minimal range {@linkplain Range#encloses(Range) enclosing} the ranges in this
62 * @throws NoSuchElementException if this range map is empty
64 Range<K> span(); in span()
[all …]
/external/chromium-trace/catapult/third_party/polymer/components/iron-range-behavior/test/
Dbasic.html14 <title>iron-range-behavior</title>
34 var range;
37 range = fixture('trivialRange');
41 assert.equal(range.min, 0);
42 assert.equal(range.max, 100);
43 assert.equal(range.value, 0);
47 range.value = 50;
49 assert.equal(range.value, 50);
51 range.value = 60.1;
53 assert.equal(range.value, 60);
[all …]
/external/llvm-project/clang/test/CodeGen/
Dbuiltins-mips-msa-error.c34 …6u8_a, 32); // expected-error {{argument value 32 is outside the valid range [0, 31]}} in test()
35 …u16_a, 32); // expected-error {{argument value 32 is outside the valid range [0, 31]}} in test()
36 …u32_a, 32); // expected-error {{argument value 32 is outside the valid range [0, 31]}} in test()
37 …u64_a, 32); // expected-error {{argument value 32 is outside the valid range [0, 31]}} in test()
39 …_a, 256); // expected-error {{argument value 256 is outside the valid range [0, 255]}} in test()
40 …_a, 256); // expected-error {{argument value 256 is outside the valid range [0, 255]}} in test()
41 …_a, 256); // expected-error {{argument value 256 is outside the valid range [0, 255]}} in test()
42 …_a, 256); // expected-error {{argument value 256 is outside the valid range [0, 255]}} in test()
44 …v16i8_a, 8); // expected-error {{argument value 8 is outside the valid range [0, 7]}} in test()
45 …i16_a, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}} in test()
[all …]
/external/rust/crates/managed/src/
Dmap.rs11 Range as BTreeRange};
16 Range as BTreeRange};
106 pub struct Range<'a, K: 'a, V: 'a>(RangeInner<'a, K, V>); struct
108 impl<'a, K: 'a, V: 'a> Iterator for Range<'a, K, V> { implementation
125 RangeInner::Owned(ref mut range) => range.next(), in next()
130 impl<'a, K: 'a, V: 'a> DoubleEndedIterator for Range<'a, K, V> { implementation
145 RangeInner::Owned(ref mut range) => range.next_back(), in next_back()
150 fn binary_search_by_key_range<'a, K, V, Q: 'a, R>(slice: &[Option<(K, V)>], range: R) -> Result<(us… in binary_search_by_key_range()
169 if let Bound::Unbounded = range.start_bound() { in binary_search_by_key_range()
174 match &range.start_bound() { in binary_search_by_key_range()
[all …]
/external/python/cpython3/Lib/test/
Dtest_range.py47 self.assertEqual(list(range(3)), [0, 1, 2])
48 self.assertEqual(list(range(1, 5)), [1, 2, 3, 4])
49 self.assertEqual(list(range(0)), [])
50 self.assertEqual(list(range(-3)), [])
51 self.assertEqual(list(range(1, 10, 3)), [1, 4, 7])
52 self.assertEqual(list(range(5, -5, -3)), [5, 2, -1, -4])
58 self.assertEqual(list(range(a, a+2)), [a, a+1])
59 self.assertEqual(list(range(a+2, a, -1)), [a+2, a+1])
60 self.assertEqual(list(range(a+4, a, -2)), [a+4, a+2])
62 seq = list(range(a, b, c))
[all …]
/external/XNNPACK/bench/
Df32-sigmoid.cc29 const size_t elements = state.range(0); in f32_sigmoid()
61 ->Range(1000, 1000000)
65 ->Range(1000, 1000000)
69 ->Range(1000, 1000000)
73 ->Range(1000, 1000000)
77 ->Range(1000, 1000000)
81 ->Range(1000, 1000000)
86 ->Range(1000, 1000000)
90 ->Range(1000, 1000000)
94 ->Range(1000, 1000000)
[all …]
/external/libchrome/ui/gfx/range/
Drange.h16 #include "ui/gfx/range/gfx_range_export.h"
32 // A Range contains two integer values that represent a numeric range, like the
33 // range of characters in a text selection. A range is made of a start and end
34 // position; when they are the same, the Range is akin to a caret. Note that
36 // range.
37 class GFX_RANGE_EXPORT Range {
39 // Creates an empty range {0,0}.
40 constexpr Range() : Range(0) {} in Range() function
42 // Initializes the range with a start and end.
43 constexpr Range(uint32_t start, uint32_t end) : start_(start), end_(end) {} in Range() function
[all …]
/external/skia/tests/sksl/errors/
DArrayIndexOutOfRange.glsl3 error: 3: index -1 out of range for 'int[123]'
4 error: 6: index 123 out of range for 'half4x4[123]'
5 error: 7: index 1000000000 out of range for 'int4[123]'
6 error: 8: index 3000000000 out of range for 'half3[123]'
8 error: 11: index -1 out of range for 'Block[]'
9 error: 14: index 3000000000 out of range for 'Block[]'
11 error: 17: index -1 out of range for 'half4'
12 error: 22: index 4 out of range for 'half4'
13 error: 23: index 1000000000 out of range for 'half4'
14 error: 25: index -1 out of range for 'half3'
[all …]

12345678910>>...493