refactored combinatorial.py to allow easier clustering
DBSCAN implementation