From be472f9a59a4016ebc5ea3d39437eb12012b1cf1 Mon Sep 17 00:00:00 2001 From: Ali Salehi Date: Sat, 16 Sep 2023 21:12:56 +0330 Subject: [PATCH] fixed some bug in matching function --- src/matching.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/matching.jl b/src/matching.jl index 275a267..7556992 100644 --- a/src/matching.jl +++ b/src/matching.jl @@ -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)