return minimal;
}
+
+
+gdouble rspamd_shingles_compare (const struct rspamd_shingle *a,
+ const struct rspamd_shingle *b)
+{
+ gint i, common = 0;
+
+ for (i = 0; i < RSPAMD_SHINGLE_SIZE; i ++) {
+ if (a->hashes[i] == b->hashes[i]) {
+ common ++;
+ }
+ }
+
+ return (gdouble)common / 84.0;
+}
rspamd_shingles_filter filter,
gpointer filterd);
+/**
+ * Compares two shingles and return result as a floating point value - 1.0
+ * for completely similar shingles and 0.0 for completely different ones
+ * @param a
+ * @param b
+ * @return
+ */
+gdouble rspamd_shingles_compare (const struct rspamd_shingle *a,
+ const struct rspamd_shingle *b);
+
/**
* Default filtering function
*/