public IEnumerable<Simular> FindSimular(string carId, string rulesSetId, string hashValue, double threshold, RulesSet set = null) {
RulesSet.Rule[] workedRules = null;
if (!_dictionary.ContainsKey(rulesSetId)) yield break;
foreach (var pair in _dictionary[rulesSetId]) {
if (pair.Key == carId) continue;
var value = set == null ? RulesSet.CompareHashes(hashValue, pair.Value) : RulesSet.CompareHashes(hashValue, pair.Value, set, out workedRules);
if (value > threshold) {
yield return new Simular {CarId = pair.Key, Value = value, WorkedRules = workedRules};
}
}
}