Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] A monkey patch to fix the parallelogon periodic bounary condition #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/ball_tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,6 @@ function BallTree(data::AbstractVector{V},
data_reordered = Vector{V}()
end

if metric isa Distances.UnionMetrics
p = parameters(metric)
if p !== nothing && length(p) != length(V)
throw(ArgumentError(
"dimension of input points:$(length(V)) and metric parameter:$(length(p)) must agree"))
end
end

if n_p > 0
# Call the recursive BallTree builder
build_BallTree(1, data, data_reordered, hyper_spheres, metric, indices, indices_reordered,
Expand Down
5 changes: 5 additions & 0 deletions src/evaluation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ function Distances.evaluate(d::Distances.PreMetric, a::AbstractVector,
b::AbstractVector, ::Bool)
evaluate(d, a, b)
end

function Distances.evaluate(d::Distances.PeriodicEuclidean, a::AbstractVector,
b::AbstractVector, ::Bool)
evaluate(d, a, b)
end