Exemplo n.º 1
0
        public bool CheckSmilarity(PuzzleThreshold threshold, IPuzzle other, bool fixForTexts)
        {
            if (other == null)
            {
                throw new ArgumentNullException("other");
            }
            var s = this.GetDistanceFrom(other, fixForTexts);

            switch (threshold)
            {
            case PuzzleThreshold.High:   return(s < IPuzzle.HighSimilarityThreshold);

            case PuzzleThreshold.Normal: return(s < IPuzzle.DefaultSimilarityThreshold);

            case PuzzleThreshold.Low:    return(s < IPuzzle.LowSimilarityThreshold);

            case PuzzleThreshold.Lower:  return(s < IPuzzle.LowerSimilarityThreshold);
            }

            return(false);
        }
Exemplo n.º 2
0
 public bool CheckSmilarity(PuzzleThreshold threshold, IPuzzle other)
 {
     return(CheckSmilarity(threshold, other, true));
 }