implementation for many similarity join algorithms