diff options
-rw-r--r-- | geom_matching/wasserstein/src/auction_oracle.cpp | 1 | ||||
-rw-r--r-- | geom_matching/wasserstein/src/auction_runner_gs.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/geom_matching/wasserstein/src/auction_oracle.cpp b/geom_matching/wasserstein/src/auction_oracle.cpp index 9c764da..f13ffe6 100644 --- a/geom_matching/wasserstein/src/auction_oracle.cpp +++ b/geom_matching/wasserstein/src/auction_oracle.cpp @@ -970,6 +970,7 @@ AuctionOracleKDTreeRestricted::AuctionOracleKDTreeRestricted(const std::vector<D dnnPointHandles.push_back(&dnnPoints[i]); } DnnTraits traits; + traits.internal_p = internal_p; kdtree = new dnn::KDTree<DnnTraits>(traits, dnnPointHandles, wassersteinPower); size_t handleIdx {0}; diff --git a/geom_matching/wasserstein/src/auction_runner_gs.cpp b/geom_matching/wasserstein/src/auction_runner_gs.cpp index e568813..83d88c5 100644 --- a/geom_matching/wasserstein/src/auction_runner_gs.cpp +++ b/geom_matching/wasserstein/src/auction_runner_gs.cpp @@ -241,6 +241,7 @@ double AuctionRunnerGS::getDistanceToQthPowerInternal(void) { sanityCheck(); double result = 0.0; + //std::cout << "-------------------------------------------------------------------------\n"; for(size_t bIdx = 0; bIdx < numBidders; ++bIdx) { auto pA = bidders[bIdx]; assert( 0 <= biddersToItems[bIdx] and biddersToItems[bIdx] < static_cast<int>(items.size()) ); @@ -248,6 +249,7 @@ double AuctionRunnerGS::getDistanceToQthPowerInternal(void) //std::cout << "pA = " << pA << ", pB = " << pB << ", pow(distLp(pA, pB, internal_p), wassersteinPower) = " << pow(distLp(pA, pB, internal_p), wassersteinPower) << ", dist = " << distLp(pA, pB, internal_p) << std::endl; result += pow(distLp(pA, pB, internal_p), wassersteinPower); } + //std::cout << "-------------------------------------------------------------------------\n"; wassersteinCost = result; wassersteinDistance = pow(result, 1.0 / wassersteinPower); return result; |