Home
last modified time | relevance | path

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

12345678910>>...447

/external/guava/guava-tests/test/com/google/common/collect/
DRangeTest.java38 * Unit test for {@link Range}.
45 Range<Integer> range = Range.open(4, 8); in testOpen() local
46 checkContains(range); in testOpen()
47 assertTrue(range.hasLowerBound()); in testOpen()
48 assertEquals(4, (int) range.lowerEndpoint()); in testOpen()
49 assertEquals(OPEN, range.lowerBoundType()); in testOpen()
50 assertTrue(range.hasUpperBound()); in testOpen()
51 assertEquals(8, (int) range.upperEndpoint()); in testOpen()
52 assertEquals(OPEN, range.upperBoundType()); in testOpen()
53 assertFalse(range.isEmpty()); in testOpen()
[all …]
DTreeRangeMapTest.java47 suite.addTest(MapTestSuiteBuilder.using(new TestMapGenerator<Range<Integer>, String>() { in suite()
49 public SampleElements<Entry<Range<Integer>, String>> samples() { in suite()
50 return new SampleElements<Entry<Range<Integer>, String>>( 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()
[all …]
DTreeRangeSetTest.java18 import static com.google.common.collect.Range.range;
36 private static final ImmutableList<Range<Integer>> QUERY_RANGES;
42 ImmutableList.Builder<Range<Integer>> queryBuilder = ImmutableList.builder();
44 queryBuilder.add(Range.<Integer>all()); in all()
48 queryBuilder.add(Range.upTo(i, boundType)); in Range.upTo()
49 queryBuilder.add(Range.downTo(i, boundType)); in Range.downTo()
51 queryBuilder.add(Range.singleton(i)); in Range.singleton()
52 queryBuilder.add(Range.openClosed(i, i)); in Range.openClosed()
53 queryBuilder.add(Range.closedOpen(i, i)); in Range.closedOpen()
58 queryBuilder.add(Range.range(i, lowerBoundType, j, upperBoundType)); in Range.range()
[all …]
DImmutableRangeSetTest.java42 private static final ImmutableSet<Range<Integer>> RANGES = ImmutableSet.of(
43 Range.<Integer>all(),
44 Range.closedOpen(3, 5),
45 Range.singleton(1),
46 Range.lessThan(2),
47 Range.greaterThan(10),
48 Range.atMost(4),
49 Range.atLeast(3),
50 Range.closed(4, 6),
51 Range.closedOpen(1, 3),
[all …]
DGeneralRangeTest.java45 GeneralRange.range(ORDERING, 4, lboundType, 2, uboundType); in testCreateEmptyRangeFails()
55 GeneralRange.range(ORDERING, i, OPEN, i, OPEN); in testCreateEmptyRangeOpenOpenFails()
63 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, CLOSED, i, OPEN); in testCreateEmptyRangeClosedOpenSucceeds() local
65 assertFalse(range.contains(j)); in testCreateEmptyRangeClosedOpenSucceeds()
72 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, OPEN, i, CLOSED); in testCreateEmptyRangeOpenClosedSucceeds() local
74 assertFalse(range.contains(j)); in testCreateEmptyRangeOpenClosedSucceeds()
81 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, CLOSED, i, CLOSED); in testCreateSingletonRangeSucceeds() local
83 assertEquals(Objects.equal(i, j), range.contains(j)); in testCreateSingletonRangeSucceeds()
89 GeneralRange<Integer> range = GeneralRange.range(ORDERING, 3, CLOSED, 3, CLOSED); in testSingletonRange() local
91 assertEquals(ORDERING.compare(i, 3) == 0, range.contains(i)); in testSingletonRange()
[all …]
DContiguousSetTest.java78 ContiguousSet.create(Range.closed(1, 3), integers()), in testEquals()
79 ContiguousSet.create(Range.closedOpen(1, 4), integers()), in testEquals()
80 ContiguousSet.create(Range.openClosed(0, 3), integers()), in testEquals()
81 ContiguousSet.create(Range.open(0, 4), integers()), in testEquals()
82 ContiguousSet.create(Range.closed(1, 3), NOT_EQUAL_TO_INTEGERS), in testEquals()
83 ContiguousSet.create(Range.closedOpen(1, 4), NOT_EQUAL_TO_INTEGERS), in testEquals()
84 ContiguousSet.create(Range.openClosed(0, 3), NOT_EQUAL_TO_INTEGERS), in testEquals()
85 ContiguousSet.create(Range.open(0, 4), NOT_EQUAL_TO_INTEGERS), in testEquals()
90 ContiguousSet.create(Range.closed(Integer.MIN_VALUE, Integer.MAX_VALUE), integers()), in testEquals()
91 ContiguousSet.create(Range.<Integer>all(), integers())); in testEquals()
[all …]
/external/libtextclassifier/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/perf_data_converter/src/quipper/
Daddress_mapper_test.cc19 struct Range { struct
25 Range() : addr(0), size(0), id(0), base_offset(0) {} in Range() function
27 Range(uint64_t addr, uint64_t size, uint64_t id, uint64_t base_offset) in Range() function
37 const Range kMapRanges[] = {
38 Range(0xff000000, 0x100000, 0xdeadbeef, 0),
39 Range(0x00a00000, 0x10000, 0xcafebabe, 0),
40 Range(0x0c000000, 0x1000000, 0x900df00d, 0),
41 Range(0x00001000, 0x30000, 0x9000091e, 0),
51 // Number of regularly-spaced intervals within a mapped range to test.
56 uint64_t GetMappedAddressFromRanges(const Range* ranges, in GetMappedAddressFromRanges()
[all …]
Daddress_mapper.cc30 LOG(ERROR) << "Must allocate a nonzero-length address range."; in MapWithID()
42 MappedRange range; in MapWithID() local
43 range.real_addr = real_addr; in MapWithID()
44 range.size = size; in MapWithID()
45 range.id = id; in MapWithID()
46 range.offset_base = offset_base; in MapWithID()
49 // does not result in one range being completely covered by another. in MapWithID()
51 // First determine the range of mappings that could overlap with the new in MapWithID()
54 // lower_bound returns the first range with starting addr >= |real_addr|. The in MapWithID()
55 // preceding range could also possibly overlap with the new range. in MapWithID()
[all …]
/external/guava/guava/src/com/google/common/collect/
DRangeSet.java25 * A set comprising zero or more {@linkplain Range#isEmpty nonempty},
26 * {@linkplain Range#isConnected(Range) disconnected} ranges of type {@code C}.
28 * <p>Implementations that choose to support the {@link #add(Range)} operation are required to
32 * rangeSet.add(Range.closed(1, 10)); // {[1, 10]}
33 * rangeSet.add(Range.closedOpen(11, 15)); // disconnected range; {[1, 10], [11, 15)}
34 * rangeSet.add(Range.closedOpen(15, 20)); // connected range; {[1, 10], [11, 20)}
35 * rangeSet.add(Range.openClosed(0, 0)); // empty range; {[1, 10], [11, 20)}
36 * rangeSet.remove(Range.open(5, 10)); // splits [1, 10]; {[1, 5], [10, 10], [11, 20)}}</pre>
38 * <p>Note that the behavior of {@link Range#isEmpty()} and {@link Range#isConnected(Range)} may
41 * <p>For a {@link Set} whose contents are specified by a {@link Range}, see {@link ContiguousSet}.
[all …]
DTreeRangeSet.java48 final NavigableMap<Cut<C>, Range<C>> rangesByLowerBound;
54 return new TreeRangeSet<C>(new TreeMap<Cut<C>, Range<C>>()); in create()
58 * Returns a {@code TreeRangeSet} initialized with the ranges in the specified range set.
66 private TreeRangeSet(NavigableMap<Cut<C>, Range<C>> rangesByLowerCut) { in TreeRangeSet()
70 private transient Set<Range<C>> asRanges;
73 public Set<Range<C>> asRanges() { in asRanges()
74 Set<Range<C>> result = asRanges; in asRanges()
78 final class AsRanges extends ForwardingCollection<Range<C>> implements Set<Range<C>> {
80 protected Collection<Range<C>> delegate() { in delegate()
97 public Range<C> rangeContaining(C value) { in rangeContaining()
[all …]
DImmutableRangeSet.java47 new ImmutableRangeSet<Comparable<?>>(ImmutableList.<Range<Comparable<?>>>of());
50 new ImmutableRangeSet<Comparable<?>>(ImmutableList.of(Range.<Comparable<?>>all()));
53 * Returns an empty immutable range set.
61 * Returns an immutable range set containing the single range {@link Range#all()}.
69 * Returns an immutable range set containing the specified single range. If {@link Range#isEmpty()
70 * range.isEmpty()}, this is equivalent to {@link ImmutableRangeSet#of()}.
72 public static <C extends Comparable> ImmutableRangeSet<C> of(Range<C> range) { in of() argument
73 checkNotNull(range); in of()
74 if (range.isEmpty()) { in of()
76 } else if (range.equals(Range.all())) { in of()
[all …]
DImmutableRangeMap.java46 ImmutableList.<Range<Comparable<?>>>of(), ImmutableList.of());
49 * Returns an empty immutable range map.
57 * Returns an immutable range map mapping a single range to a single value.
60 Range<K> range, V value) { in of() argument
61 return new ImmutableRangeMap<K, V>(ImmutableList.of(range), ImmutableList.of(value)); in of()
70 Map<Range<K>, ? extends V> map = rangeMap.asMapOfRanges(); in copyOf()
71 ImmutableList.Builder<Range<K>> rangesBuilder = new ImmutableList.Builder<Range<K>>(map.size()); in copyOf()
73 for (Entry<Range<K>, ? extends V> entry : map.entrySet()) { in copyOf()
81 * Returns a new builder for an immutable range map.
88 * A builder for immutable range maps. Overlapping ranges are prohibited.
[all …]
DRangeMap.java27 * associated with the range (if any) that contains a specified key.
30 * Range#isConnected(Range) connected} ranges, even if they are mapped to the same value.
41 * <p>Specifically, if any range in this range map contains the specified key, the value
42 * associated with that range is returned.
48 * Returns the range containing this key and its associated value, if such a range is present
49 * in the range map, or {@code null} otherwise.
52 Map.Entry<Range<K>, V> getEntry(K key); in getEntry()
55 * Returns the minimal range {@linkplain Range#encloses(Range) enclosing} the ranges
58 * @throws NoSuchElementException if this range map is empty
60 Range<K> span(); in span()
[all …]
DTreeRangeMap.java69 extends AbstractMapEntry<Range<K>, V> {
70 private final Range<K> range; field in TreeRangeMap.RangeMapEntry
74 this(Range.create(lowerBound, upperBound), value); in RangeMapEntry()
77 RangeMapEntry(Range<K> range, V value) { in RangeMapEntry() argument
78 this.range = range; in RangeMapEntry()
83 public Range<K> getKey() { in getKey()
84 return range; in getKey()
93 return range.contains(value); in contains()
97 return range.lowerBound; in getLowerBound()
101 return range.upperBound; in getUpperBound()
[all …]
/external/python/cpython3/Lib/test/
Dtest_range.py46 self.assertEqual(list(range(3)), [0, 1, 2])
47 self.assertEqual(list(range(1, 5)), [1, 2, 3, 4])
48 self.assertEqual(list(range(0)), [])
49 self.assertEqual(list(range(-3)), [])
50 self.assertEqual(list(range(1, 10, 3)), [1, 4, 7])
51 self.assertEqual(list(range(5, -5, -3)), [5, 2, -1, -4])
57 self.assertEqual(list(range(a, a+2)), [a, a+1])
58 self.assertEqual(list(range(a+2, a, -1)), [a+2, a+1])
59 self.assertEqual(list(range(a+4, a, -2)), [a+4, a+2])
61 seq = list(range(a, b, c))
[all …]
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/
DRangeTest.java34 Range r = Range.range(1, 1, 3, 10); in aRangeContainsItself()
40 Range r = Range.range(1, 1, 3, 10); in aRangeDoesNotStrictlyContainsItself()
46 Range r1 = Range.range(1, 1, 3, 10); in overlappingButNotContainedRangesAreNotOnContains()
47 Range r2 = Range.range(2, 1, 7, 10); in overlappingButNotContainedRangesAreNotOnContains()
54 Range r1 = Range.range(1, 1, 3, 10); in overlappingButNotContainedRangesAreNotOnStrictlyContains()
55 Range r2 = Range.range(2, 1, 7, 10); in overlappingButNotContainedRangesAreNotOnStrictlyContains()
62 Range r1 = Range.range(1, 1, 3, 10); in unrelatedRangesAreNotOnContains()
63 Range r2 = Range.range(5, 1, 7, 10); in unrelatedRangesAreNotOnContains()
70 Range r1 = Range.range(1, 1, 3, 10); in unrelatedRangesAreNotOnStrictlyContains()
71 Range r2 = Range.range(5, 1, 7, 10); in unrelatedRangesAreNotOnStrictlyContains()
[all …]
/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
DGeneralRangeTest.java43 GeneralRange.range(ORDERING, 4, lboundType, 2, uboundType); in testCreateEmptyRangeFails()
53 GeneralRange.range(ORDERING, i, OPEN, i, OPEN); in testCreateEmptyRangeOpenOpenFails()
61 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, CLOSED, i, OPEN); in testCreateEmptyRangeClosedOpenSucceeds() local
63 assertFalse(range.contains(j)); in testCreateEmptyRangeClosedOpenSucceeds()
70 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, OPEN, i, CLOSED); in testCreateEmptyRangeOpenClosedSucceeds() local
72 assertFalse(range.contains(j)); in testCreateEmptyRangeOpenClosedSucceeds()
79 GeneralRange<Integer> range = GeneralRange.range(ORDERING, i, CLOSED, i, CLOSED); in testCreateSingletonRangeSucceeds() local
81 assertEquals(Objects.equal(i, j), range.contains(j)); in testCreateSingletonRangeSucceeds()
87 GeneralRange<Integer> range = GeneralRange.range(ORDERING, 3, CLOSED, 3, CLOSED); in testSingletonRange() local
89 assertEquals(ORDERING.compare(i, 3) == 0, range.contains(i)); in testSingletonRange()
[all …]
DContiguousSetTest.java61 ContiguousSet.create(Range.closed(1, 3), integers()), in testEquals()
62 ContiguousSet.create(Range.closedOpen(1, 4), integers()), in testEquals()
63 ContiguousSet.create(Range.openClosed(0, 3), integers()), in testEquals()
64 ContiguousSet.create(Range.open(0, 4), integers()), in testEquals()
65 ContiguousSet.create(Range.closed(1, 3), NOT_EQUAL_TO_INTEGERS), in testEquals()
66 ContiguousSet.create(Range.closedOpen(1, 4), NOT_EQUAL_TO_INTEGERS), in testEquals()
67 ContiguousSet.create(Range.openClosed(0, 3), NOT_EQUAL_TO_INTEGERS), in testEquals()
68 ContiguousSet.create(Range.open(0, 4), NOT_EQUAL_TO_INTEGERS), in testEquals()
73 ContiguousSet.create(Range.closed(Integer.MIN_VALUE, Integer.MAX_VALUE), integers()), in testEquals()
74 ContiguousSet.create(Range.<Integer>all(), integers())); in testEquals()
[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/tensorflow/tensorflow/python/data/experimental/kernel_tests/
Dcardinality_test.py36 lambda: dataset_ops.Dataset.range(5).batch(2, drop_remainder=True), 2),
38 lambda: dataset_ops.Dataset.range(5).batch(2, drop_remainder=False), 3),
40 lambda: dataset_ops.Dataset.range(5).filter(lambda _: True).batch(2),
42 ("Batch4", lambda: dataset_ops.Dataset.range(5).repeat().batch(2),
44 ("Cache1", lambda: dataset_ops.Dataset.range(5).cache(), 5),
45 ("Cache2", lambda: dataset_ops.Dataset.range(5).cache("foo"), 5),
46 ("Concatenate1", lambda: dataset_ops.Dataset.range(5).concatenate(
47 dataset_ops.Dataset.range(5)), 10),
49 lambda: dataset_ops.Dataset.range(5).filter(lambda _: True).concatenate(
50 dataset_ops.Dataset.range(5)), cardinality.UNKNOWN),
[all …]
/external/iptables/extensions/
Dlibip6t_SNAT.c50 parse_to(const char *orig_arg, int portok, struct nf_nat_range *range) in parse_to() argument
85 range->flags |= NF_NAT_RANGE_PROTO_SPECIFIED; in parse_to()
99 range->min_proto.tcp.port in parse_to()
100 = range->max_proto.tcp.port in parse_to()
112 "Port range `%s' funky\n", colon+1); in parse_to()
113 range->min_proto.tcp.port = htons(port); in parse_to()
114 range->max_proto.tcp.port = htons(maxport); in parse_to()
124 range->flags |= NF_NAT_RANGE_MAP_IPS; in parse_to()
136 range->min_addr.in6 = *ip; in parse_to()
142 range->max_addr.in6 = *ip; in parse_to()
[all …]
/external/v8/src/compiler/
Dlive-range-separator.cc5 #include "src/compiler/live-range-separator.h"
22 void CreateSplinter(TopLevelLiveRange *range, RegisterAllocationData *data, in CreateSplinter() argument
24 DCHECK(!range->IsSplinter()); in CreateSplinter()
26 // If a range ends right at the end of a deferred block, it is marked by in CreateSplinter()
27 // the range builder as ending at gap start of the next block - since the in CreateSplinter()
32 if (first_cut <= range->Start() && max_allowed_end >= range->End()) { in CreateSplinter()
36 LifetimePosition start = Max(first_cut, range->Start()); in CreateSplinter()
37 LifetimePosition end = Min(last_cut, range->End()); in CreateSplinter()
40 // Ensure the original range has a spill range associated, before it gets in CreateSplinter()
44 if (range->MayRequireSpillRange()) { in CreateSplinter()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/IR/
DConstantRange.h1 //===- ConstantRange.h - Represent a range ----------------------*- C++ -*-===//
10 // Represent a range of possible values that may occur when the program is run
12 // constant, which MAY wrap around the end of the numeric range. To do this, it
22 // The other integral ranges use min/max values for special range values. For
46 /// This class represents a range of values.
54 /// Initialize a range to hold the single specified value.
57 /// Initialize a range of values explicitly. This will assert out if
62 /// Produce the smallest range such that all values that may satisfy the given
64 /// returned range. Formally, this returns a superset of
73 /// Produce the largest range such that all values in the returned range
[all …]
/external/python/google-api-python-client/docs/dyn/
Dbooks_v1.mylibrary.annotations.html122 "gbTextRange": { # Range in GB text format for this annotation for version above.
123 "startPosition": "A String", # The starting position for the range.
124 "endPosition": "A String", # The ending position for the range.
128 "cfiRange": { # Range in CFI format for this annotation for version above.
129 "startPosition": "A String", # The starting position for the range.
130 "endPosition": "A String", # The ending position for the range.
134 "imageCfiRange": { # Range in image CFI format for this annotation for version above.
135 "startPosition": "A String", # The starting position for the range.
136 "endPosition": "A String", # The ending position for the range.
140 "gbImageRange": { # Range in GB image format for this annotation for version above.
[all …]

12345678910>>...447