diff options
author | Arnur Nigmetov <a.nigmetov@gmail.com> | 2016-09-05 13:32:05 +0200 |
---|---|---|
committer | Arnur Nigmetov <a.nigmetov@gmail.com> | 2016-09-05 13:32:05 +0200 |
commit | 7b850b8ee43fb7f8a0b2a1565ed01102d40b0a14 (patch) | |
tree | 171852c6acd2c8be4390c53a52debf70ca4930b3 /geom_matching/wasserstein/include/basic_defs_ws.h | |
parent | d1cf630f193cff61c83999600550634032ed1739 (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/basic_defs_ws.h')
-rw-r--r-- | geom_matching/wasserstein/include/basic_defs_ws.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/geom_matching/wasserstein/include/basic_defs_ws.h b/geom_matching/wasserstein/include/basic_defs_ws.h index 9e9c4ec..365c3bd 100644 --- a/geom_matching/wasserstein/include/basic_defs_ws.h +++ b/geom_matching/wasserstein/include/basic_defs_ws.h @@ -33,7 +33,6 @@ derivative works thereof, in binary and source code form. #include <cstddef> #include <unordered_map> #include <unordered_set> -#include <iostream> #include <string> #include <assert.h> @@ -58,7 +57,9 @@ struct Point { bool operator!=(const Point& other) const; Point(double ax, double ay) : x(ax), y(ay) {} Point() : x(0.0), y(0.0) {} +#ifndef FOR_R_TDA friend std::ostream& operator<<(std::ostream& output, const Point p); +#endif }; struct DiagramPoint @@ -76,7 +77,9 @@ struct DiagramPoint bool isNormal(void) const { return type == NORMAL; } double getRealX() const; // return the x-coord double getRealY() const; // return the y-coord +#ifndef FOR_R_TDA friend std::ostream& operator<<(std::ostream& output, const DiagramPoint p); +#endif struct LexicographicCmp { |