Ejemplo n.º 1
0
        // Convenience method for just creating a matcher from a set of data.
        public static FuzzyMatcher Matcher(IEnumerable <string> strs)
        {
            MatcherBuilder matcherBuilder = new MatcherBuilder();

            matcherBuilder.Update(strs);
            return(matcherBuilder.Build());
        }
Ejemplo n.º 2
0
        public static FuzzyMatcher Matcher(string signature)
        {
            if (signature.Length > 64)
            {
                throw new ArgumentException("Signature too large");
            }
            // Special logic isn't needed; as long as it fits within 64 bits,
            // the normal algorithm will reconstruct the bit pattern without errors
            MatcherBuilder matcherBuilder = new MatcherBuilder();

            matcherBuilder.Update(signature);
            return(matcherBuilder.Build());
        }