summaryrefslogtreecommitdiff
path: root/geom_matching/wasserstein/include/auction_oracle_kdtree_restricted.hpp
diff options
context:
space:
mode:
authorArnur Nigmetov <a.nigmetov@gmail.com>2018-05-31 20:44:59 +0200
committerArnur Nigmetov <a.nigmetov@gmail.com>2018-05-31 20:57:35 +0200
commit8ffc1482c88fd1c503524f6e328f69fe3fdede6c (patch)
treea858364713e1bf81b06b86fd7b3dcf782632a211 /geom_matching/wasserstein/include/auction_oracle_kdtree_restricted.hpp
parent9693f140d91e751aabe46b76b89c332c7f307e17 (diff)
Fix bug in point cloud version.
internal_p was not respected by DynamicPointTraits, l_2 distance was always used.
Diffstat (limited to 'geom_matching/wasserstein/include/auction_oracle_kdtree_restricted.hpp')
-rw-r--r--geom_matching/wasserstein/include/auction_oracle_kdtree_restricted.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/geom_matching/wasserstein/include/auction_oracle_kdtree_restricted.hpp b/geom_matching/wasserstein/include/auction_oracle_kdtree_restricted.hpp
index 0e6f780..7817bf3 100644
--- a/geom_matching/wasserstein/include/auction_oracle_kdtree_restricted.hpp
+++ b/geom_matching/wasserstein/include/auction_oracle_kdtree_restricted.hpp
@@ -247,7 +247,7 @@ AuctionOracleKDTreeRestricted<Real_, PointContainer_>::get_optimal_bid_debug(Idx
auto item = this->items[item_idx];
if (item.type != bidder.type and item_idx != bidder_idx)
continue;
- auto item_value = std::pow(dist_lp(bidder, item, this->internal_p), this->wasserstein_power) + this->prices[item_idx];
+ auto item_value = std::pow(dist_lp(bidder, item, this->internal_p, 2), this->wasserstein_power) + this->prices[item_idx];
if (item_value < best_item_value) {
best_item_value = item_value;
best_item_idx = item_idx;
@@ -262,7 +262,7 @@ AuctionOracleKDTreeRestricted<Real_, PointContainer_>::get_optimal_bid_debug(Idx
continue;
if (item_idx == best_item_idx)
continue;
- auto item_value = std::pow(dist_lp(bidder, item, this->internal_p), this->wasserstein_power) + this->prices[item_idx];
+ auto item_value = std::pow(dist_lp(bidder, item, this->internal_p, 2), this->wasserstein_power) + this->prices[item_idx];
if (item_value < second_best_item_value) {
second_best_item_value = item_value;
second_best_item_idx = item_idx;