summaryrefslogtreecommitdiff
path: root/geom_matching/wasserstein/include/auction_runner_gs.h
diff options
context:
space:
mode:
authorArnur Nigmetov <a.nigmetov@gmail.com>2016-09-05 13:32:05 +0200
committerArnur Nigmetov <a.nigmetov@gmail.com>2016-09-05 13:32:05 +0200
commit7b850b8ee43fb7f8a0b2a1565ed01102d40b0a14 (patch)
tree171852c6acd2c8be4390c53a52debf70ca4930b3 /geom_matching/wasserstein/include/auction_runner_gs.h
parentd1cf630f193cff61c83999600550634032ed1739 (diff)
Technical changes for R integration
Avoid including iostream (R complains about that). All output protected by preprocessor directive (R checker should not see an instance of std::cout << in your code). Also added getWassersteinCost to be in line with the Dionysus implementation used in TDA.
Diffstat (limited to 'geom_matching/wasserstein/include/auction_runner_gs.h')
-rw-r--r--geom_matching/wasserstein/include/auction_runner_gs.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/geom_matching/wasserstein/include/auction_runner_gs.h b/geom_matching/wasserstein/include/auction_runner_gs.h
index 34a91e8..80aa9f0 100644
--- a/geom_matching/wasserstein/include/auction_runner_gs.h
+++ b/geom_matching/wasserstein/include/auction_runner_gs.h
@@ -76,8 +76,9 @@ public:
const double _initialEpsilon,
const double _epsFactor);
void setEpsilon(double newVal) { assert(epsilon > 0.0); epsilon = newVal; };
- double getEpsilon(void) const { return epsilon; }
- double getWassersteinDistance(void);
+ double getEpsilon() const { return epsilon; }
+ double getWassersteinDistance();
+ double getWassersteinCost();
static constexpr int maxIterNum { 25 }; // maximal number of iterations of epsilon-scaling
private:
// private data
@@ -94,6 +95,7 @@ private:
double epsilonCommonRatio; // next epsilon = current epsilon / epsilonCommonRatio
double weightAdjConst;
double wassersteinDistance;
+ double wassersteinCost;
// to get the 2 best items
std::unique_ptr<AuctionOracle> oracle;
#ifdef KEEP_UNASSIGNED_ORDERED