From 603f369bf32610bb8bfa9187a0d29a2ea6359b9e Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Thu, 16 Jan 2020 14:10:55 +0100 Subject: Simplify DiagramTraits for pairs. --- geom_matching/wasserstein/include/wasserstein.h | 30 ++++--------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/geom_matching/wasserstein/include/wasserstein.h b/geom_matching/wasserstein/include/wasserstein.h index 5be7691..2705043 100644 --- a/geom_matching/wasserstein/include/wasserstein.h +++ b/geom_matching/wasserstein/include/wasserstein.h @@ -56,33 +56,11 @@ struct DiagramTraits static RealType get_y(const PointType& p) { return p[1]; } }; -template -struct DiagramTraits> +template +struct DiagramTraits> { - using PointType = std::pair; - using RealType = long double; - using Container = std::vector; - - static RealType get_x(const PointType& p) { return p.first; } - static RealType get_y(const PointType& p) { return p.second; } -}; - -template -struct DiagramTraits> -{ - using PointType = std::pair; - using RealType = double; - using Container = std::vector; - - static RealType get_x(const PointType& p) { return p.first; } - static RealType get_y(const PointType& p) { return p.second; } -}; - -template -struct DiagramTraits> -{ - using PointType = std::pair; - using RealType = float; + using RealType = RealType_; + using PointType = std::pair; using Container = std::vector; static RealType get_x(const PointType& p) { return p.first; } -- cgit v1.2.3