summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--geom_matching/wasserstein/include/wasserstein.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/geom_matching/wasserstein/include/wasserstein.h b/geom_matching/wasserstein/include/wasserstein.h
index 17bb211..d8d6b2e 100644
--- a/geom_matching/wasserstein/include/wasserstein.h
+++ b/geom_matching/wasserstein/include/wasserstein.h
@@ -57,6 +57,17 @@ struct DiagramTraits
};
template<class PairContainer_>
+struct DiagramTraits<PairContainer_, std::pair<long double, long double>>
+{
+ using PointType = std::pair<long double, long double>;
+ using RealType = long double;
+ using Container = std::vector<PointType>;
+
+ static RealType get_x(const PointType& p) { return p.first; }
+ static RealType get_y(const PointType& p) { return p.second; }
+};
+
+template<class PairContainer_>
struct DiagramTraits<PairContainer_, std::pair<double, double>>
{
using PointType = std::pair<double, double>;