/external/guava/guava/src/com/google/common/hash/ |
HashFunction.java | 40 * represents a hash code as an instance of {@link HashCode}. 94 * and finally ask for the {@code HashCode} when finished using {@link Hasher#hash}. (See 112 * <h3>Relationship to {@link Object#hashCode}</h3> 116 * algorithms can't be easily substituted. Also, implementations of {@code hashCode} tend 118 * poor-quality {@code hashCode} implementations, including those in many JDK classes. 120 * <p>{@code Object.hashCode} implementations tend to be very fast, but have weak 125 * uses of hash functions beyond data structures, however, {@code Object.hashCode} almost 138 * HashCode hc = hf.newHasher() 160 HashCode hashInt(int input); 167 HashCode hashLong(long input) [all...] |
HashCode.java | 39 public abstract class HashCode { 40 HashCode() {} 48 * Returns the first four bytes of {@linkplain #asBytes() this hashcode's bytes}, converted to 56 * Returns the first eight bytes of {@linkplain #asBytes() this hashcode's bytes}, converted to 64 * If this hashcode has enough bits, returns {@code asLong()}, otherwise returns a {@code long} 68 * @since 14.0 (since 11.0 as {@code Hashing.padToLong(HashCode)}) 74 * changes to it will <i>not</i> be reflected in this {@code HashCode} object or any other arrays 99 * Returns a mutable view of the underlying bytes for the given {@code HashCode} if it is a 100 * byte-based hashcode. Otherwise it returns {@link HashCode#asBytes}. Do <i>not</i> mutate thi [all...] |
AbstractStreamingHashFunction.java | 36 @Override public <T> HashCode hashObject(T instance, Funnel<? super T> funnel) { 40 @Override public HashCode hashUnencodedChars(CharSequence input) { 44 @Override public HashCode hashString(CharSequence input, Charset charset) { 48 @Override public HashCode hashInt(int input) { 52 @Override public HashCode hashLong(long input) { 56 @Override public HashCode hashBytes(byte[] input) { 60 @Override public HashCode hashBytes(byte[] input, int off, int len) { 228 public final HashCode hash() { 237 abstract HashCode makeHash();
|
Hashing.java | 247 * {@code HashCode} produced by this function, use {@link HashCode#padToLong()}. 265 * {@code HashCode} produced by this function, use {@link HashCode#padToLong()}. 307 * Assigns to {@code hashCode} a "bucket" in the range {@code [0, buckets)}, in a uniform 319 public static int consistentHash(HashCode hashCode, int buckets) { 320 return consistentHash(hashCode.padToLong(), buckets); 363 public static HashCode combineOrdered(Iterable<HashCode> hashCodes) [all...] |
ChecksumHashFunction.java | 80 public HashCode hash() { 85 * cast won't lose any information and is necessary to return a HashCode of the correct 88 return HashCode.fromInt((int) value); 90 return HashCode.fromLong(value);
|
AbstractNonStreamingHashFunction.java | 44 @Override public <T> HashCode hashObject(T instance, Funnel<? super T> funnel) { 48 @Override public HashCode hashUnencodedChars(CharSequence input) { 57 @Override public HashCode hashString(CharSequence input, Charset charset) { 61 @Override public HashCode hashInt(int input) { 65 @Override public HashCode hashLong(long input) { 69 @Override public HashCode hashBytes(byte[] input) { 144 public HashCode hash() {
|
Murmur3_32HashFunction.java | 80 public int hashCode() { 81 return getClass().hashCode() ^ seed; 84 @Override public HashCode hashInt(int input) { 91 @Override public HashCode hashLong(long input) { 105 @Override public HashCode hashUnencodedChars(CharSequence input) { 140 private static HashCode fmix(int h1, int length) { 147 return HashCode.fromInt(h1); 176 @Override public HashCode makeHash() {
|
MessageDigestHashFunction.java | 151 public HashCode hash() { 155 ? HashCode.fromBytesNoCopy(digest.digest()) 156 : HashCode.fromBytesNoCopy(Arrays.copyOf(digest.digest(), bytes));
|
Hasher.java | 35 * The resulting {@link HashCode} is dependent only on the bytes inserted, and the order in which 99 HashCode hash();
|
HashingOutputStream.java | 42 // HashCode on an existing OutputStream, compared to creating a separate OutputStream that could 61 * Returns the {@link HashCode} based on the data written to this stream. The result is 64 public HashCode hash() {
|
AbstractCompositeHashFunction.java | 26 * {@linkplain #makeHash(Hasher[])} that constructs the final {@code HashCode}. 41 * Constructs a {@code HashCode} from the {@code Hasher} objects of the functions. Each of them 42 * has consumed the entire input and they are ready to output a {@code HashCode}. The order of 45 // this could be cleaner if it passed HashCode[], but that would create yet another array... 46 /* protected */ abstract HashCode makeHash(Hasher[] hashers); 146 @Override public HashCode hash() {
|
SipHashFunction.java | 90 public int hashCode() { 91 return (int) (getClass().hashCode() ^ c ^ d ^ k0 ^ k1); 140 @Override public HashCode makeHash() { 148 return HashCode.fromLong(v0 ^ v1 ^ v2 ^ v3);
|
HashingInputStream.java | 97 * Returns the {@link HashCode} based on the data read from this stream. The result is 100 public HashCode hash() {
|
/external/guava/guava-tests/test/com/google/common/hash/ |
PackageSanityTests.java | 31 setDefault(HashCode.class, HashCode.fromInt(1));
|
HashCodeTest.java | 31 * Unit tests for {@link HashCode}. 69 HashCode fromInt = HashCode.fromInt(expected.asInt); 79 HashCode fromLong = HashCode.fromLong(expected.asLong); 87 HashCode fromBytes = HashCode.fromBytes(expected.bytes); 94 HashCode hashCode = HashCode.fromBytes(bytes) [all...] |
AbstractNonStreamingHashFunctionTest.java | 49 HashCode[] codes = new HashCode[hashers.size()]; 105 HashCode makeHash() { 106 return HashCode.fromBytes(out.toByteArray()); 133 public HashCode hashBytes(byte[] input) { 134 return HashCode.fromBytes(input); 138 public HashCode hashBytes(byte[] input, int off, int len) { 139 return HashCode.fromBytes(Arrays.copyOfRange(input, off, off + len)); 143 public HashCode hashString(CharSequence input, Charset charset) { 148 public HashCode hashLong(long input) [all...] |
HashingTest.java | 164 private void checkConsistentHashCorrectness(long hashCode) { 167 int b = Hashing.consistentHash(hashCode, shards); 210 checkSameResult(HashCode.fromLong(1), 1); 211 checkSameResult(HashCode.fromLong(0x9999999999999999L), 0x9999999999999999L); 212 checkSameResult(HashCode.fromInt(0x99999999), 0x0000000099999999L); 215 public void checkSameResult(HashCode hashCode, long equivLong) { 216 assertEquals(Hashing.consistentHash(equivLong, 5555), Hashing.consistentHash(hashCode, 5555)); 243 Hashing.combineOrdered(Collections.<HashCode>emptySet()); 251 Hashing.combineOrdered(ImmutableList.of(HashCode.fromInt(32), HashCode.fromLong(32L))) [all...] |
Murmur3Hash128Test.java | 46 HashCode foxHash = 52 HashCode expected = toHashCode(expected1, expected2); 59 * Returns a {@link HashCode} for a sequence of longs, in big-endian order. 61 private static HashCode toHashCode(long... longs) { 66 return HashCode.fromBytes(bb.array());
|
AbstractStreamingHasherTest.java | 201 @Override HashCode makeHash() { 202 return HashCode.fromBytes(out.toByteArray()); 252 public HashCode hashBytes(byte[] input) { 253 return HashCode.fromBytes(input); 257 public HashCode hashBytes(byte[] input, int off, int len) { 267 public HashCode hashString(CharSequence input, Charset charset) { 272 public HashCode hashLong(long input) { 277 public HashCode hashInt(int input) {
|
Murmur3Hash32Test.java | 55 private static void assertHash(int expected, HashCode actual) { 56 assertEquals(HashCode.fromInt(expected), actual);
|
AbstractByteHasherTest.java | 136 public HashCode hash() { 137 return HashCode.fromBytesNoCopy(bytes());
|
MessageDigestHashFunctionTest.java | 100 HashCode.fromBytes(digest.digest(input)), 104 HashCode.fromBytes(Arrays.copyOf(digest.digest(input), bytes)),
|
/external/v8/src/compiler/ |
value-numbering-reducer.cc | 19 size_t HashCode(Node* node) { 20 size_t h = base::hash_combine(node->op()->HashCode(), node->InputCount()); 58 const size_t hash = HashCode(node); 193 for (size_t j = HashCode(old_entry) & mask;; j = (j + 1) & mask) {
|
/frameworks/base/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/perf/ |
TimedStatement.java | 35 import com.google.common.hash.HashCode; 91 HashCode code1 = hashFunction.hashBytes(buffer); 93 HashCode code2 = hashFunction.hashBytes(buffer);
|
/frameworks/support/buildSrc/ |
release.gradle | 18 import com.google.common.hash.HashCode 123 HashCode hashCode = hashFunction.hashString(inputFile.getAbsolutePath(), Charset.forName("UTF-8")) 124 return hashCode.toString()
|