DBScan implementation in Objective-C