public static int hashUnordered(Iterable xs){ int hash = 0; int n = 0; for(Object x : xs) { hash += Util.hasheq(x); ++n; } return mixCollHash(hash, n); }
public int hasheq(){ if(_hasheq == -1) { // int hash = 1; // for(ISeq s = seq(); s != null; s = s.next()) // { // hash = 31 * hash + Util.hasheq(s.first()); // } // this._hasheq = hash; _hasheq = Murmur3.hashOrdered(this); } return _hasheq; }
static public int mapHasheq(IPersistentMap m) { return Murmur3.hashUnordered(m); // int hash = 0; // for(ISeq s = m.seq(); s != null; s = s.next()) // { // Map.Entry e = (Map.Entry) s.first(); // hash += Util.hasheq(e.getKey()) ^ // Util.hasheq(e.getValue()); // } // return hash; }
public int hasheq(){ if(bipart == null) return Murmur3.hashLong(lpart); return bipart.hashCode(); }
public static int hasheq(Object o){ if(o == null) return 0; if(o instanceof IHashEq) return dohasheq((IHashEq) o); if(o instanceof Number) return Numbers.hasheq((Number)o); if(o instanceof String) return Murmur3.hashInt(o.hashCode()); return o.hashCode(); }
public int hasheq() { if(_hasheq == 0){ _hasheq = Util.hashCombine(Murmur3.hashUnencodedChars(name), Util.hash(ns)); } return _hasheq; }
public int hasheq() { if(_hasheq == -1) { // int hash = 1; // for(ISeq s = seq(); s != null; s = s.next()) // { // hash = 31 * hash + Util.hasheq(s.first()); // } // this._hasheq = hash; _hasheq = Murmur3.hashOrdered(this); } return _hasheq; }
public int hasheq(){ if(_hasheq == -1) { //this._hasheq = mapHasheq(this); _hasheq = Murmur3.hashUnordered(this); } return _hasheq; }
return Murmur3.hashLong(lpart);
public static int hashOrdered(Iterable xs){ int n = 0; int hash = 1; for(Object x : xs) { hash = 31 * hash + Util.hasheq(x); ++n; } return mixCollHash(hash, n); }
public int hasheq(){ if(_hasheq == -1) { // int hash = 1; // Iterator i = iterator(); // while(i.hasNext()) // { // Object obj = i.next(); // hash = 31 * hash + Util.hasheq(obj); // } // _hasheq = hash; _hasheq = Murmur3.hashOrdered(this); } return _hasheq; }
public int hasheq(){ if(_hasheq == -1){ // int hash = 0; // for(ISeq s = seq(); s != null; s = s.next()) // { // Object e = s.first(); // hash += Util.hasheq(e); // } // this._hasheq = hash; _hasheq = Murmur3.hashUnordered(this); } return _hasheq; }
public static int hashUnordered(Iterable xs){ int hash = 0; int n = 0; for(Object x : xs) { hash += Util.hasheq(x); ++n; } return mixCollHash(hash, n); }
public int hasheq(){ ISeq s = seq(); if((s != null) && (s instanceof IHashEq)) return ((IHashEq) s).hasheq(); return Murmur3.hashOrdered(this); }
public static int hashUnencodedChars(CharSequence input){ int h1 = seed; // step through the CharSequence 2 chars at a time for(int i = 1; i < input.length(); i += 2) { int k1 = input.charAt(i - 1) | (input.charAt(i) << 16); k1 = mixK1(k1); h1 = mixH1(h1, k1); } // deal with any remaining characters if((input.length() & 1) == 1) { int k1 = input.charAt(input.length() - 1); k1 = mixK1(k1); h1 ^= k1; } return fmix(h1, 2 * input.length()); }
public static int hashOrdered(Iterable xs){ int n = 0; int hash = 1; for(Object x : xs) { hash = 31 * hash + Util.hasheq(x); ++n; } return mixCollHash(hash, n); }