Skip to content

Commit

Permalink
Merge pull request #12 from eigenhombre/use-alternate-metrics
Browse files Browse the repository at this point in the history
Use alternate metrics
  • Loading branch information
nbeloglazov committed Oct 24, 2015
2 parents d749c5a + f4283ea commit 84e16c9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Meta: {:value Hello}

## License

Copyright (C) 2009-2013 Brendan Ribera [and contributors](https://github.com/abscondment/clj-kdtree/graphs/contributors). All rights reserved.
Copyright (C) 2009-2015 Brendan Ribera [and contributors](https://github.com/abscondment/clj-kdtree/graphs/contributors). All rights reserved.

Distributed under the MIT License; see the file LICENSE at the root of
this distribution.
6 changes: 3 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
(defproject clj-kdtree "1.2.0"
(defproject clj-kdtree "1.2.1-SNAPSHOT"
:description "kd-trees for Clojure"
:url "https://github.com/abscondment/clj-kdtree"
:license {:name "The MIT License"
:url "http://opensource.org/licenses/MIT"
:distribution :repo}
:dependencies [[org.clojure/clojure "1.6.0"]]
:profiles {:dev {:dependencies [[criterium "0.4.1"]
:dependencies [[org.clojure/clojure "1.7.0"]]
:profiles {:dev {:dependencies [[criterium "0.4.3"]
[net.sf/javaml "0.1.7"]]
:repositories [["javaml" {:url "http://corp.array.ca/nest-web/mavenrepo/"
:checksum :warn}]]}}
Expand Down
3 changes: 2 additions & 1 deletion src/kdtree.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
(defrecord Result [point ^double dist-squared])


(defn- dist-squared [^doubles a ^doubles b]
(defn- dist-squared
"Compute the K-dimensional distance between two points"
[^doubles a ^doubles b]
(loop [res (double 0.0)
ind (long 0)]
(if (== ind (alength a))
Expand Down

0 comments on commit 84e16c9

Please sign in to comment.