Skip to content

Commit

Permalink
slight restructure to retain same calling function name as cython / js
Browse files Browse the repository at this point in the history
versions.
  • Loading branch information
scw committed Mar 28, 2014
1 parent 9af2a2d commit 250839f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions jenks-run.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ include("jenks.jl")
f = open("test.json")
data = JSON.parse(f)

dc = Jenks.DataClassification(data,5)

# run once to exclude compilation time from runtime test
Jenks.jenks(dc)
Jenks.jenks(data, 5)
# examine runtime
@time Jenks.jenks(dc)
@time Jenks.jenks(data, 5)

3 changes: 2 additions & 1 deletion jenks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ module Jenks
return lower_class_limits, variance_combinations
end

function jenks(dc::DataClassification)
function jenks(data, n_classes)
dc = Jenks.DataClassification(data, n_classes)
if dc.n_classes > length(dc.data)
return
end
Expand Down

0 comments on commit 250839f

Please sign in to comment.