diff --git a/README.md b/README.md index ac7c151..12814af 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ using NearestNeighbors data = rand(3, 10^4) # Create trees -kdtree = KDTree(data; leafsize = 10) +kdtree = KDTree(data; leafsize = 25) balltree = BallTree(data, Minkowski(3.5); reorder = false) brutetree = BruteTree(data) ``` diff --git a/src/ball_tree.jl b/src/ball_tree.jl index acee950..1be8cc3 100644 --- a/src/ball_tree.jl +++ b/src/ball_tree.jl @@ -14,13 +14,13 @@ end """ - BallTree(data [, metric = Euclidean(); leafsize = 10, reorder = true]) -> balltree + BallTree(data [, metric = Euclidean(); leafsize = 25, reorder = true]) -> balltree Creates a `BallTree` from the data using the given `metric` and `leafsize`. """ function BallTree(data::AbstractVector{V}, metric::Metric = Euclidean(); - leafsize::Int = 10, + leafsize::Int = 25, reorder::Bool = true, storedata::Bool = true, reorderbuffer::Vector{V} = Vector{V}()) where {V <: AbstractArray} @@ -70,7 +70,7 @@ end function BallTree(data::AbstractVecOrMat{T}, metric::Metric = Euclidean(); - leafsize::Int = 10, + leafsize::Int = 25, storedata::Bool = true, reorder::Bool = true, reorderbuffer::Matrix{T} = Matrix{T}(undef, 0, 0)) where {T <: AbstractFloat} diff --git a/src/kd_tree.jl b/src/kd_tree.jl index 91cb69d..5518d7d 100644 --- a/src/kd_tree.jl +++ b/src/kd_tree.jl @@ -11,14 +11,14 @@ end """ - KDTree(data [, metric = Euclidean(); leafsize = 10, reorder = true]) -> kdtree + KDTree(data [, metric = Euclidean(); leafsize = 25, reorder = true]) -> kdtree Creates a `KDTree` from the data using the given `metric` and `leafsize`. The `metric` must be a `MinkowskiMetric`. """ function KDTree(data::AbstractVector{V}, metric::M = Euclidean(); - leafsize::Int = 10, + leafsize::Int = 25, storedata::Bool = true, reorder::Bool = true, reorderbuffer::Vector{V} = Vector{V}()) where {V <: AbstractArray, M <: MinkowskiMetric} @@ -76,7 +76,7 @@ end function KDTree(data::AbstractVecOrMat{T}, metric::M = Euclidean(); - leafsize::Int = 10, + leafsize::Int = 25, storedata::Bool = true, reorder::Bool = true, reorderbuffer::Matrix{T} = Matrix{T}(undef, 0, 0)) where {T <: AbstractFloat, M <: MinkowskiMetric}