diff options
author | Arnur Nigmetov <nigmetov@tugraz.at> | 2019-09-17 22:22:57 +0200 |
---|---|---|
committer | Arnur Nigmetov <nigmetov@tugraz.at> | 2019-09-17 22:22:57 +0200 |
commit | 5a59cfad45c155f8af89c2c6d82db2848d52a953 (patch) | |
tree | e62c8baafd27ed9f907cbd3463f0f88e935d042e | |
parent | 7f6b96187423ba374b697f6f411c4a70d24ee297 (diff) |
Add traits for long double (Wasserstein).
-rw-r--r-- | geom_matching/wasserstein/include/wasserstein.h | 11 |
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>; |