summaryrefslogtreecommitdiff
path: root/geom_bottleneck/include/bottleneck.h
diff options
context:
space:
mode:
authorArnur Nigmetov <a.nigmetov@gmail.com>2018-05-19 20:17:53 +0200
committerArnur Nigmetov <a.nigmetov@gmail.com>2018-05-19 20:17:53 +0200
commit75cf0745e95a37c8d65e7a283a11cd500ab6edc2 (patch)
treec139c1c714f85cf5b7f8badaad0aa71926136255 /geom_bottleneck/include/bottleneck.h
parent01be01effedfe7b0a635d562ec5fe653abcf911d (diff)
Points at infinity handled correctly.
1. Reader copied from wasserstein code, can parse inf, moved to hera namespace. 2. addProjections removes points at infinity. 3. Points at infinity handled separately by getInfinityCost().
Diffstat (limited to 'geom_bottleneck/include/bottleneck.h')
-rw-r--r--geom_bottleneck/include/bottleneck.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/geom_bottleneck/include/bottleneck.h b/geom_bottleneck/include/bottleneck.h
index d0d82b6..0d4e1ed 100644
--- a/geom_bottleneck/include/bottleneck.h
+++ b/geom_bottleneck/include/bottleneck.h
@@ -50,6 +50,8 @@ namespace hera {
// PairContainer class must support iteration of the form
// for(it = pairContainer.begin(); it != pairContainer.end(); ++it)
+// all functions in this header are wrappers around
+// functions from hera::bt namespace
// get exact bottleneck distance,
template<class PairContainer>
@@ -86,7 +88,8 @@ bottleneckDistApproxInterval(PairContainer& dgm_A, PairContainer& dgm_B, const t
return hera::bt::bottleneckDistApproxInterval(a, b, delta);
}
-
+// use sampling heuristic: discard most of the points with small persistency
+// to get a good initial approximation of the bottleneck distance
template<class PairContainer>
typename DiagramTraits<PairContainer>::RealType
bottleneckDistApproxHeur(PairContainer& dgm_A, PairContainer& dgm_B, const typename DiagramTraits<PairContainer>::RealType delta)
@@ -98,7 +101,6 @@ bottleneckDistApproxHeur(PairContainer& dgm_A, PairContainer& dgm_B, const typen
return resPair.second;
}
-
// get approximate distance,
// see bottleneckDistApproxInterval
template<class PairContainer>