public static bool IsMatch(ulong[] set, ulong[] find, CompareBlobs cb = CompareBlobs.Contains) { int len = set?.Length ?? 0; if (len != (find?.Length ?? 0)) { return(false); } if (set == null || find == null) { return(true); } switch (cb) { default: case CompareBlobs.All: for (int i = 0; i < len; i++) { if (set[i] != find[i]) { return(false); } } return(true); case CompareBlobs.Any: for (int i = 0; i < len; i++) { if ((set[i] & find[i]) != 0) { return(true); } } return(false); case CompareBlobs.Contains: ulong R; for (int i = 0; i < len; i++) { R = find[i]; if (R == 0) { continue; } if ((set[i] & R) != R) { return(false); } } return(true); } }
public bool IsMatch(ulong[] find, CompareBlobs cb = CompareBlobs.Contains) { return(IsMatch(Blob, find, cb)); }
public static bool IsMatch(BigBitBlob set, ulong[] find, CompareBlobs cb = CompareBlobs.Contains) { return(IsMatch(set?.Blob, find, cb)); }
public bool IsMatch(BigBitBlob find, CompareBlobs cb = CompareBlobs.Contains) { return(IsMatch(Blob, find?.Blob, cb)); }