bool Equals(UInt40 that) { return(this.b7 == that.b7 && this.b6 == that.b6 && this.b5 == that.b5 && this.b4 == that.b4 && this.b3 == that.b3); }
public bool Contains(ulong hash) { UInt40 h = new UInt40(hash); int i = (int)(hash & (ulong)(this.hashes.Length - 1)); int n = this.hashes[i] == null ? 0 : this.hashes[i].Length; for (int j = 0; j < n; j++) { if (this.hashes[i][j].Equals(h)) { return(true); } } return(false); }
public void Add(ulong hash) { UInt40 h = new UInt40(hash); int i = (int)(hash & (ulong)(this.hashes.Length - 1)); int n = this.hashes[i] == null ? 0 : this.hashes[i].Length; for (int j = 0; j < n; j++) { if (this.hashes[i][j].Equals(h)) return; } UInt40[] tmp = new UInt40[n+1]; for (int j = 0; j < n; j++) { tmp[j] = this.hashes[i][j]; } tmp[n] = h; this.hashes[i] = tmp; this.count++; }
public void Add(ulong hash) { UInt40 h = new UInt40(hash); int i = (int)(hash & (ulong)(this.hashes.Length - 1)); int n = this.hashes[i] == null ? 0 : this.hashes[i].Length; for (int j = 0; j < n; j++) { if (this.hashes[i][j].Equals(h)) { return; } } UInt40[] tmp = new UInt40[n + 1]; for (int j = 0; j < n; j++) { tmp[j] = this.hashes[i][j]; } tmp[n] = h; this.hashes[i] = tmp; this.count++; }
public bool Contains(ulong hash) { UInt40 h = new UInt40(hash); int i = (int)(hash & (ulong)(this.hashes.Length - 1)); int n = this.hashes[i] == null ? 0 : this.hashes[i].Length; for (int j = 0; j < n; j++) { if (this.hashes[i][j].Equals(h)) return true; } return false; }
bool Equals(UInt40 that) { return this.b7 == that.b7 && this.b6 == that.b6 && this.b5 == that.b5 && this.b4 == that.b4 && this.b3 == that.b3; }