Skip to content

Commit

Permalink
fixed some bug in matching function
Browse files Browse the repository at this point in the history
  • Loading branch information
iamalisalehi committed Sep 16, 2023
1 parent 7cc7027 commit be472f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/matching.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ function matching(match::Matching; bottleneck=match.bottleneck)
elseif i n
# left is matched to diagonal
l = match.left[i]
dis = (birth(l) + death(l))/2
dis = (birth(l) + death(l))/2
push!(result, match.left[i] => PersistenceInterval(dis, dis))
elseif j m
# right is matched to diagonal
r = match.right[j]
dis = (birth(r) + death(r))/2
push!(result, PersistenceInterval(birth(r), birth(r)) => r)
dis = (birth(r) + death(r))/2
push!(result, PersistenceInterval(dis, dis) => r)
end
end
sort!(result)
Expand Down

0 comments on commit be472f9

Please # to comment.