summaryrefslogtreecommitdiff
path: root/geom_bottleneck/bottleneck/include/bottleneck.h
diff options
context:
space:
mode:
Diffstat (limited to 'geom_bottleneck/bottleneck/include/bottleneck.h')
-rw-r--r--geom_bottleneck/bottleneck/include/bottleneck.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/geom_bottleneck/bottleneck/include/bottleneck.h b/geom_bottleneck/bottleneck/include/bottleneck.h
index 2078965..75c902f 100644
--- a/geom_bottleneck/bottleneck/include/bottleneck.h
+++ b/geom_bottleneck/bottleneck/include/bottleneck.h
@@ -46,6 +46,10 @@ typedef std::pair<double, std::pair<size_t, size_t>> DistVerticesPair;
// b) if the interval is not (0,0), then (distMax - distMin) / distMin < epsilon
std::pair<double, double> bottleneckDistApproxInterval(DiagramPointSet& A, DiagramPointSet& B, const double epsilon);
+
+// heuristic (sample diagram to estimate the distance)
+std::pair<double, double> bottleneckDistApproxIntervalHeur(DiagramPointSet& A, DiagramPointSet& B, const double epsilon);
+
// get approximate distance,
// see bottleneckDistApproxInterval
double bottleneckDistApprox(DiagramPointSet& A, DiagramPointSet& B, const double epsilon);
@@ -74,6 +78,17 @@ std::pair<double, double> bottleneckDistApproxInterval(PairContainer& A, PairCon
return bottleneckDistApproxInterval(a, b, epsilon);
}
+
+template<class PairContainer>
+double bottleneckDistApproxHeur(PairContainer& A, PairContainer& B, const double epsilon)
+{
+ DiagramPointSet a(A.begin(), A.end());
+ DiagramPointSet b(B.begin(), B.end());
+ std::pair<double, double> resPair = bottleneckDistApproxIntervalHeur(a, b, epsilon);
+ return resPair.second;
+}
+
+
// get approximate distance,
// see bottleneckDistApproxInterval
template<class PairContainer>