summaryrefslogtreecommitdiff
path: root/geom_matching/wasserstein/include/auction_runner_jac.h
diff options
context:
space:
mode:
authorArnur Nigmetov <a.nigmetov@gmail.com>2017-04-04 14:20:16 +0200
committerArnur Nigmetov <a.nigmetov@gmail.com>2017-04-04 14:20:16 +0200
commit1607071fcd9d473eae295693fc97bee8c50d6a11 (patch)
tree3cfb964a926b7c839c9b00cc2abdc963ee822b88 /geom_matching/wasserstein/include/auction_runner_jac.h
parent2b48644a5a7d0549cc1d8e5f5cd05da984bc0669 (diff)
Prepare to output real relative error.
In Wasserstein distance computation AuctionRunner class now has a field relativeError which contains the relative error which we can guarantee, so if the user asked for 0.1 accuracy, but the result is 0.03 accurate, this information can be retrieved.
Diffstat (limited to 'geom_matching/wasserstein/include/auction_runner_jac.h')
-rw-r--r--geom_matching/wasserstein/include/auction_runner_jac.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/geom_matching/wasserstein/include/auction_runner_jac.h b/geom_matching/wasserstein/include/auction_runner_jac.h
index 22d42b0..524498a 100644
--- a/geom_matching/wasserstein/include/auction_runner_jac.h
+++ b/geom_matching/wasserstein/include/auction_runner_jac.h
@@ -52,6 +52,7 @@ public:
double getEpsilon() const { return epsilon; }
double getWassersteinDistance();
double getWassersteinCost();
+ double getRelativeError() const { return relativeError; };
static constexpr double epsilonCommonRatio { 5 }; // next epsilon = current epsilon / epsilonCommonRatio
static constexpr int maxIterNum { 25 }; // maximal number of iterations of epsilon-scaling
private:
@@ -69,6 +70,7 @@ private:
double wassersteinDistance;
double wassersteinCost;
std::vector<IdxValPair> bidTable;
+ double relativeError;
// to get the 2 best items
std::unique_ptr<AuctionOracle> oracle;
std::list<size_t> unassignedBidders;