 (region-query [0 0] pts r2-dist 2)
   
 (map #(region-query % pts r2-dist 1) '([0 0] [0 1]))
+
+
+
 )
 

            [clojure.java.io :as io])
  (:import match.Match2))

(declare region-query-s)
(declare region-query-p)
(declare memoized-metric)

;; TODO: find optimal subdivision for r/fold

(def memoized-dbscan
  "If true, calls to the metric passed to dbscan will be memoized"
  true)

(def memoized-mediods
  "If true, calls to the metric passed to mediod-protein will be memoized"
  true)

(def region-query
  "Select region-query-s (serial) or region-query-p (parallel)"
  region-query-p)

(def partition-size
  "Approximate subdivision size for clojure.core.reducers/fold"
  16)

;;;

(defn region-query-s
  "Serial region query; returns all pts *at least* eps similar to pt."

(defn medioid
  "Return element of cluster that maximizes sum of similarity scores" 
  [cluster metric]
  (let [mem-metric (if memoized-medioids
                     (memoize-metric metric)
                      metric)]
    (second 
